Label Connected Components

From CloudCompareWiki
Jump to: navigation, search

Menu / Icon

This tool is accessible via the CcCCExtract.png icon the upper main toolbar or the 'Tools > Segmentation > Label Connected Comp.' menu.

Description

This tool segments the selected cloud(s) in smaller parts separated by a minimum distance. Each part is a connected component (i.e. a set of 'connected' points).

Note: the name of this tool is derived from the classical image processing algorithm with the same name (see http://en.wikipedia.org/wiki/Connected-component_labeling).

Procedure

Select one or several clouds then start this tool.

Cc label connected components dialog.jpg

CloudCompare will ask you to set some parameters:

  • Octree level: CloudCompare uses a 3D grid to extract the connected components (just as the original algorithm). This grid is deduced from the octree structure. By selecting on octree level you define how small is the minimum gap between two components (the corresponding cell size is displayed next to the level). The higher the level is and the smaller the gap is (so the more components you might get).
  • Min. points per component: components with less than the specified number of points will be ignored (useful to remove the smallest components)
  • random colors: if checked, a random color will be assigned to each component (warning: any existing colors will be overwritten!)


On completion CloudCompare will create as many clouds as components. Each cloud is a proper subset of the original cloud with the same features (scalar fields, normals, colors - if random colors are not generated - etc.).

Raw cloud (left) and extracted connected components (right)


Note: all components will be sorted in a new group (name of the input cloud + "[CCs]"). They will be sorted from the biggest to the smallest (in terms of number of points).