PANDORE Version 6 | GREYC-IMAGE |
pregioncompactness measures compactness of the regions inside the region map rg_in. Each region compactness is stored as a float in the array named name inside the collection col_out. The ith item in the array corresponds to the i+1th region because the region 0 is not considered.
Compactness represents the degree to which the shape region is compact. It is defined as the ratio of the area of a region to the area of a circle with the same perimeter. It is calculated as follows:
compactness = (4*PI*area) / (perimeter*perimeter)
For a circle, the compactness is 1.0, for a square, it is PI/4 and for an infinitely long and narrow shape, it is zero.
Returns SUCCESS or FAILURE.
Displays compactness of the regions yielded by a simple binarization of tangram.pan:
pbinarization 100 1e30 tangram.pan a.pan plabeling 8 a.pan b.pan pregioncompactness compactness b.pan c.pan pcol2txt c.pan
Calcul de la compacité des régions.
Author: Alexandre Duret-Lutz