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)
 

Detailed Description

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.

Function Documentation

◆ retinex() [1/2]

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).

Parameters
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:
  • 0, tends to treat all image intensities similarly,
  • 1, enhances dark regions of the image,
  • 2, enhances the bright regions of the image.
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.
Examples:
testImgproc.cpp, and tutorial-brightness-adjustment.cpp.

Definition at line 264 of file vpRetinex.cpp.

References vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().

Referenced by vp::retinex().

◆ retinex() [2/2]

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.

Parameters
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
  1. 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:

  • 0, tends to treat all image intensities similarly,
  • 1, enhances dark regions of the image,
  • 2, enhances the bright regions of the image.
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().