PANDORE Version 6 | GREYC-IMAGE | essai
pcenterofmass builds a new region map im_out with the center of mass of each region of the input region map im_in. A center of mass is represented as a point in the output region map with the same label value than the related region.
The center of mass of a region of size N is calculated as follows:
gx = SUM(x[Ri])/N gy = SUm(y[Ri])/N
Warning: It might occur some overlapping between centers of mass because there are not necessarily located into the region. Therefore, a center of mass can hide another.
Returns SUCCESS or FAILURE.
Locates the center of mass of regions in the region map rin.pan:
pcenterofmass rin.pan rout.pan
Localisation des centres de gravité de régions.
Author: Régis Clouard