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 int
m_Max
the max value.protected int
m_Min
the 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 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.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:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in 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:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in 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:
doCalcThreshold
in classAbstractBufferedImageBasedHeatmapThreshold
- Parameters:
map
- the original heatmapimg
- the generated image to use- Returns:
- the threshold
-
-