OpenCV for Unity
2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
More sophisticated learning-based automatic white balance algorithm. More...
Public Member Functions | |
void | extractSimpleFeatures (Mat src, Mat dst) |
Implements the feature extraction part of the algorithm. More... | |
int | getRangeMaxVal () |
Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images) More... | |
void | setRangeMaxVal (int val) |
float | getSaturationThreshold () |
Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the channels exceeds \(\texttt{saturation_threshold}\times\texttt{range_max_val}\) are ignored. More... | |
void | setSaturationThreshold (float val) |
int | getHistBinNum () |
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). More... | |
void | setHistBinNum (int val) |
Public Member Functions inherited from OpenCVForUnity.XphotoModule.WhiteBalancer | |
void | balanceWhite (Mat src, Mat dst) |
Applies white balancing to the input image. More... | |
Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
IntPtr | getNativeObjAddr () |
virtual void | clear () |
Clears the algorithm state. More... | |
virtual bool | empty () |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More... | |
void | save (string filename) |
virtual string | getDefaultName () |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
void | Dispose () |
void | ThrowIfDisposed () |
Static Public Member Functions | |
static new LearningBasedWB | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.XphotoModule.WhiteBalancer | |
static new WhiteBalancer | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
static Algorithm | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.XphotoModule.WhiteBalancer | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
DisposableOpenCVObject () | |
DisposableOpenCVObject (IntPtr ptr) | |
DisposableOpenCVObject (bool isEnabledDispose) | |
DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
DisposableObject () | |
DisposableObject (bool isEnabledDispose) | |
Additional Inherited Members | |
Properties inherited from OpenCVForUnity.DisposableObject | |
bool | IsDisposed [get, protected set] |
bool | IsEnabledDispose [get, set] |
More sophisticated learning-based automatic white balance algorithm.
As GrayworldWB, this algorithm works by applying different gains to the input image channels, but their computation is a bit more involved compared to the simple gray-world assumption. More details about the algorithm can be found in [Cheng2015] .
To mask out saturated pixels this function uses only pixels that satisfy the following condition:
\[ \frac{\textrm{max}(R,G,B)}{\texttt{range_max_val}} < \texttt{saturation_thresh} \]
Currently supports images of type CV_8UC3 and CV_16UC3.
|
static |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.CoreModule.Algorithm.
Implements the feature extraction part of the algorithm.
In accordance with [Cheng2015] , computes the following features for the input image:
src | Input three-channel image (BGR color space is assumed). |
dst | An array of four (r,g) chromaticity tuples corresponding to the features listed above. |
int OpenCVForUnity.XphotoModule.LearningBasedWB.getHistBinNum | ( | ) |
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).
int OpenCVForUnity.XphotoModule.LearningBasedWB.getRangeMaxVal | ( | ) |
Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images)
float OpenCVForUnity.XphotoModule.LearningBasedWB.getSaturationThreshold | ( | ) |
Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the channels exceeds \(\texttt{saturation_threshold}\times\texttt{range_max_val}\) are ignored.
void OpenCVForUnity.XphotoModule.LearningBasedWB.setHistBinNum | ( | int | val | ) |
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).
void OpenCVForUnity.XphotoModule.LearningBasedWB.setRangeMaxVal | ( | int | val | ) |
Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images)
void OpenCVForUnity.XphotoModule.LearningBasedWB.setSaturationThreshold | ( | float | val | ) |
Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the channels exceeds \(\texttt{saturation_threshold}\times\texttt{range_max_val}\) are ignored.