SoCentroidProcessing2d engine More...
#include <ImageViz/Engines/MathematicalMorphology/HitOrMissAndSkeleton/SoCentroidProcessing2d.h>
Public Member Functions | |
SoCentroidProcessing2d () | |
Public Attributes | |
SoSFImageDataAdapter | inBinaryImage |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outImage |
The SoCentroidProcessing2d engines computes the centroid of object.
For an object without holes, the centroid is a unique point. For an object with holes, the centroid is made of rings surrounding each hole, as in Figure 1. The SoCentroidProcessing2d engine performs successive thinnings with rotations and until convergence, using the D configuration:
where means "don't care".
Do not confuse the centroid with a classical center of gravity, which may be outside the object as in the case of a boomerang-shaped particle. However, for quasi-convex objects the centroid is very close to the centre of gravity.
Figure 1: Centroid
inBinaryImage | NULL |
SoCentroidProcessing2d::SoCentroidProcessing2d | ( | ) |
Constructor.
The input binary image.
Default value is NULL. Supported types include: binary color image.
The output image.
Default value is NULL. Supported types include: grayscale binary label color image.