blob rotation?

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

blob rotation?

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

Hi
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.

Timo
Attachments
dial.PNG
dial.PNG (32.24 KiB) Viewed 872 times
User avatar
kwagyeman
Posts: 2993
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.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 6 guests