PANDORE Version 6 | GREYC-IMAGE |
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.
Returns SUCCESS or FAILURE.
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
Calcul de l'orientation des régions.
Author: Alexandre Duret-Lutz