Visual Servoing Platform
version 3.5.0 under development (2022-02-15)
|
Functions | |
VISP_EXPORT void | vp::retinex (vpImage< vpRGBa > &I, int scale=240, int scaleDiv=3, int level=RETINEX_UNIFORM, double dynamic=1.2, int kernelSize=-1) |
VISP_EXPORT void | vp::retinex (const vpImage< vpRGBa > &I1, vpImage< vpRGBa > &I2, int scale=240, int scaleDiv=3, int level=RETINEX_UNIFORM, double dynamic=1.2, int kernelSize=-1) |
Enhance the contrast of a color image using the Retinex technique, based on the Retinex ImageJ plugin:
Retinex filtering is based on Land's theory of image perception, proposed to explain the perceived colour constancy of objects under varying illumination conditions. Several approaches exist to implement the retinex principles, among these the multiscale retinex with colour restoration algorithm (MSRCR) combines colour constancy with local contrast enhancement so images are rendered similarly to how human vision is believed to operate.
This method is based on the Retinex ImageJ plugin written by Francisco Jiménez Hernández, which is a modified implementation of the Retinex filter from the GIMP package by Fabien Pelisson.
void vp::retinex | ( | vpImage< vpRGBa > & | I, |
int | scale = 240 , |
||
int | scaleDiv = 3 , |
||
int | level = RETINEX_UNIFORM , |
||
double | dynamic = 1.2 , |
||
int | kernelSize = -1 |
||
) |
Apply the Retinex algorithm (the input image is modified).
I | : The color image after application of the Retinex technique. |
scale | : Specifies the depth of the retinex effect. Minimum value is 16, a value providing gross, unrefined filtering. Maximum value is 250. Optimal and default value is 240. |
scaleDiv | : Specifies the number of iterations of the multiscale filter. Values larger than 2 exploit the "multiscale" nature of the algorithm. |
level | : Specifies distribution of the Gaussian blurring kernel sizes for Scale division values > 2:
|
dynamic | : Adjusts the color of the result. Large values produce less saturated images. |
kernelSize | : Kernel size for the gaussian blur operation. If -1, the kernel size is calculated from the image size. |
Definition at line 264 of file vpRetinex.cpp.
References vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().
Referenced by vp::retinex().
void vp::retinex | ( | const vpImage< vpRGBa > & | I1, |
vpImage< vpRGBa > & | I2, | ||
int | scale = 240 , |
||
int | scaleDiv = 3 , |
||
int | level = RETINEX_UNIFORM , |
||
double | dynamic = 1.2 , |
||
int | kernelSize = -1 |
||
) |
Apply the Retinex algorithm.
I1 | : The input color image. |
I2 | : The output color image after application of the Retinex technique. |
scale | : Specifies the depth of the retinex effect. Minimum value is 16, a value providing gross, unrefined filtering. Maximum value is
|
scaleDiv | : Specifies the number of iterations of the multiscale filter. Values larger than 2 exploit the "multiscale" nature of the algorithm. |
level | : Specifies distribution of the Gaussian blurring kernel sizes for Scale division values
|
dynamic | : Adjusts the color of the result. Large values produce less saturated images. |
kernelSize | : Kernel size for the gaussian blur operation. If -1, the kernel size is calculated from the image size. |
Definition at line 306 of file vpRetinex.cpp.
References vp::retinex().