PANDORE Version 6 GREYC-IMAGE

pregionperimeter



Measures region perimeter length.



Synopsis

pregionperimeter name [rg_in|-] [col_out|-]

Description

pregionperimeter measures the perimeter length of the regions inside the region map rg_in. Each region perimeter length 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 region perimeter is the number of pixels on the region boundary. The algorithm uses one quarter pixel for concavity. For example, the perimeter is 7 pixels for the following region (7=6+4*0.25) :

    xx
   xxxx
    xx

For a region with 1 pixel, the perimeter is 1.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

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

   pbinarization 100 1e30 tangram.pan a.pan
   plabeling 8 a.pan b.pan
   pregionperimeter perimeter b.pan c.pan
   pcol2txt c.pan

See also

Region Features Extraction

C++ prototype

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

Version française

Calcul du périmètre des régions.


Author: Alexandre Duret-Lutz