cv.GrayworldWB - MATLAB File Help Go to online doc for cv.GrayworldWB
cv.GrayworldWB

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 RGB images of type uint8 and uint16.

See also
Class Details
Superclasses handle
Sealed false
Construct on load false
Constructor Summary
GrayworldWB Creates an instance of GrayworldWB 
Property Summary
SaturationThreshold Maximum saturation for a pixel to be included in the gray-world 
id Object ID 
Method Summary
  addlistener Add listener for event. 
  balanceWhite Applies white balancing to the input image 
  delete Destructor 
  eq == (EQ) Test handle equality. 
  findobj Find objects matching specified conditions. 
  findprop Find property of MATLAB handle object. 
  ge >= (GE) Greater than or equal relation for handles. 
  gt > (GT) Greater than relation for handles. 
Sealed   isvalid Test handle validity. 
  le <= (LE) Less than or equal relation for handles. 
  listener Add listener for event without binding the listener to the source object. 
  lt < (LT) Less than relation for handles. 
  ne ~= (NE) Not equal relation for handles. 
  notify Notify listeners of event. 
Event Summary
ObjectBeingDestroyed Notifies listeners that a particular object has been destroyed.