OpenCV for Unity 2.6.4
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.
|
Gray-world white balance algorithm. More...
Public Member Functions | |
float | getSaturationThreshold () |
Maximum saturation for a pixel to be included in the gray-world assumption. | |
void | setSaturationThreshold (float val) |
Public Member Functions inherited from OpenCVForUnity.XphotoModule.WhiteBalancer | |
void | balanceWhite (Mat src, Mat dst) |
Applies white balancing to the input image. | |
Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
virtual void | clear () |
Clears the algorithm state. | |
virtual bool | empty () |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. | |
virtual string | getDefaultName () |
IntPtr | getNativeObjAddr () |
void | save (string filename) |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
void | Dispose () |
void | ThrowIfDisposed () |
Static Public Member Functions | |
static new GrayworldWB | __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.CoreModule.Algorithm | |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
DisposableOpenCVObject () | |
DisposableOpenCVObject (bool isEnabledDispose) | |
DisposableOpenCVObject (IntPtr ptr) | |
DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
DisposableObject () | |
DisposableObject (bool isEnabledDispose) | |
Additional Inherited Members | |
Package Functions inherited from OpenCVForUnity.XphotoModule.WhiteBalancer | |
Package Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject | |
Properties inherited from OpenCVForUnity.DisposableObject | |
bool | IsDisposed [get, protected set] |
bool | IsEnabledDispose [get, set] |
Gray-world white balance algorithm.
This algorithm scales the values of pixels based on a gray-world assumption which states that the average of all channels should result in a gray image.
It adds a modification which thresholds pixels based on their saturation value and only uses pixels below the provided threshold in finding average pixel values.
Saturation is calculated using the following for a 3-channel RGB image per pixel I and is in the range [0, 1]:
\[ \texttt{Saturation} [I] = \frac{\textrm{max}(R,G,B) - \textrm{min}(R,G,B) }{\textrm{max}(R,G,B)} \]
A threshold of 1 means that all pixels are used to white-balance, while a threshold of 0 means no pixels are used. Lower thresholds are useful in white-balancing saturated images.
Currently supports images of type CV_8UC3 and CV_16UC3.
|
static |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.CoreModule.Algorithm.
float OpenCVForUnity.XphotoModule.GrayworldWB.getSaturationThreshold | ( | ) |
Maximum saturation for a pixel to be included in the gray-world assumption.
void OpenCVForUnity.XphotoModule.GrayworldWB.setSaturationThreshold | ( | float | val | ) |
Maximum saturation for a pixel to be included in the gray-world assumption.