Package adams.data.opencv.transformer
Class GaussianBlur
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,ImageTransformer<OpenCVImageContainer>
,FlowContextHandler
,Serializable
,Comparable
public class GaussianBlur extends AbstractOpenCVTransformer
Applies Gaussian blur to the image.
For more information see:
https://docs.opencv.org/4.6.0/d4/d86/group__imgproc__filter.html#gaabe8c836e97159a9193fb0b11ac52cf1
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-kernel-width <int> (property: kernelWidth) The width to use for the kernel (positive and odd integer). default: 3 minimum: 1
-kernel-height <int> (property: kernelHeight) The height to use for the kernel (positive and odd integer). default: 3 minimum: 1
-sigma-x <double> (property: sigmaX) The standard deviation for X. default: 0.0 minimum: 0.0
-sigma-y <double> (property: sigmaY) The standard deviation for Y. default: 0.0 minimum: 0.0
-border-type <BORDER_CONSTANT|BORDER_REPLICATE|BORDER_REFLECT|BORDER_WRAP|BORDER_REFLECT_101|BORDER_TRANSPARENT|BORDER_REFLECT101|BORDER_DEFAULT|BORDER_ISOLATED> (property: borderType) The type of border to use. default: BORDER_DEFAULT
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BorderType
m_BorderType
the border type.protected int
m_KernelHeight
the kernel height.protected int
m_KernelWidth
the kernel width.protected double
m_SigmaX
sigma X (standard deviation for X).protected double
m_SigmaY
sigma Y (standard deviation for X).-
Fields inherited from class adams.data.image.AbstractImageTransformer
m_FlowContext
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description GaussianBlur()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
borderTypeTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected OpenCVImageContainer[]
doTransform(OpenCVImageContainer img)
Performs no transformation at all, just returns the input.BorderType
getBorderType()
Returns the type of border to use.int
getKernelHeight()
Returns the kernel height.int
getKernelWidth()
Returns the kernel width.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.double
getSigmaX()
Returns the standard deviation for X.double
getSigmaY()
Returns the standard deviation for Y.String
globalInfo()
Returns a string describing the object.String
kernelHeightTipText()
Returns the tip text for this property.String
kernelWidthTipText()
Returns the tip text for this property.void
setBorderType(BorderType value)
Sets the type of border to use.void
setKernelHeight(int value)
Sets the kernel height.void
setKernelWidth(int value)
Sets the kernel width.void
setSigmaX(double value)
Sets the standard deviation for X.void
setSigmaY(double value)
Sets the standard deviation for Y.String
sigmaXTipText()
Returns the tip text for this property.String
sigmaYTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.opencv.transformer.AbstractOpenCVTransformer
forCommandLine, forName, getTransformations
-
Methods inherited from class adams.data.image.AbstractImageTransformer
checkImage, cleanUp, compareTo, destroy, equals, getFlowContext, initialize, setFlowContext, shallowCopy, shallowCopy, transform
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_KernelWidth
protected int m_KernelWidth
the kernel width.
-
m_KernelHeight
protected int m_KernelHeight
the kernel height.
-
m_SigmaX
protected double m_SigmaX
sigma X (standard deviation for X).
-
m_SigmaY
protected double m_SigmaY
sigma Y (standard deviation for X).
-
m_BorderType
protected BorderType m_BorderType
the border type.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setKernelWidth
public void setKernelWidth(int value)
Sets the kernel width.- Parameters:
value
- the width
-
getKernelWidth
public int getKernelWidth()
Returns the kernel width.- Returns:
- the width
-
kernelWidthTipText
public String kernelWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setKernelHeight
public void setKernelHeight(int value)
Sets the kernel height.- Parameters:
value
- the height
-
getKernelHeight
public int getKernelHeight()
Returns the kernel height.- Returns:
- the height
-
kernelHeightTipText
public String kernelHeightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setSigmaX
public void setSigmaX(double value)
Sets the standard deviation for X.- Parameters:
value
- the standard deviation
-
getSigmaX
public double getSigmaX()
Returns the standard deviation for X.- Returns:
- the standard deviation
-
sigmaXTipText
public String sigmaXTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setSigmaY
public void setSigmaY(double value)
Sets the standard deviation for Y.- Parameters:
value
- the standard deviation
-
getSigmaY
public double getSigmaY()
Returns the standard deviation for Y.- Returns:
- the standard deviation
-
sigmaYTipText
public String sigmaYTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setBorderType
public void setBorderType(BorderType value)
Sets the type of border to use.- Parameters:
value
- the type
-
getBorderType
public BorderType getBorderType()
Returns the type of border to use.- Returns:
- the type
-
borderTypeTipText
public String borderTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractImageTransformer<OpenCVImageContainer>
- Returns:
- null if no info available, otherwise short string
-
doTransform
protected OpenCVImageContainer[] doTransform(OpenCVImageContainer img)
Performs no transformation at all, just returns the input.- Specified by:
doTransform
in classAbstractImageTransformer<OpenCVImageContainer>
- Parameters:
img
- the image to process (can be modified, since it is a copy)- Returns:
- the copy of the image
-
-