Calculate 2D angles for 3D objects in perspective

Imagine a photograph with the face of a building highlighted.

Given the fact that the face of the building is a rectangle with angles of 90 degrees. However, since this is a photograph, the perspective will be activated and the parallel edges of the face will converge on the horizon.

With such a rectangle, how do you calculate the angle in 2D vectors of the edges of a face that is perpendicular to it?

In the image below, the face marked in the photo is blue, and I’m wondering how to calculate the two-dimensional vector of the red lines of another face:

example http://img689.imageshack.us/img689/2060/leslievillestarbuckscor.jpg

So if you ignore the picture for a moment and concentrate on the lines, is there enough information in one of the facial contours - the inner corners, etc. - to find out the path of the face on the other side of the corner? What will be the formula?

example

We know that both are rectangles, that is, each corner has a right angle, and that they are at right angles to each other. So, how do you determine the second person vector using only knowledge of the position of the first person?

+3
source share
2 answers

It is quite simple, you should use the basic rules of 2 perspective points .

2 , . .

alt text http://img62.imageshack.us/img62/9669/perspectiveh.png

, ( ) ( ), , (, , : , )

0

, Hough Transform . , , . , .

, , " " ; .

Matlab .

0

Source: https://habr.com/ru/post/1742864/


All Articles