문제

I am using opencv and c++. I have successfully obtained the transformation matrix between images A and B based on 3 common points in the images. Now I want to apply this found transformation matrix to the whole image. I was hoping that warpAffine could do the job but it gives me this error http://i.imgur.com/T7Xl0cw.jpg. However, I used only part of the affineTransform code where it finds the warped image because I already found the transformation matrix using another method. Can anybody tell if this is the correct way to transform the whole image if I already have a transformation marix?Here is the piece of that code http://pastebin.com/HFYSneG2

도움이 되었습니까?

해결책

If you already have the transformation matrix, then cv::warpAffine is the right way to go. Your error message seems to be about the type of the transformation matrix and/or its size, which should be 2x3 float or double precision.

다른 팁

The matrix of the common points found on both images needed to be transposed and then warpAffine used

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top