blob rotation?

General discussion about topics related to OpenMV.
Posts: 1
Joined: Wed Nov 21, 2018 6:58 am

blob rotation?

Postby Stinde » Wed Nov 21, 2018 7:19 am

How can I get full 360deg rotation angle of this kind of dial?
I can detect the blob and get the rotation angle between 0-180 deg. When the dial is pointing upper half the angle has 180 deg error.

dial.PNG (32.24 KiB) Viewed 1755 times
User avatar
Posts: 4111
Joined: Sun May 24, 2015 2:10 pm

Re: blob rotation?

Postby kwagyeman » Wed Nov 21, 2018 9:44 am

Um, there's no way mathematically to get a better angle than 0-180 with our code by default. The cross-correlation doesn't have the ability to be 0-360. However, if you add some extra info you can get the full 360. For example, can you detect if the arrow is to the left or to the right (or pointing up versus down) and add 180 to the output of rotation? This should be as simple as just looking to see if the bounding box is outside a threshold.

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 3 guests