View Source Evision.XPhoto.LearningBasedWB (Evision v0.2.9)
Summary
Functions
Implements the feature extraction part of the algorithm.
Implements the feature extraction part of the algorithm.
Defines the size of one dimension of a three-dimensional RGB histogram that is used internally by the algorithm. It often makes sense to increase the number of bins for images with higher bit depth (e.g. 256 bins for a 12 bit image).
Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images)
Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the channels exceeds \f$\texttt{saturation\_threshold}\times\texttt{range\_max\_val}\f$ are ignored.
setHistBinNum
setRangeMaxVal
setSaturationThreshold
Types
@type t() :: %Evision.XPhoto.LearningBasedWB{ref: reference()}
Type that represents an XPhoto.LearningBasedWB
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@spec extractSimpleFeatures(t(), Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Implements the feature extraction part of the algorithm.
Positional Arguments
self:
Evision.XPhoto.LearningBasedWB.t()
src:
Evision.Mat
.Input three-channel image (BGR color space is assumed).
Return
dst:
Evision.Mat.t()
.An array of four (r,g) chromaticity tuples corresponding to the features listed above.
In accordance with @cite Cheng2015 , computes the following features for the input image:
- Chromaticity of an average (R,G,B) tuple
- Chromaticity of the brightest (R,G,B) tuple (while ignoring saturated pixels)
- Chromaticity of the dominant (R,G,B) tuple (the one that has the highest value in the RGB histogram)
- Mode of the chromaticity palette, that is constructed by taking 300 most common colors according to the RGB histogram and projecting them on the chromaticity plane. Mode is the most high-density point of the palette, which is computed by a straightforward fixed-bandwidth kernel density estimator with a Epanechnikov kernel function.
Python prototype (for reference only):
extractSimpleFeatures(src[, dst]) -> dst
@spec extractSimpleFeatures( t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil ) :: Evision.Mat.t() | {:error, String.t()}
Implements the feature extraction part of the algorithm.
Positional Arguments
self:
Evision.XPhoto.LearningBasedWB.t()
src:
Evision.Mat
.Input three-channel image (BGR color space is assumed).
Return
dst:
Evision.Mat.t()
.An array of four (r,g) chromaticity tuples corresponding to the features listed above.
In accordance with @cite Cheng2015 , computes the following features for the input image:
- Chromaticity of an average (R,G,B) tuple
- Chromaticity of the brightest (R,G,B) tuple (while ignoring saturated pixels)
- Chromaticity of the dominant (R,G,B) tuple (the one that has the highest value in the RGB histogram)
- Mode of the chromaticity palette, that is constructed by taking 300 most common colors according to the RGB histogram and projecting them on the chromaticity plane. Mode is the most high-density point of the palette, which is computed by a straightforward fixed-bandwidth kernel density estimator with a Epanechnikov kernel function.
Python prototype (for reference only):
extractSimpleFeatures(src[, dst]) -> dst
@spec getHistBinNum(Keyword.t()) :: any() | {:error, String.t()}
@spec getHistBinNum(t()) :: integer() | {:error, String.t()}
Defines the size of one dimension of a three-dimensional RGB histogram that is used internally by the algorithm. It often makes sense to increase the number of bins for images with higher bit depth (e.g. 256 bins for a 12 bit image).
Positional Arguments
- self:
Evision.XPhoto.LearningBasedWB.t()
Return
- retval:
integer()
@see setHistBinNum/2
Python prototype (for reference only):
getHistBinNum() -> retval
@spec getRangeMaxVal(Keyword.t()) :: any() | {:error, String.t()}
@spec getRangeMaxVal(t()) :: integer() | {:error, String.t()}
Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images)
Positional Arguments
- self:
Evision.XPhoto.LearningBasedWB.t()
Return
- retval:
integer()
@see setRangeMaxVal/2
Python prototype (for reference only):
getRangeMaxVal() -> retval
@spec getSaturationThreshold(Keyword.t()) :: any() | {:error, String.t()}
@spec getSaturationThreshold(t()) :: number() | {:error, String.t()}
Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the channels exceeds \f$\texttt{saturation\_threshold}\times\texttt{range\_max\_val}\f$ are ignored.
Positional Arguments
- self:
Evision.XPhoto.LearningBasedWB.t()
Return
- retval:
float
Python prototype (for reference only):
getSaturationThreshold() -> retval
setHistBinNum
Positional Arguments
- self:
Evision.XPhoto.LearningBasedWB.t()
- val:
integer()
@see getHistBinNum/1
Python prototype (for reference only):
setHistBinNum(val) -> None
setRangeMaxVal
Positional Arguments
- self:
Evision.XPhoto.LearningBasedWB.t()
- val:
integer()
@see getRangeMaxVal/1
Python prototype (for reference only):
setRangeMaxVal(val) -> None
setSaturationThreshold
Positional Arguments
- self:
Evision.XPhoto.LearningBasedWB.t()
- val:
float
Python prototype (for reference only):
setSaturationThreshold(val) -> None