Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches

Functions

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

Detailed Description

Contours extraction.

If you are interested in contours extraction, you may have a look at

Function Documentation

◆ drawContours() [1/2]

VISP_EXPORT void VISP_NAMESPACE_NAME::drawContours ( VISP_NAMESPACE_ADDRESSING vpImage< unsigned char > & I,
const std::vector< std::vector< VISP_NAMESPACE_ADDRESSING 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.

◆ drawContours() [2/2]

VISP_EXPORT void VISP_NAMESPACE_NAME::drawContours ( VISP_NAMESPACE_ADDRESSING vpImage< VISP_NAMESPACE_ADDRESSING vpRGBa > & I,
const std::vector< std::vector< VISP_NAMESPACE_ADDRESSING vpImagePoint > > & contours,
const VISP_NAMESPACE_ADDRESSING 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.

◆ findContours()

VISP_EXPORT void VISP_NAMESPACE_NAME::findContours ( const VISP_NAMESPACE_ADDRESSING vpImage< unsigned char > & I_original,
vpContour & contours,
std::vector< std::vector< VISP_NAMESPACE_ADDRESSING vpImagePoint > > & contourPts,
const vpContourRetrievalType & retrievalMode = 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.

References CONTOUR_RETR_TREE.