Calculating Angles
11 years

What part of a blob is used to calculate the angle value (Geometric Analysis)?   In my sample image of rectangles the middle one has an angle of 72.9467 and the orientation is 0.0001.    I thought the bottom corner would be used

Thank you.

Anonymous 11 years
It will use the furthest corner ... which in your case may switch around due to noise and the fact that a rectangle has a lot of symmetry in it. In your case it is using the upper right corner thus the 72 degree orientation from that to the center of the object (COG). That happens to be the last corner it visits as it walks along the outline of the rectangle starting in the upper left corner.

To make it chose a consistent corner you have to create a shape that has a single point that is furthest from the center of the object. Think of a circle with a triangle stuck to the outer rim of the circle.

Note that the orientation is a moments calculation based also based on the first and second moments (COG is the first). Thus it will have a symmetry that may not be wanted.

Hope this helps,

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index