Class Otsu

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, Serializable

    public class Otsu
    extends AbstractBufferedImageBasedHeatmapThreshold
    Computes the variance based threshold using Otsu's method from an input image (gray scale; boofcv.struct.image.GrayU8).

    For more information see:
    WikiPedia. Otsu's method.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -conversion <adams.data.conversion.HeatmapToBufferedImageConversion> (property: conversion)
        The conversion to use for turning the heatmap into a BufferedImage.
        default: adams.data.conversion.HeatmapToBufferedImage -generator adams.gui.visualization.core.BiColorGenerator
     
    -min <int> (property: min)
        The minimum value to use in the computation (included).
        default: 0
        minimum: 0
     
    -max <int> (property: max)
        The maximum value to use in the computation (excluded).
        default: 256
        minimum: 1
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int m_Max
      the max value.
      protected int m_Min
      the min value.
      • 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
      Otsu()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void defineOptions()
      Adds options to the internal list of options.
      protected double doCalcThreshold​(Heatmap map, BufferedImage img)
      Performs the actual calculation of the threshold using the image.
      int getMax()
      Returns the maximum value for the computation.
      int getMin()
      Returns the minimum value for the computation.
      adams.core.TechnicalInformation getTechnicalInformation()
      Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
      String globalInfo()
      Returns a string describing the object.
      String maxTipText()
      Returns the tip text for this property.
      String minTipText()
      Returns the tip text for this property.
      void setMax​(int value)
      Sets the maximum value for the computation.
      void setMin​(int value)
      Sets the minimum value for the computation.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
      • Methods inherited from class adams.core.logging.CustomLoggingLevelObject

        setLoggingLevel
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_Min

        protected int m_Min
        the min value.
      • m_Max

        protected int m_Max
        the max value.
    • Constructor Detail

      • Otsu

        public Otsu()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • getTechnicalInformation

        public adams.core.TechnicalInformation getTechnicalInformation()
        Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
        Returns:
        the technical information about this class
      • setMin

        public void setMin​(int value)
        Sets the minimum value for the computation.
        Parameters:
        value - the minimum (incl)
      • getMin

        public int getMin()
        Returns the minimum value for the computation.
        Returns:
        the minimum (incl)
      • minTipText

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

        public void setMax​(int value)
        Sets the maximum value for the computation.
        Parameters:
        value - the maximum (excl)
      • getMax

        public int getMax()
        Returns the maximum value for the computation.
        Returns:
        the maximum (excl)
      • maxTipText

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