Prospective transformation

I am assigned X, Y, Z locations at 4 corners in the rectangle and their X, Y locations in the image. I would like to use these locations to find the camera angle with a rectangle. For example, if I look at the rectangle on the right, it will look like a trapezoid, and the right edge is much longer than the left. Thus, I believe that there should be an algorithm that can find the angles that I am relative to the rectangle.

I am coding on android and I am using the opencv and opengl libraries. I saw the appropriate algorithms in opencv, but they do not do exactly what I need. Any helpful tips would be greatly appreciated.

+4
source share
2 answers

I found that the solvePnP method in opencv will do exactly what I need.

+1
source

Look at the 3D forecast and try to get the inverse algorithms. Also, read the OpenGL FAQ , as this is a frequently asked question.

Or take a look at the Red Book review chapter ( link to Amazon ). In particular, the last headline is what you asked for.

0
source

All Articles