Click or drag to resize

GrayworldWB Class
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]: Saturation[I]= max(R,G,B)-min(R,G,B) / 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.
Inheritance Hierarchy

Namespace:  Emgu.CV.XPhoto
Assembly:  Emgu.CV.World (in Emgu.CV.World.dll) Version: (
public class GrayworldWB : WhiteBalancer

The GrayworldWB type exposes the following members.

Public methodGrayworldWB
Creates a gray-world white balancer
Public propertyPtr
Pointer to the unmanaged object
(Inherited from UnmanagedObject.)
Public propertySaturationThreshold
Maximum saturation for a pixel to be included in the gray-world assumption
Public methodBalanceWhite
Applies white balancing to the input image.
(Inherited from WhiteBalancer.)
Public methodDispose
The dispose function that implements IDisposable interface
(Inherited from DisposableObject.)
Protected methodDisposeObject
Release all the unmanaged memory associated with this white balancer
(Overrides WhiteBalancerDisposeObject.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize
(Inherited from DisposableObject.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodReleaseManagedResources
Release the managed resources. This function will be called during the disposal of the current object. override ride this function if you need to call the Dispose() function on any managed IDisposable object created by the current object
(Inherited from DisposableObject.)
Public methodToString (Inherited from Object.)
Protected field_ptr
A pointer to the unmanaged object
(Inherited from UnmanagedObject.)
Protected field_whiteBalancerPtr
Pointer to the native white balancer object
(Inherited from WhiteBalancer.)
See Also