Class 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 Detail

      • m_BlurRadius

        protected int m_BlurRadius
        the blur radius to use.
      • m_ThresholdLow

        protected float m_ThresholdLow
        the low threshold.
      • m_ThresholdHigh

        protected float m_ThresholdHigh
        the high threshold.
      • m_ConnectRule

        protected boofcv.struct.ConnectRule m_ConnectRule
        the connect rule.
    • Constructor Detail

      • CannyBinary

        public CannyBinary()
    • Method Detail

      • 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
      • doLocate

        protected LocatedObjects doLocate​(BufferedImage image,
                                          boolean annotateOnly)
        Returns the input image as output.
        Specified by:
        doLocate in class AbstractObjectLocator
        Parameters:
        image - the image to process
        annotateOnly - whether to annotate only
        Returns:
        the containers of located objects