Class Threshold

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, ImageTransformer<OpenCVImageContainer>, FlowContextHandler, Serializable, Comparable

    public class Threshold
    extends AbstractOpenCVTransformer
    Generates a binary image using the specified image. Automatically converts the image to grayscale.
    For more information see:
    https://docs.opencv.org/4.6.0/d7/d1b/group__imgproc__misc.html#gaa9e58d2860d4afa658ef70a9b1115576

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -threshold <int> (property: threshold)
        The threshold to apply to the gray pixel values.
        default: 127
        minimum: 0
        maximum: 255
     
    -max-value <int> (property: maxValue)
        The max value to use.
        default: 255
        minimum: 0
        maximum: 255
     
    -type <THRESH_BINARY|THRESH_BINARY_INV|THRESH_TRUNC|THRESH_TOZERO|THRESH_TOZERO_INV|THRESH_MASK|THRESH_OTSU|THRESH_TRIANGLE> (property: type)
        The type of thresholding to apply.
        default: THRESH_BINARY
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Threshold

        protected int m_Threshold
        the threshold to use.
      • m_MaxValue

        protected int m_MaxValue
        the max value.
    • Constructor Detail

      • Threshold

        public Threshold()
    • Method Detail

      • setThreshold

        public void setThreshold​(int value)
        Sets the threshold.
        Parameters:
        value - the threshold
      • getThreshold

        public int getThreshold()
        Returns the threshold.
        Returns:
        the threshold
      • thresholdTipText

        public String thresholdTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setMaxValue

        public void setMaxValue​(int value)
        Sets the max value.
        Parameters:
        value - the max value
      • getMaxValue

        public int getMaxValue()
        Returns the max value.
        Returns:
        the max value
      • maxValueTipText

        public String maxValueTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setType

        public void setType​(ThresholdType value)
        Sets the type.
        Parameters:
        value - the type
      • getType

        public ThresholdType getType()
        Returns the type.
        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