Visual Servoing Platform
version 3.6.1 under development (2024-11-21)
|
Functions | |
VISP_EXPORT void | VISP_NAMESPACE_NAME::retinex (VISP_NAMESPACE_ADDRESSING vpImage< VISP_NAMESPACE_ADDRESSING vpRGBa > &I, int scale=240, int scaleDiv=3, int level=RETINEX_UNIFORM, double dynamic=1.2, int kernelSize=-1) |
VISP_EXPORT void | VISP_NAMESPACE_NAME::retinex (const VISP_NAMESPACE_ADDRESSING vpImage< VISP_NAMESPACE_ADDRESSING vpRGBa > &I1, VISP_NAMESPACE_ADDRESSING vpImage< VISP_NAMESPACE_ADDRESSING 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.
VISP_EXPORT void VISP_NAMESPACE_NAME::retinex | ( | const VISP_NAMESPACE_ADDRESSING vpImage< VISP_NAMESPACE_ADDRESSING vpRGBa > & | I1, |
VISP_NAMESPACE_ADDRESSING vpImage< VISP_NAMESPACE_ADDRESSING 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 > 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. |
VISP_EXPORT void VISP_NAMESPACE_NAME::retinex | ( | VISP_NAMESPACE_ADDRESSING vpImage< VISP_NAMESPACE_ADDRESSING 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 multi scale 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. |
Referenced by VISP_NAMESPACE_NAME::retinex().