Class GIMP
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.image.transformer.whitebalance.AbstractWhiteBalanceAlgorithm
-
- adams.data.image.transformer.whitebalance.GIMP
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,TechnicalInformationHandler
,Serializable
public class GIMP extends AbstractWhiteBalanceAlgorithm implements TechnicalInformationHandler
Uses the algorithm for white balancing as used by GIMP.
The White Balance command automatically adjusts the colors by stretching the Red, Green and Blue channels separately. To do this, it discards pixel colors at each end of the Red, Green and Blue histograms which are used by only 0.05% (default) of the pixels in the image and stretches the remaining range as much as possible. The result is that pixel colors which occur very infrequently at the outer edges of the histograms (perhaps bits of dust, etc.) do not negatively influence the minimum and maximum values used for stretching the histograms. However, there may be hue shifts in the resulting image.
For more information see:
GIMP. White Balance.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-threshold <double> (property: threshold) The threshold in percentage of pixels in the image below which to discard colors. default: 0.05 minimum: 0.0 maximum: 100.0
- Version:
- $Revision: 6652 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double
m_Threshold
the threshold below which pixels get discarded.-
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 GIMP()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected BufferedImage
doBalance(BufferedImage img)
Performs the actual white balancing.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.double
getThreshold()
Returns the threshold in percent (0-100) below which to discard colors.String
globalInfo()
Returns a string describing the object.void
setThreshold(double value)
Sets the threshold in percent (0-100) below which to discard colors.String
thresholdTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.image.transformer.whitebalance.AbstractWhiteBalanceAlgorithm
balance, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
getTechnicalInformation
public 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.- Specified by:
getTechnicalInformation
in interfaceTechnicalInformationHandler
- Returns:
- the technical information about this class
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setThreshold
public void setThreshold(double value)
Sets the threshold in percent (0-100) below which to discard colors.- Parameters:
value
- the threshold
-
getThreshold
public double getThreshold()
Returns the threshold in percent (0-100) below which to discard colors.- 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
-
doBalance
protected BufferedImage doBalance(BufferedImage img)
Performs the actual white balancing.- Specified by:
doBalance
in classAbstractWhiteBalanceAlgorithm
- Parameters:
img
- the image to process- Returns:
- the processed image
-
-