O'Reilly logo

Computer Vision with Python 3 by Saurabh Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Orientation by intensity centroid

To assign orientation to corners, we use the intensity centroid. We assume that the corner is offset from the intensity centroid and this vector is used to assign orientation to a keypoint.

To compute the coordinates of the centroid, we use moments. Moments are calculated as follows:

The coordinates of the centroid can be calculated as follows:

We construct a vector OC from the keypoint's center, O, to the centroid, C. The orientation of the patch is obtained as follows:

Here, atan2 is the quadrant-aware version ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required