Class Otsu
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.heatmapthreshold.AbstractHeatmapThreshold
-
- adams.data.filter.heatmapthreshold.AbstractBufferedImageBasedHeatmapThreshold
-
- adams.data.filter.heatmapthreshold.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 intm_Maxthe max value.protected intm_Minthe min value.-
Fields inherited from class adams.data.filter.heatmapthreshold.AbstractBufferedImageBasedHeatmapThreshold
m_Conversion
-
-
Constructor Summary
Constructors Constructor Description Otsu()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected doubledoCalcThreshold(Heatmap map, BufferedImage img)Performs the actual calculation of the threshold using the image.intgetMax()Returns the maximum value for the computation.intgetMin()Returns the minimum value for the computation.adams.core.TechnicalInformationgetTechnicalInformation()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.StringglobalInfo()Returns a string describing the object.StringmaxTipText()Returns the tip text for this property.StringminTipText()Returns the tip text for this property.voidsetMax(int value)Sets the maximum value for the computation.voidsetMin(int value)Sets the minimum value for the computation.-
Methods inherited from class adams.data.filter.heatmapthreshold.AbstractBufferedImageBasedHeatmapThreshold
conversionTipText, doCalcThreshold, getConversion, setConversion
-
Methods inherited from class adams.data.filter.heatmapthreshold.AbstractHeatmapThreshold
calcThreshold, check
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.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
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractBufferedImageBasedHeatmapThreshold
-
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
-
doCalcThreshold
protected double doCalcThreshold(Heatmap map, BufferedImage img)
Performs the actual calculation of the threshold using the image.- Specified by:
doCalcThresholdin classAbstractBufferedImageBasedHeatmapThreshold- Parameters:
map- the original heatmapimg- the generated image to use- Returns:
- the threshold
-
-