Class BinaryContours
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.locateobjects.AbstractObjectLocator
-
- adams.flow.transformer.locateobjects.BinaryContours
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Stoppable
,Serializable
public class BinaryContours extends AbstractObjectLocator
Uses the BoofCV contour-finding 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
-remove-small-blobs <boolean> (property: removeSmallBlobs) If enabled, small blobs are removed using erode8/dilate8. default: false
-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 boofcv.struct.ConnectRule
m_ConnectRule
the connect rule.protected boolean
m_RemoveSmallBlobs
whether to remove small blobs.-
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 BinaryContours()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
connectRuleTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected LocatedObjects
doLocate(BufferedImage image, boolean annotateOnly)
Returns the input image as output.boofcv.struct.ConnectRule
getConnectRule()
Returns the connect rule to apply.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.boolean
getRemoveSmallBlobs()
Returns whether to remove small blobs using erode8/dilate8.String
globalInfo()
Returns a string describing the object.String
removeSmallBlobsTipText()
Returns the tip text for this property.void
setConnectRule(boofcv.struct.ConnectRule value)
Sets the connect rule to apply.void
setRemoveSmallBlobs(boolean value)
Sets whether to remove small blobs using erode8/dilate8.-
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:
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 classAbstractObjectLocator
-
setRemoveSmallBlobs
public void setRemoveSmallBlobs(boolean value)
Sets whether to remove small blobs using erode8/dilate8.- Parameters:
value
- true if to remove blobs
-
getRemoveSmallBlobs
public boolean getRemoveSmallBlobs()
Returns whether to remove small blobs using erode8/dilate8.- Returns:
- true if blobs removed
-
removeSmallBlobsTipText
public String removeSmallBlobsTipText()
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
-
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 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:
doLocate
in classAbstractObjectLocator
- Parameters:
image
- the image to processannotateOnly
- whether to annotate only- Returns:
- the containers of located objects
-
-