Visual Servoing Platform  version 3.6.1 under development (2024-04-25)
vp Namespace Reference

Classes

struct  vpContour
 

Typedefs

typedef enum vp::vpGammaMethod vpGammaMethod
 
typedef enum vp::vpGammaColorHandling vpGammaColorHandling
 

Enumerations

enum  vpContourType { CONTOUR_OUTER , CONTOUR_HOLE }
 
enum  vpContourRetrievalType { CONTOUR_RETR_TREE , CONTOUR_RETR_LIST , CONTOUR_RETR_EXTERNAL }
 
enum  RETINEX_LEVEL { RETINEX_UNIFORM = 0 , RETINEX_LOW = 1 , RETINEX_HIGH = 2 }
 
enum  vpAutoThresholdMethod {
  AUTO_THRESHOLD_HUANG , AUTO_THRESHOLD_INTERMODES , AUTO_THRESHOLD_ISODATA , AUTO_THRESHOLD_MEAN ,
  AUTO_THRESHOLD_OTSU , AUTO_THRESHOLD_TRIANGLE
}
 
enum  vpGammaMethod {
  GAMMA_MANUAL = 0 , GAMMA_LOG_BASED = 1 , GAMMA_NONLINEAR_BASED = 2 , GAMMA_CDF_BASED = 3 ,
  GAMMA_CLASSIFICATION_BASED = 4 , GAMMA_SPATIAL_VARIANT_BASED = 5 , GAMMA_METHOD_COUNT = 6
}
 
enum  vpGammaColorHandling { GAMMA_RGB = 0 , GAMMA_HSV = 1 , GAMMA_COLOR_HANDLING_COUNT = 2 }
 

Functions

VISP_EXPORT void eigen2visp (const Eigen::MatrixXd &src, vpMatrix &dst)
 
VISP_EXPORT void eigen2visp (const Eigen::MatrixXd &src, vpHomogeneousMatrix &dst)
 
template<typename Type >
void eigen2visp (const Eigen::Quaternion< Type > &src, vpQuaternionVector &dst)
 
template<typename Type >
void eigen2visp (const Eigen::AngleAxis< Type > &src, vpThetaUVector &dst)
 
VISP_EXPORT void eigen2visp (const Eigen::VectorXd &src, vpColVector &dst)
 
VISP_EXPORT void eigen2visp (const Eigen::RowVectorXd &src, vpRowVector &dst)
 
template<typename Derived >
void visp2eigen (const vpMatrix &src, Eigen::MatrixBase< Derived > &dst)
 
template<typename Derived >
void visp2eigen (const vpHomogeneousMatrix &src, Eigen::MatrixBase< Derived > &dst)
 
template<typename Type >
void visp2eigen (const vpQuaternionVector &src, Eigen::Quaternion< Type > &dst)
 
template<typename Type >
void visp2eigen (const vpThetaUVector &src, Eigen::AngleAxis< Type > &dst)
 
VISP_EXPORT void visp2eigen (const vpColVector &src, Eigen::VectorXd &dst)
 
VISP_EXPORT void visp2eigen (const vpRowVector &src, Eigen::RowVectorXd &dst)
 
VISP_EXPORT void drawContours (vpImage< unsigned char > &I, const std::vector< std::vector< vpImagePoint > > &contours, unsigned char grayValue=255)
 
VISP_EXPORT void drawContours (vpImage< vpRGBa > &I, const std::vector< std::vector< vpImagePoint > > &contours, const vpColor &color)
 
VISP_EXPORT void findContours (const vpImage< unsigned char > &I_original, vpContour &contours, std::vector< std::vector< vpImagePoint > > &contourPts, const vpContourRetrievalType &retrievalMode=vp::CONTOUR_RETR_TREE)
 
VISP_EXPORT std::string vpGammaMethodList (const std::string &pref="<", const std::string &sep=" , ", const std::string &suf=">")
 
VISP_EXPORT std::string vpGammaMethodToString (const vpGammaMethod &type)
 
VISP_EXPORT vpGammaMethod vpGammaMethodFromString (const std::string &name)
 
VISP_EXPORT std::string vpGammaColorHandlingList (const std::string &pref="<", const std::string &sep=" , ", const std::string &suf=">")
 
VISP_EXPORT std::string vpGammaColorHandlingToString (const vpGammaColorHandling &type)
 
VISP_EXPORT vpGammaColorHandling vpGammaColorHandlingFromString (const std::string &name)
 
VISP_EXPORT void adjust (vpImage< unsigned char > &I, double alpha, double beta)
 
VISP_EXPORT void adjust (const vpImage< unsigned char > &I1, vpImage< unsigned char > &I2, double alpha, double beta)
 
VISP_EXPORT void adjust (vpImage< vpRGBa > &I, const double alpha, double beta)
 
VISP_EXPORT void adjust (const vpImage< vpRGBa > &I1, vpImage< vpRGBa > &I2, double alpha, double beta)
 
VISP_EXPORT void clahe (const vpImage< unsigned char > &I1, vpImage< unsigned char > &I2, int blockRadius=150, int bins=256, float slope=3.0f, bool fast=true)
 
VISP_EXPORT void clahe (const vpImage< vpRGBa > &I1, vpImage< vpRGBa > &I2, int blockRadius=150, int bins=256, float slope=3.0f, bool fast=true)
 
VISP_EXPORT void equalizeHistogram (vpImage< unsigned char > &I, const vpImage< bool > *p_mask=nullptr)
 
VISP_EXPORT void equalizeHistogram (const vpImage< unsigned char > &I1, vpImage< unsigned char > &I2, const vpImage< bool > *p_mask=nullptr)
 
VISP_EXPORT void equalizeHistogram (vpImage< vpRGBa > &I, bool useHSV=false)
 
VISP_EXPORT void equalizeHistogram (const vpImage< vpRGBa > &I1, vpImage< vpRGBa > &I2, bool useHSV=false)
 
VISP_EXPORT void gammaCorrection (vpImage< unsigned char > &I, const float &gamma, const vpGammaMethod &method=vp::GAMMA_MANUAL, const vpImage< bool > *p_mask=nullptr)
 
VISP_EXPORT void 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 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 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)
 
VISP_EXPORT void retinex (vpImage< vpRGBa > &I, int scale=240, int scaleDiv=3, int level=RETINEX_UNIFORM, double dynamic=1.2, int kernelSize=-1)
 
VISP_EXPORT void 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)
 
VISP_EXPORT void stretchContrast (vpImage< unsigned char > &I)
 
VISP_EXPORT void stretchContrast (const vpImage< unsigned char > &I1, vpImage< unsigned char > &I2)
 
VISP_EXPORT void stretchContrast (vpImage< vpRGBa > &I)
 
VISP_EXPORT void stretchContrast (const vpImage< vpRGBa > &I1, vpImage< vpRGBa > &I2)
 
VISP_EXPORT void stretchContrastHSV (vpImage< vpRGBa > &I)
 
VISP_EXPORT void stretchContrastHSV (const vpImage< vpRGBa > &I1, vpImage< vpRGBa > &I2)
 
VISP_EXPORT void unsharpMask (vpImage< unsigned char > &I, float sigma, double weight=0.6)
 
VISP_EXPORT void unsharpMask (const vpImage< unsigned char > &I, vpImage< unsigned char > &Ires, float sigma, double weight=0.6)
 
VISP_EXPORT void unsharpMask (vpImage< vpRGBa > &I, float sigma, double weight=0.6)
 
VISP_EXPORT void unsharpMask (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &Ires, float sigma, double weight=0.6)
 
VISP_EXPORT void connectedComponents (const vpImage< unsigned char > &I, vpImage< int > &labels, int &nbComponents, const vpImageMorphology::vpConnexityType &connexity=vpImageMorphology::CONNEXITY_4)
 
VISP_EXPORT void fillHoles (vpImage< unsigned char > &I)
 
VISP_EXPORT void floodFill (vpImage< unsigned char > &I, const vpImagePoint &seedPoint, const unsigned char oldValue, const unsigned char newValue, const vpImageMorphology::vpConnexityType &connexity=vpImageMorphology::CONNEXITY_4)
 
VISP_EXPORT void reconstruct (const vpImage< unsigned char > &marker, const vpImage< unsigned char > &mask, vpImage< unsigned char > &h_kp1, const vpImageMorphology::vpConnexityType &connexity=vpImageMorphology::CONNEXITY_4)
 
VISP_EXPORT unsigned char autoThreshold (vpImage< unsigned char > &I, const vp::vpAutoThresholdMethod &method, const unsigned char backgroundValue=0, const unsigned char foregroundValue=255)
 

Typedef Documentation

◆ vpGammaColorHandling

How to handle color images when applying Gamma Correction.

◆ vpGammaMethod

Gamma Correction automatic methods.

Enumeration Type Documentation

◆ RETINEX_LEVEL

Retinex level that allows to specifies distribution of the Gaussian blurring kernel sizes for scale division values > 2.

Enumerator
RETINEX_UNIFORM 

Tends to treat all image intensities similarly.

RETINEX_LOW 

Enhances dark regions of the image.

RETINEX_HIGH 

Enhances the bright regions of the image.

Definition at line 56 of file vpImgproc.h.

◆ vpAutoThresholdMethod

Automatic thresholding method.

Enumerator
AUTO_THRESHOLD_HUANG 

Huang L.-K. and Wang M.-J.J. (1995) "Image Thresholding by Minimizing the Measures of Fuzziness" Pattern Recognition, 28(1): 41-51 [21]

AUTO_THRESHOLD_INTERMODES 

Prewitt, JMS & Mendelsohn, ML (1966), "The analysis of cell images", Annals of the New York Academy of Sciences 128: 1035-1053 [42]

AUTO_THRESHOLD_ISODATA 

Ridler, TW & Calvard, S (1978), "Picture thresholding using an iterative selection method", IEEE Transactions on Systems, Man and Cybernetics 8: 630-632 [43],

AUTO_THRESHOLD_MEAN 

Glasbey, CA (1993), "An analysis of histogram-based thresholding algorithms", CVGIP: Graphical Models and Image Processing 55: 532-537 [17]

AUTO_THRESHOLD_OTSU 

Otsu, N (1979), "A threshold selection method from gray-level histograms", IEEE Trans. Sys., Man., Cyber. 9: 62-66, doi:10.1109/TSMC.1979.4310076 [40]

AUTO_THRESHOLD_TRIANGLE 

Zack GW, Rogers WE, Latt SA (1977), "Automatic measurement of sister chromatid exchange frequency", J. Histochem. Cytochem. 25 (7): 741–53, PMID 70454 [50]

Examples
tutorial-count-coins.cpp.

Definition at line 66 of file vpImgproc.h.

◆ vpContourRetrievalType

Type of contour retrieval.

Enumerator
CONTOUR_RETR_TREE 

Retrieve all the contours with the hierarchy stored in a tree.

CONTOUR_RETR_LIST 

Retrieve all the contours without any hierarchy.

CONTOUR_RETR_EXTERNAL 

Retrieve only external contours.

Examples
tutorial-contour.cpp.

Definition at line 198 of file vpContours.h.

◆ vpContourType

Type of contour.

Enumerator
CONTOUR_OUTER 

Outer contour.

CONTOUR_HOLE 

Hole contour.

Definition at line 189 of file vpContours.h.

◆ vpGammaColorHandling

How to handle color images when applying Gamma Correction.

Enumerator
GAMMA_RGB 

Gamma correction is apply to Red, Blue and Green channels individually.

GAMMA_HSV 

The input image is converted into HSV space, Gamma Correction is applied to Value channel and then the image is converted back into RGBa space.

GAMMA_COLOR_HANDLING_COUNT 

Definition at line 147 of file vpImgproc.h.

◆ vpGammaMethod

Gamma Correction automatic methods.

Enumerator
GAMMA_MANUAL 

User-defined constant positive gamma factor.

GAMMA_LOG_BASED 

Scott, J & Pusateri M (2009)"Towards Real-time Hardware Gamma Correction for Dynamic Contrast Enhancement" IEEE Applied Imagery Pattern Recognition Workshop (AIPR 2009)

GAMMA_NONLINEAR_BASED 

Shi, Y et al. (2007), "Reducing Illumination Based On Nonlinear Gamma Correction", International Conference on Image Processing

GAMMA_CDF_BASED 

Huang, SC et al. (2013),"Efficient Contrast Enhancement Using Adaptive Gamma Correction With Weighting Distribution", IEEE Trans. on Image Processing, VOL. 22, NO. 3, MARCH 2013.

GAMMA_CLASSIFICATION_BASED 

Rahman, S et al. (2016), "An adaptive gamma correction for image enhancement", EURASIP Journal on Image and Video Processing

GAMMA_SPATIAL_VARIANT_BASED 

Lee, S et al. (2010), "A Space-Variant Luminance Map based Color Image Enhancement", IEEE Trans. on Consumer Electronics, Vol. 56, No. 4, November 2010.

GAMMA_METHOD_COUNT 

Definition at line 98 of file vpImgproc.h.

Function Documentation

◆ eigen2visp() [1/6]

template<typename Type >
void vp::eigen2visp ( const Eigen::AngleAxis< Type > &  src,
vpThetaUVector dst 
)

Definition at line 56 of file vpEigenConversion.h.

References vpThetaUVector::buildFrom().

◆ eigen2visp() [2/6]

void vp::eigen2visp ( const Eigen::MatrixXd &  src,
vpHomogeneousMatrix dst 
)

Definition at line 49 of file vpEigenConversion.cpp.

References vpArray2D< Type >::data, and vpException::dimensionError.

◆ eigen2visp() [3/6]

void vp::eigen2visp ( const Eigen::MatrixXd &  src,
vpMatrix dst 
)

◆ eigen2visp() [4/6]

template<typename Type >
void vp::eigen2visp ( const Eigen::Quaternion< Type > &  src,
vpQuaternionVector dst 
)

Definition at line 51 of file vpEigenConversion.h.

References vpQuaternionVector::buildFrom().

◆ eigen2visp() [5/6]

void vp::eigen2visp ( const Eigen::RowVectorXd &  src,
vpRowVector dst 
)

Definition at line 73 of file vpEigenConversion.cpp.

References vpRowVector::resize().

◆ eigen2visp() [6/6]

void vp::eigen2visp ( const Eigen::VectorXd &  src,
vpColVector dst 
)

Definition at line 59 of file vpEigenConversion.cpp.

References vpColVector::resize().

◆ visp2eigen() [1/6]

void vp::visp2eigen ( const vpColVector src,
Eigen::VectorXd &  dst 
)

Definition at line 87 of file vpEigenConversion.cpp.

References vpArray2D< Type >::data, and vpArray2D< Type >::size().

◆ visp2eigen() [2/6]

template<typename Derived >
void vp::visp2eigen ( const vpHomogeneousMatrix src,
Eigen::MatrixBase< Derived > &  dst 
)

◆ visp2eigen() [3/6]

template<typename Derived >
void vp::visp2eigen ( const vpMatrix src,
Eigen::MatrixBase< Derived > &  dst 
)

◆ visp2eigen() [4/6]

template<typename Type >
void vp::visp2eigen ( const vpQuaternionVector src,
Eigen::Quaternion< Type > &  dst 
)

◆ visp2eigen() [5/6]

void vp::visp2eigen ( const vpRowVector src,
Eigen::RowVectorXd &  dst 
)

Definition at line 89 of file vpEigenConversion.cpp.

References vpArray2D< Type >::data, and vpArray2D< Type >::size().

◆ visp2eigen() [6/6]

template<typename Type >
void vp::visp2eigen ( const vpThetaUVector src,
Eigen::AngleAxis< Type > &  dst 
)

Definition at line 86 of file vpEigenConversion.h.

References vpThetaUVector::getTheta(), and vpThetaUVector::getU().

◆ vpGammaColorHandlingFromString()

vpGammaColorHandling vp::vpGammaColorHandlingFromString ( const std::string &  name)

Cast a string into a vp::vpGammaColorHandling.

Parameters
[in]nameThe name of the backend.
Returns
vp::vpGammaColorHandling The corresponding enumeration value.
Examples
tutorial-brightness-adjustment.cpp.

Definition at line 160 of file vpImgproc.cpp.

References GAMMA_COLOR_HANDLING_COUNT, and vpGammaColorHandlingToString().

◆ vpGammaColorHandlingList()

std::string vp::vpGammaColorHandlingList ( const std::string &  pref = "<",
const std::string &  sep = " , ",
const std::string &  suf = ">" 
)

Get the list of available vpGammaColorHandling.

Parameters
[in]prefThe prefix of the list.
[in]sepThe separator between two elements of the list.
[in]sufThe suffix of the list.
Returns
std::string The list of available items.
Examples
tutorial-brightness-adjustment.cpp.

Definition at line 129 of file vpImgproc.cpp.

References GAMMA_COLOR_HANDLING_COUNT, and vpGammaColorHandlingToString().

◆ vpGammaColorHandlingToString()

std::string vp::vpGammaColorHandlingToString ( const vpGammaColorHandling type)

Cast a vp::vpGammaColorHandling into a string, to know its name.

Parameters
[in]typeThe type that must be casted into a string.
Returns
std::string The corresponding name.

Definition at line 143 of file vpImgproc.cpp.

References GAMMA_COLOR_HANDLING_COUNT, GAMMA_HSV, and GAMMA_RGB.

Referenced by gammaCorrection(), vpGammaColorHandlingFromString(), and vpGammaColorHandlingList().

◆ vpGammaMethodFromString()

vpGammaMethod vp::vpGammaMethodFromString ( const std::string &  name)

Cast a string into a vp::vpGammaMethod.

Parameters
[in]nameThe name of the backend.
Returns
vp::vpGammaMethod The corresponding enumeration value.
Examples
tutorial-brightness-adjustment.cpp.

Definition at line 112 of file vpImgproc.cpp.

References GAMMA_METHOD_COUNT, and vpGammaMethodToString().

◆ vpGammaMethodList()

std::string vp::vpGammaMethodList ( const std::string &  pref = "<",
const std::string &  sep = " , ",
const std::string &  suf = ">" 
)

Get the list of available vpGammaMethod.

Parameters
[in]prefThe prefix of the list.
[in]sepThe separator between two elements of the list.
[in]sufThe suffix of the list.
Returns
std::string The list of available items.
Examples
tutorial-brightness-adjustment.cpp.

Definition at line 69 of file vpImgproc.cpp.

References GAMMA_METHOD_COUNT, and vpGammaMethodToString().

◆ vpGammaMethodToString()

std::string vp::vpGammaMethodToString ( const vpGammaMethod type)

Cast a vp::vpGammaMethod into a string, to know its name.

Parameters
[in]typeThe type that must be casted into a string.
Returns
std::string The corresponding name.

Definition at line 83 of file vpImgproc.cpp.

References GAMMA_CDF_BASED, GAMMA_CLASSIFICATION_BASED, GAMMA_LOG_BASED, GAMMA_MANUAL, GAMMA_METHOD_COUNT, GAMMA_NONLINEAR_BASED, and GAMMA_SPATIAL_VARIANT_BASED.

Referenced by gammaCorrection(), vpGammaMethodFromString(), and vpGammaMethodList().