PANDORE Version 6 GREYC-IMAGE

pregionorientation



Measures region orientation degree.



Synopsis

pregionorientation name [rg_in|-] [col_out|-]

Description

pregionorientation measures the orientation of the regions inside the region map rg_in. Each region orientation 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 orientation value is specified in degree. Is is computed from the moments:

orientation = 0.5*arctan(2*M11/(M20-M02)).

If M20=M02 the region is symmetrical and orientation is set to 360.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

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

   pbinarization 100 1e30 tangram.pan a.pan
   plabeling 8 a.pan b.pan
   pregionorientation orientation b.pan c.pan
   pcol2txt c.pan

See also

Region Features Extraction

C++ prototype

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

Version française

Calcul de l'orientation des régions.


Author: Alexandre Duret-Lutz