Transformation point with perspective transformation matrix

I have the coordinates of a quadrangle that was photographed from two different points of view. In addition, I have the coordinates of one Point, but only from one of two points of view. I need to convert the coordinates of this point to perspective when the second photo of the rectangle was taken. Do it i am using opencv

I calculated the perspective transformation matrix:

cv::getPerspectiveTransform(quad1, quad2); 

My problem is that I really don’t know how to convert the Point with the calculated matrix of perspective transformations. This is probably pretty simple, but I just don't know how to do it.

+4
source share
1 answer

I recommend the new OpenCV forum for OpenCV related questions, where I answered a very similar question with a small code example.

But mostly using

 void perspectiveTransform(vector<Point2f> origPoints, vector<Point2f> transformedPoints, Mat h) 

function.

+6
source

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


All Articles