Class CannyBinary
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.locateobjects.AbstractObjectLocator
-
- adams.flow.transformer.locateobjects.CannyBinary
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Stoppable,Serializable
public class CannyBinary extends AbstractObjectLocator
Uses the BoofCV canny binary algorithm to locate objects.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-center-on-canvas <boolean> (property: centerOnCanvas) If enabled, the located objects get centered on a canvas of fixed size. default: false
-canvas-width <int> (property: canvasWidth) The width of the canvas in pixels. default: 100 minimum: 1
-canvas-height <int> (property: canvasHeight) The height of the canvas in pixels. default: 100 minimum: 1
-canvas-color <java.awt.Color> (property: canvasColor) The color to use for filling the canvas. default: #ffffff
-blur-radius <int> (property: blurRadius) The blur radius. default: 2 minimum: 0
-threshold-low <float> (property: thresholdLow) The low threshold. default: 0.1 minimum: 0.0
-threshold-high <float> (property: thresholdHigh) The high threshold. default: 0.3 minimum: 0.0
-connect-rule <FOUR|EIGHT> (property: connectRule) The connect rule to apply. default: EIGHT
- Version:
- $Revision: 78 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_BlurRadiusthe blur radius to use.protected boofcv.struct.ConnectRulem_ConnectRulethe connect rule.protected floatm_ThresholdHighthe high threshold.protected floatm_ThresholdLowthe low threshold.-
Fields inherited from class adams.flow.transformer.locateobjects.AbstractObjectLocator
m_CanvasColor, m_CanvasHeight, m_CanvasWidth, m_CenterOnCanvas, m_Errors, m_Stopped, m_Warnings
-
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 CannyBinary()
-
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 LocatedObjectsdoLocate(BufferedImage image, boolean annotateOnly)Returns the input image as output.intgetBlurRadius()Returns the blur radius.boofcv.struct.ConnectRulegetConnectRule()Returns the connect rule to apply.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.floatgetThresholdHigh()Returns the high threshold.floatgetThresholdLow()Returns the low threshold.StringglobalInfo()Returns a string describing the object.voidsetBlurRadius(int value)Sets the blur radius.voidsetConnectRule(boofcv.struct.ConnectRule value)Sets the connect rule to apply.voidsetThresholdHigh(float value)Sets the high threshold.voidsetThresholdLow(float value)Sets the low threshold.StringthresholdHighTipText()Returns the tip text for this property.StringthresholdLowTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.transformer.locateobjects.AbstractObjectLocator
addError, addWarning, annotate, canvasColorTipText, canvasHeightTipText, canvasWidthTipText, centerOnCanvas, centerOnCanvasTipText, check, cleanUp, destroy, getCanvasColor, getCanvasHeight, getCanvasWidth, getCenterOnCanvas, getDefaultCanvasColor, getDefaultCanvasHeight, getDefaultCanvasWidth, getDefaultCenterOnCanvas, getErrors, getWarnings, hasErrors, hasWarnings, initialize, locate, reset, setCanvasColor, setCanvasHeight, setCanvasWidth, setCenterOnCanvas, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
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
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractObjectLocator
-
setBlurRadius
public void setBlurRadius(int value)
Sets the blur radius.- Parameters:
value- the radius
-
getBlurRadius
public int getBlurRadius()
Returns the blur radius.- 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 or for listing the options.
-
setThresholdLow
public void setThresholdLow(float value)
Sets the low threshold.- Parameters:
value- the threshold
-
getThresholdLow
public float getThresholdLow()
Returns the low threshold.- Returns:
- the threshold
-
thresholdLowTipText
public String thresholdLowTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setThresholdHigh
public void setThresholdHigh(float value)
Sets the high threshold.- Parameters:
value- the threshold
-
getThresholdHigh
public float getThresholdHigh()
Returns the high threshold.- Returns:
- the threshold
-
thresholdHighTipText
public String thresholdHighTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
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
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractObjectLocator- Returns:
- null if no info available, otherwise short string
-
doLocate
protected LocatedObjects doLocate(BufferedImage image, boolean annotateOnly)
Returns the input image as output.- Specified by:
doLocatein classAbstractObjectLocator- Parameters:
image- the image to processannotateOnly- whether to annotate only- Returns:
- the containers of located objects
-
-