Know rotation of 3 planar points - OpenCV

Viewed 67

I'm working with OpenCV and I want to track the position and movement of 3 points (leds) with my webcam.

What I really want to know is the rotation, if it's rotating to the left or to the right.

My problem is that I'm just working in 2D, I just capture XY coordinates. That means that I always have a mirror behavior when I turn left or right.

I don't know how to know that. As they are 3 points I'm working it as a triangle, I know how to calculate, angles, area, height, etc but all of this is useless because always all the changes are symmetrical in both directions.

¿There is some function in OpenCV or python to work this? I'm pretty sure it has an easy solution, but my head is going to exploit.

I attach some pictures.

I can't attach code because it isn't a code problem, the problem is that I don't know how to do it.

Things that I had probe:

  • Compare coordinates points of the actual frame and the before
  • Compare barycentre
  • Compare angles
  • Compare area of the points (I think maybe here is the solution because although is 2D, you can see one of the bottom point bigger than the other one).

[front][1]

[Turn right][2]

[Turn left][3]

It's my first post, and sorry for my english! Thanks!!

0 Answers
Related