Visual Servoing Platform  version 3.6.1 under development (2024-03-28)

Functions

VISP_EXPORT void vp::gammaCorrection (vpImage< unsigned char > &I, const float &gamma, const vpGammaMethod &method=vp::GAMMA_MANUAL, const vpImage< bool > *p_mask=nullptr)
 
VISP_EXPORT void vp::gammaCorrection (const vpImage< unsigned char > &I1, vpImage< unsigned char > &I2, const float &gamma, const vpGammaMethod &method=vp::GAMMA_MANUAL, const vpImage< bool > *p_mask=nullptr)
 
VISP_EXPORT void vp::gammaCorrection (vpImage< vpRGBa > &I, const float &gamma, const vpGammaColorHandling &colorHandling=vp::GAMMA_RGB, const vpGammaMethod &method=vp::GAMMA_MANUAL, const vpImage< bool > *p_mask=nullptr)
 
VISP_EXPORT void vp::gammaCorrection (const vpImage< vpRGBa > &I1, vpImage< vpRGBa > &I2, const float &gamma, const vpGammaColorHandling &colorHandling=vp::GAMMA_RGB, const vpGammaMethod &method=vp::GAMMA_MANUAL, const vpImage< bool > *p_mask=nullptr)
 

Detailed Description

Gamma correction.

Function Documentation

◆ gammaCorrection() [1/4]

void vp::gammaCorrection ( const vpImage< unsigned char > &  I1,
vpImage< unsigned char > &  I2,
const float &  gamma,
const vpGammaMethod method = vp::GAMMA_MANUAL,
const vpImage< bool > *  p_mask = nullptr 
)

Perform a gamma correction on a grayscale image.

Parameters
[in]I1: The first grayscale image.
[out]I2: The second grayscale image after gamma correction.
[in]gamma: Gamma value. If equals to -1, use automatic Gamma correction based on a non-linear technique. If equals to -2, use automatic Gamma correction based on a logarithmic technique. If equals to -3, uses automatic Gamma correction based on classification. If equals to -4, uses automatic Gamma correction based on probabilistic.
[in]method: The method to use: either GAMMA_MANUAL if the user wants to use a positive constant gamma factor, or one of the automatic method if gamma is negative.
[in]p_mask: If different from nullptr, permits to indicate which points must be taken into account by setting them to true.

Definition at line 649 of file vpImgproc.cpp.

References vp::gammaCorrection().

◆ gammaCorrection() [2/4]

void vp::gammaCorrection ( const vpImage< vpRGBa > &  I1,
vpImage< vpRGBa > &  I2,
const float &  gamma,
const vpGammaColorHandling colorHandling = vp::GAMMA_RGB,
const vpGammaMethod method = vp::GAMMA_MANUAL,
const vpImage< bool > *  p_mask = nullptr 
)

Perform a gamma correction on a color image.

Parameters
[in]I1: The first color image.
[out]I2: The second color image after gamma correction.
[in]gamma: Gamma value.
[in]colorHandling: How to handle the colors of the image.
[in]method: The method to use: either GAMMA_MANUAL if the user wants to use a positive constant gamma factor, or one of the automatic method if gamma is negative.
[in]p_mask: If different from nullptr, permits to indicate which points must be taken into account by setting them to true.

Definition at line 697 of file vpImgproc.cpp.

References vp::gammaCorrection().

◆ gammaCorrection() [3/4]

void vp::gammaCorrection ( vpImage< unsigned char > &  I,
const float &  gamma,
const vpGammaMethod method = vp::GAMMA_MANUAL,
const vpImage< bool > *  p_mask = nullptr 
)

Perform a gamma correction on a grayscale image.

Parameters
[in,out]I: The grayscale image to apply gamma correction.
[in]gamma: Gamma value. If equals to -1, use automatic Gamma correction based on a non-linear technique. If equals to -2, use automatic Gamma correction based on a logarithmic technique. If equals to -3, uses automatic Gamma correction based on classification. If equals to -4, uses automatic Gamma correction based on probabilistic.
[in]method: The method to use: either GAMMA_MANUAL if the user wants to use a positive constant gamma factor, or one of the automatic method if gamma is negative.
[in]p_mask: If different from nullptr, permits to indicate which points must be taken into account by setting them to true.
Examples
testImgproc.cpp, and tutorial-brightness-adjustment.cpp.

Definition at line 601 of file vpImgproc.cpp.

References vpException::badValue, vp::GAMMA_CDF_BASED, vp::GAMMA_CLASSIFICATION_BASED, vp::GAMMA_LOG_BASED, vp::GAMMA_MANUAL, vp::GAMMA_NONLINEAR_BASED, vp::GAMMA_SPATIAL_VARIANT_BASED, vpImage< Type >::performLut(), and vp::vpGammaMethodToString().

Referenced by vp::gammaCorrection().

◆ gammaCorrection() [4/4]

void vp::gammaCorrection ( vpImage< vpRGBa > &  I,
const float &  gamma,
const vpGammaColorHandling colorHandling = vp::GAMMA_RGB,
const vpGammaMethod method = vp::GAMMA_MANUAL,
const vpImage< bool > *  p_mask = nullptr 
)

Perform a gamma correction on a color image.

Parameters
[in,out]I: The color image to apply gamma correction.
[in]gamma: Gamma value.
[in]colorHandling: How to handle the colors of the image.
[in]method: The method to use: either GAMMA_MANUAL if the user wants to use a positive constant gamma factor, or one of the automatic method if gamma is negative.
[in]p_mask: If different from nullptr, permits to indicate which points must be taken into account by setting them to true.

Definition at line 656 of file vpImgproc.cpp.

References vpException::badValue, vpImage< Type >::bitmap, vp::GAMMA_HSV, vp::GAMMA_RGB, vp::GAMMA_SPATIAL_VARIANT_BASED, vp::gammaCorrection(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImageConvert::HSVToRGBa(), vpImageConvert::merge(), vpImageConvert::RGBaToHSV(), vpImageConvert::split(), and vp::vpGammaColorHandlingToString().