Package adams.data.boofcv.transformer
Class CannyEdgeDetection
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,TechnicalInformationHandler
,ImageTransformer<BoofCVImageContainer>
,FlowContextHandler
,Serializable
,Comparable
public class CannyEdgeDetection extends AbstractBoofCVTransformer implements TechnicalInformationHandler
Performs edge detection using the Canny Edge detection algorithm.
For more information on the algorithm, see:
WikiPedia. Canny edge detector.
@misc{missing_id, author = {WikiPedia}, title = {Canny edge detector}, HTTP = {http://en.wikipedia.org/wiki/Canny_edge_detector} }
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-blur-radius <int> (property: blurRadius) The radius to use for the gaussian blur. default: 2 minimum: 1
-type <BINARY_EDGES|TRACE_GRAPH|CONTOUR> (property: type) The type of output to generate. default: BINARY_EDGES
-low-threshold <float> (property: lowThreshold) The low threshold to use. default: 0.1
-connect-rule <FOUR|EIGHT> (property: connectRule) The connect rule to apply. default: EIGHT
-high-threshold <float> (property: highThreshold) The high threshold to use. default: 0.3
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CannyEdgeDetection.OutputType
The type of output to generate.
-
Field Summary
Fields Modifier and Type Field Description protected int
m_BlurRadius
the blur radius.protected boofcv.struct.ConnectRule
m_ConnectRule
the connect rule.protected float
m_HighThreshold
the high threshold to use.protected float
m_LowThreshold
the low threshold to use.protected CannyEdgeDetection.OutputType
m_Type
the type of output to generate.-
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 CannyEdgeDetection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
blurRadiusTipText()
Returns the tip text for this property.String
connectRuleTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected BoofCVImageContainer[]
doTransform(BoofCVImageContainer img)
Performs no transformation at all, just returns the input.int
getBlurRadius()
Returns the radius to use for the gaussian blur.boofcv.struct.ConnectRule
getConnectRule()
Returns the connect rule to apply.float
getHighThreshold()
Returns the high threshold to use.float
getLowThreshold()
Returns the low threshold to use.TechnicalInformation
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.CannyEdgeDetection.OutputType
getType()
Returns the type of output to generate.String
globalInfo()
Returns a string describing the object.String
highThresholdTipText()
Returns the tip text for this property.String
lowThresholdTipText()
Returns the tip text for this property.void
setBlurRadius(int value)
Sets the radius to use for the gaussian blur.void
setConnectRule(boofcv.struct.ConnectRule value)
Sets the connect rule to apply.void
setHighThreshold(float value)
Sets the high threshold to use.void
setLowThreshold(float value)
Sets the low threshold to use.void
setType(CannyEdgeDetection.OutputType value)
Sets the type of output to generate.String
typeTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.boofcv.transformer.AbstractBoofCVTransformer
forCommandLine, forName, getTransformations
-
Methods inherited from class adams.data.image.AbstractImageTransformer
checkImage, cleanUp, compareTo, destroy, equals, getFlowContext, getQuickInfo, 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_BlurRadius
protected int m_BlurRadius
the blur radius.
-
m_LowThreshold
protected float m_LowThreshold
the low threshold to use.
-
m_HighThreshold
protected float m_HighThreshold
the high threshold to use.
-
m_ConnectRule
protected boofcv.struct.ConnectRule m_ConnectRule
the connect rule.
-
m_Type
protected CannyEdgeDetection.OutputType m_Type
the type of output to generate.
-
-
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
-
getTechnicalInformation
public TechnicalInformation getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.- Specified by:
getTechnicalInformation
in interfaceTechnicalInformationHandler
- Returns:
- the technical information about this class
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setBlurRadius
public void setBlurRadius(int value)
Sets the radius to use for the gaussian blur.- Parameters:
value
- the radius
-
getBlurRadius
public int getBlurRadius()
Returns the radius to use for the gaussian blur.- Returns:
- the radius
-
blurRadiusTipText
public String blurRadiusTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setType
public void setType(CannyEdgeDetection.OutputType value)
Sets the type of output to generate.- Parameters:
value
- the type
-
getType
public CannyEdgeDetection.OutputType getType()
Returns the type of output to generate.- Returns:
- the type
-
typeTipText
public String typeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setLowThreshold
public void setLowThreshold(float value)
Sets the low threshold to use.- Parameters:
value
- the low threshold to use
-
getLowThreshold
public float getLowThreshold()
Returns the low threshold to use.- Returns:
- the low threshold in use
-
lowThresholdTipText
public String lowThresholdTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setHighThreshold
public void setHighThreshold(float value)
Sets the high threshold to use.- Parameters:
value
- the high threshold to use
-
getHighThreshold
public float getHighThreshold()
Returns the high threshold to use.- Returns:
- the high threshold in use
-
highThresholdTipText
public String highThresholdTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setConnectRule
public void setConnectRule(boofcv.struct.ConnectRule value)
Sets the connect rule to apply.- Parameters:
value
- the rule
-
getConnectRule
public boofcv.struct.ConnectRule getConnectRule()
Returns the connect rule to apply.- Returns:
- the rule
-
connectRuleTipText
public String connectRuleTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
doTransform
protected BoofCVImageContainer[] doTransform(BoofCVImageContainer img)
Performs no transformation at all, just returns the input.- Specified by:
doTransform
in classAbstractImageTransformer<BoofCVImageContainer>
- Parameters:
img
- the image to process (can be modified, since it is a copy)- Returns:
- the copy of the image
-
-