K
K
Kalombyr2020-10-24 15:05:19
Algorithms
Kalombyr, 2020-10-24 15:05:19

How to calculate perspectiveTransform over 3 points?

There is a photo from the camera (calibrated using OpenCV) of the subject.
I can find only 3 points on it (no options). Let's call it the "original" position.
I know what angle should be in reality if you draw segments between them, as well as the distances of these segments.

Then the object is rotated and moved. I need to find how much they moved and how much they turned. If all this happens in one plane, then estimateAffine2D also copes well.

But if, for example, the angle of the object is slightly raised, then the calculations are no longer accurate.

In theory, perspectiveTransform would help to restore perspective, but he needs 4 points, and I only have 3.

Can you please tell me if there are any built-in tools in OpenCV or what algorithm can be?

Now I'm looking at solveP3P, but I can't figure out what to do with the translation and rotation vectors.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2020-10-25
@gbg

The perspective transformation is a 4x4 matrix. Therefore, in order for an equation with such a matrix to be uniquely solved, 4 points must be specified.
You are unlikely to be able to "deceive" mathematics, since you have already used your knowledge of the angles and distances between the points you have (because, roughly speaking, they are stored in the coordinates of these three points).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question