5

I have the coordinates of a quadrilateral which was photographed out of two different perspectives. Furthermore I have the coordinates of one Point but only from one of the two perspectives. I need to transform the coordinates of this point to the perspective the second photograph of the rectangle was made. Do do this I use OpenCV

I've calculated the Perspective Transform Matrix:

cv::getPerspectiveTransform(quad1, quad2);

My Problem now is that I don't really know how to transform the Point with the calculated Perspective Transform Matrix. This is probably quite simple but I just don't know how to do it.

Averius
  • 165
  • 1
  • 2
  • 13

1 Answers1

7

I recommend the new OpenCV forum for OpenCV-related questions, where I answered a very similar question with a little sample code.

But basically, it's using the

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

function.

Ben
  • 4,486
  • 6
  • 33
  • 48