OpenCV
3.1.0
Open Source Computer Vision
|
Enumerations | |
enum | cv::xphoto::InpaintTypes { cv::xphoto::INPAINT_SHIFTMAP = 0 } |
various inpainting algorithms More... | |
enum | cv::xphoto::WhitebalanceTypes { cv::xphoto::WHITE_BALANCE_SIMPLE = 0, cv::xphoto::WHITE_BALANCE_GRAYWORLD = 1 } |
various white balance algorithms More... | |
Functions | |
void | cv::xphoto::autowbGrayworld (InputArray src, OutputArray dst, float thresh=0.5f) |
Implements a simple grayworld white balance algorithm. More... | |
void | cv::xphoto::balanceWhite (const Mat &src, Mat &dst, const int algorithmType, const float inputMin=0.0f, const float inputMax=255.0f, const float outputMin=0.0f, const float outputMax=255.0f) |
The function implements different algorithm of automatic white balance,. More... | |
void | cv::xphoto::dctDenoising (const Mat &src, Mat &dst, const double sigma, const int psize=16) |
The function implements simple dct-based denoising. More... | |
void | cv::xphoto::inpaint (const Mat &src, const Mat &mask, Mat &dst, const int algorithmType) |
The function implements different single-image inpainting algorithms. More... | |
void cv::xphoto::autowbGrayworld | ( | InputArray | src, |
OutputArray | dst, | ||
float | thresh = 0.5f |
||
) |
Implements a simple grayworld white balance algorithm.
The function autowbGrayworld 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.
This function 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 only works on images of type CV_8UC3.
src | Input array. |
dst | Output array of the same size and type as src. |
thresh | Maximum saturation for a pixel to be included in the gray-world assumption. |
void cv::xphoto::balanceWhite | ( | const Mat & | src, |
Mat & | dst, | ||
const int | algorithmType, | ||
const float | inputMin = 0.0f , |
||
const float | inputMax = 255.0f , |
||
const float | outputMin = 0.0f , |
||
const float | outputMax = 255.0f |
||
) |
The function implements different algorithm of automatic white balance,.
i.e. it tries to map image's white color to perceptual white (this can be violated due to specific illumination or camera settings).
src | |
dst | |
algorithmType | see xphoto::WhitebalanceTypes |
inputMin | minimum value in the input image |
inputMax | maximum value in the input image |
outputMin | minimum value in the output image |
outputMax | maximum value in the output image |
void cv::xphoto::dctDenoising | ( | const Mat & | src, |
Mat & | dst, | ||
const double | sigma, | ||
const int | psize = 16 |
||
) |
The function implements simple dct-based denoising.
http://www.ipol.im/pub/art/2011/ys-dct/.
src | source image |
dst | destination image |
sigma | expected noise standard deviation |
psize | size of block side where dct is computed |
The function implements different single-image inpainting algorithms.
See the original paper [63] for details.
src | source image, it could be of any type and any number of channels from 1 to 4. In case of 3- and 4-channels images the function expect them in CIELab colorspace or similar one, where first color component shows intensity, while second and third shows colors. Nonetheless you can try any colorspaces. |
mask | mask (CV_8UC1), where non-zero pixels indicate valid image area, while zero pixels indicate area to be inpainted |
dst | destination image |
algorithmType | see xphoto::InpaintTypes |