Visual Servoing Platform  version 3.2.0 under development (2019-01-22)

Functions

VISP_EXPORT void vp::connectedComponents (const vpImage< unsigned char > &I, vpImage< int > &labels, int &nbComponents, const vpImageMorphology::vpConnexityType &connexity=vpImageMorphology::CONNEXITY_4)
 
VISP_EXPORT void vp::floodFill (vpImage< unsigned char > &I, const vpImagePoint &seedPoint, const unsigned char oldValue, const unsigned char newValue, const vpImageMorphology::vpConnexityType &connexity=vpImageMorphology::CONNEXITY_4)
 

Detailed Description

Connected components.

Function Documentation

void vp::connectedComponents ( const vpImage< unsigned char > &  I,
vpImage< int > &  labels,
int &  nbComponents,
const vpImageMorphology::vpConnexityType connexity = vpImageMorphology::CONNEXITY_4 
)

Perform connected components detection.

Parameters
I: Input image (0 means background).
labels: Label image that contain for each position the component label.
nbComponents: Number of connected components.
connexity: Type of connexity.
Examples:
testConnectedComponents.cpp, and tutorial-connected-components.cpp.

Definition at line 119 of file vpConnectedComponents.cpp.

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

void vp::floodFill ( vpImage< unsigned char > &  I,
const vpImagePoint seedPoint,
const unsigned char  oldValue,
const unsigned char  newValue,
const vpImageMorphology::vpConnexityType connexity = vpImageMorphology::CONNEXITY_4 
)

Perform the flood fill algorithm.

Parameters
I: Input image to flood fill.
seedPoint: Seed position in the image.
oldValue: Old value to replace.
newValue: New value to flood fill.
connexity: Type of connexity.
Examples:
testFloodFill.cpp, and tutorial-flood-fill.cpp.

Definition at line 85 of file vpFloodFill.cpp.

References vpImageMorphology::CONNEXITY_4, vpImagePoint::get_i(), vpImagePoint::get_j(), vpImage< Type >::getHeight(), vpImage< Type >::getSize(), and vpImage< Type >::getWidth().

Referenced by vp::fillHoles().