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 classCannyEdgeDetection.OutputTypeThe type of output to generate.
-
Field Summary
Fields Modifier and Type Field Description protected intm_BlurRadiusthe blur radius.protected boofcv.struct.ConnectRulem_ConnectRulethe connect rule.protected floatm_HighThresholdthe high threshold to use.protected floatm_LowThresholdthe low threshold to use.protected CannyEdgeDetection.OutputTypem_Typethe 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 StringblurRadiusTipText()Returns the tip text for this property.StringconnectRuleTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected BoofCVImageContainer[]doTransform(BoofCVImageContainer img)Performs no transformation at all, just returns the input.intgetBlurRadius()Returns the radius to use for the gaussian blur.boofcv.struct.ConnectRulegetConnectRule()Returns the connect rule to apply.floatgetHighThreshold()Returns the high threshold to use.floatgetLowThreshold()Returns the low threshold to use.TechnicalInformationgetTechnicalInformation()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.OutputTypegetType()Returns the type of output to generate.StringglobalInfo()Returns a string describing the object.StringhighThresholdTipText()Returns the tip text for this property.StringlowThresholdTipText()Returns the tip text for this property.voidsetBlurRadius(int value)Sets the radius to use for the gaussian blur.voidsetConnectRule(boofcv.struct.ConnectRule value)Sets the connect rule to apply.voidsetHighThreshold(float value)Sets the high threshold to use.voidsetLowThreshold(float value)Sets the low threshold to use.voidsetType(CannyEdgeDetection.OutputType value)Sets the type of output to generate.StringtypeTipText()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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin 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:
getTechnicalInformationin interfaceTechnicalInformationHandler- Returns:
- the technical information about this class
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin 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:
doTransformin classAbstractImageTransformer<BoofCVImageContainer>- Parameters:
img- the image to process (can be modified, since it is a copy)- Returns:
- the copy of the image
-
-