Visual Servoing Platform  version 3.2.0

Functions

VISP_EXPORT void vp::drawContours (vpImage< unsigned char > &I, const std::vector< std::vector< vpImagePoint > > &contours, unsigned char grayValue=255)
 
VISP_EXPORT void vp::drawContours (vpImage< vpRGBa > &I, const std::vector< std::vector< vpImagePoint > > &contours, const vpColor &color)
 
VISP_EXPORT void vp::findContours (const vpImage< unsigned char > &I_original, vpContour &contours, std::vector< std::vector< vpImagePoint > > &contourPts, const vpContourRetrievalType &retrievalMode=vp::CONTOUR_RETR_TREE)
 

Detailed Description

Contours extraction.

Function Documentation

◆ drawContours() [1/2]

void vp::drawContours ( vpImage< unsigned char > &  I,
const std::vector< std::vector< vpImagePoint > > &  contours,
unsigned char  grayValue = 255 
)

Draw the input contours on the binary image.

Parameters
I: Grayscale image where we want to draw the input contours.
contours: Detected contours.
grayValue: Drawing grayscale color.
Examples
testContours.cpp, tutorial-contour.cpp, and tutorial-count-coins.cpp.

Definition at line 249 of file vpContours.cpp.

◆ drawContours() [2/2]

void vp::drawContours ( vpImage< vpRGBa > &  I,
const std::vector< std::vector< vpImagePoint > > &  contours,
const vpColor color 
)

Draw the input contours on the color image.

Parameters
I: Color image where we want to draw the input contours.
contours: Detected contours.
color: Drawing color.

Definition at line 274 of file vpContours.cpp.

◆ findContours()

void vp::findContours ( const vpImage< unsigned char > &  I_original,
vpContour contours,
std::vector< std::vector< vpImagePoint > > &  contourPts,
const vpContourRetrievalType retrievalMode = vp::CONTOUR_RETR_TREE 
)

Extract contours from a binary image.

Parameters
I_original: Input binary image (0 means background, 1 means foreground, other values are not allowed).
contours: Detected contours.
contourPts: List of contours, each contour contains a list of contour points.
retrievalMode: Contour retrieval mode.
Examples
testContours.cpp, tutorial-contour.cpp, and tutorial-count-coins.cpp.

Definition at line 299 of file vpContours.cpp.