org.opencv.xphoto

## Class GrayworldWB

- java.lang.Object
- - org.opencv.core.Algorithm
  - - org.opencv.xphoto.WhiteBalancer
    - - org.opencv.xphoto.GrayworldWB

-     public class GrayworldWB
      extends WhiteBalancer

  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 REF: CV_8UC3 and REF: CV_16UC3.

- - ### Field Summary

    - ### Fields inherited from class org.opencv.core.Algorithm

      `nativeObj`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `GrayworldWB(long addr)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GrayworldWB` | `__fromPtr__(long addr)`
    `protected void` | `finalize()`
    `float` | `getSaturationThreshold()` Maximum saturation for a pixel to be included in the gray-world assumption SEE: setSaturationThreshold
    `void` | `setSaturationThreshold(float val)` getSaturationThreshold SEE: getSaturationThreshold

    - ### Methods inherited from class org.opencv.xphoto.WhiteBalancer

      `balanceWhite`

    - ### Methods inherited from class org.opencv.core.Algorithm

      `clear, empty, getDefaultName, getNativeObjAddr, save`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GrayworldWB

          protected GrayworldWB(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static GrayworldWB __fromPtr__(long addr)

    - #### getSaturationThreshold

          public float getSaturationThreshold()

      Maximum saturation for a pixel to be included in the gray-world assumption SEE: setSaturationThreshold
      Returns:
        automatically generated

    - #### setSaturationThreshold

          public void setSaturationThreshold(float val)

      getSaturationThreshold SEE: getSaturationThreshold
      Parameters:
        `val` - automatically generated

    - #### finalize

          protected void finalize()
                           throws Throwable

      Overrides:
        `finalize` in class `WhiteBalancer`
      Throws:
        `Throwable`

Generated on Thu Jul 25 2019 21:39:44 UTC / OpenCV 3.4.7