PANDORE Version 6 GREYC-IMAGE

pregioneccentricity



Measures region eccentricity degree.



Synopsis

pregioneccentricity name [rg_in|-] [col_out|-]

Description

pregioneccentricity measures the eccentricity degree of the regions inside the region map rg_in. Each region eccentricity degree 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.

Eccentricity measures how much the region deviates from being circular. It is defined as the ratio of the length of the short axis to the length of the long axis:

              (Mxx+Myy-sqrt( (Mxx-Myy)*(Mxx-Myy)+4*Mxy*Mxy))
eccentricity= ----------------------------------------------
              (Mxx+Myy+sqrt( (Mxx-Myy)*(Mxx-Myy)+4*Mxy*Mxy))

The maximum value is 1.0 for a square or a circle.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Displays eccentricity of the regions yielded by a simple binarization of tangram.pan:

   pbinarization 100 1e30 tangram.pan a.pan
   plabeling 8 a.pan b.pan
   pregioneccentricity eccentricity b.pan c.pan
   pcol2txt c.pan

See also

Region Features Extraction

C++ prototype

Errc PRegionEccentricity( const Reg2d &rg_in, Collection &cold, const std::string &name );

Version française

Calcul de l'excentricité des régions.


Author: Alexandre Duret-Lutz