OpenCV warpperspective

后端 未结 9 2351
孤城傲影
孤城傲影 2020-12-01 05:45

For some reason whenever I use OpenCV\'s warpPerspective() function, the final warped image does not contain everything in the original image. The left part of the image see

9条回答
  •  生来不讨喜
    2020-12-01 06:25

    I have done one method... It is working.

      perspectiveTransform(obj_corners,scene_corners,H);
    int maxCols(0),maxRows(0);
    
     for(int i=0;i

    I just find the maximum of the x points and y points respectively and put it on

    warpPerspective( tmp, transformedImage, homography, Size( maxCols, maxRows ) );
    

提交回复
热议问题