Class cv::xphoto::GrayworldWB#
Gray-world white balance algorithm. View details
#include <opencv2/xphoto/white_balance.hpp>Collaboration diagram for cv::xphoto::GrayworldWB:
Public Member Functions#
Public Member Functions inherited from cv::xphoto::WhiteBalancer
Return |
Name |
Description |
|---|---|---|
|
Applies white balancing to the input image. |
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed Description#
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]:
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.
Member Function Documentation#
getSaturationThreshold()#
float cv::xphoto::GrayworldWB::getSaturationThreshold()
Python:
cv.xphoto.GrayworldWB.getSaturationThreshold() -> retval
Maximum saturation for a pixel to be included in the gray-world assumption.
See also
setSaturationThreshold()#
void cv::xphoto::GrayworldWB::setSaturationThreshold(float val)
Python:
cv.xphoto.GrayworldWB.setSaturationThreshold(val)
Maximum saturation for a pixel to be included in the gray-world assumption.
See also
Source file#
The documentation for this class was generated from the following file:
opencv2/xphoto/white_balance.hpp