Class CannyEdges

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, Stoppable, Serializable

    public class CannyEdges
    extends AbstractObjectLocator
    Uses the BoofCV canny edges 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
     
    -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
     
    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.
    • Constructor Detail

      • CannyEdges

        public CannyEdges()
    • 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.
      • 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