PANDORE Version 6 GREYC-IMAGE

pregionsphericity



Measures region sphericity degree.



Synopsis

pregionsphericity name [rg_in|-] [col_out|-]

Description

pregionsphericity measures the sphericity of the regions inside the region map rg_in. Each region sphericity 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.

Sphericity measures the degree to which an object approaches the shape of a sphere. It is calculated using:

sphericity = rayon_inscribing / rayon_circumscribing.

The maximum value is 1.0 for circle.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

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

   pbinarization 100 1e30 tangram.pan a.pan
   plabeling 8 a.pan b.pan
   pregionsphericity sphericity b.pan c.pan
   pcol2txt c.pan

See also

Region Features Extraction

C++ prototype

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

Version française

Calcul de la sphéricité des régions.


Author: Régis Clouard