How do you use OpenCV to find horizontal angle and vertical angle from the center of an image to the center of a rectangular contour?

asked 2018-07-05 12:04:08 -0600

I need a turret to rotate to a certain point using a camera, so I need angles.

edit retag flag offensive close merge delete

Comments

1

Are you familiar with the dot product operation? https://www.mvps.org/directx/articles...

sjhalayka gravatar imagesjhalayka ( 2018-07-05 14:16:02 -0600 )edit

Yes, but I don't know what that has to do with dot product.

OpenCVNoob69 gravatar imageOpenCVNoob69 ( 2018-07-05 14:43:35 -0600 )edit

PLEASE HELP SHAWN!

OpenCVNoob69 gravatar imageOpenCVNoob69 ( 2018-07-05 14:47:55 -0600 )edit

SHAWN!!! HELP!!!

OpenCVNoob69 gravatar imageOpenCVNoob69 ( 2018-07-05 14:48:25 -0600 )edit

It says right on that page how to get the angle from the two vectors. Have fun!

sjhalayka gravatar imagesjhalayka ( 2018-07-05 14:51:41 -0600 )edit

HALAYKA WALA BABU!

OpenCVNoob69 gravatar imageOpenCVNoob69 ( 2018-07-05 14:52:17 -0600 )edit

Yes, but what are the vectors?

OpenCVNoob69 gravatar imageOpenCVNoob69 ( 2018-07-05 14:52:47 -0600 )edit

I have 2 points, not vectors!

OpenCVNoob69 gravatar imageOpenCVNoob69 ( 2018-07-05 14:53:02 -0600 )edit

How to get the vectors?

OpenCVNoob69 gravatar imageOpenCVNoob69 ( 2018-07-05 14:55:14 -0600 )edit

It looks like I have to come to Saskatchewan itself to ask you!

OpenCVNoob69 gravatar imageOpenCVNoob69 ( 2018-07-05 14:56:19 -0600 )edit