PANDORE Version 6 GREYC-IMAGE

pregionarea



Measures region area size.



Synopsis

pregionarea name [-m mask] [rg_in|-] [col_out|-]

Description

pregionarea measures the area size of the regions inside the region map rg_in. Each region area size is stored as a unsigned long value 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.

The area size is calculated from the number of pixels included in the region and on the boundary. The algorithm uses one half pixel for concavity. For example, the area is 10 pixels for the following region (8 + 4*0.5) :

    xx
   xxxx
    xx

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

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

   pbinarization 100 1e30 tangram.pan a.pan
   plabeling 8 a.pan b.pan
   pregionarea area b.pan c.pan
   pcol2txt c.pan

See also

Region Features Extraction

C++ prototype

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

Version française

Calcul de la surface des régions.


Author: Alexandre Duret-Lutz