![]() For example, in modern smartphone cameras, we have an automatic option to create high-resolution panorama images. Highlights: Nowadays, we use a number of different photo editing applications. The correct way is to first calculate the maximum offset in x. It worked in my previous case because there was almost no rotation, only translation. ![]() In fact, setting the translation part to zero in the homography matrix part is not right. You can also calculate the new coordinates of the image after the warping using perspectiveTransform: std::vector corners(4) Ĭorners = cv::Point2f(ls, img2.rows) Ĭv::perspectiveTransform(corners, cornersTransform, H) įinally, the result of the stitching I can successfully process: After, I paste the first image not in (0,0) but in (offsetX, offsetY): My solution would be to put 0 for t_x or t_y if they are negative for the homography matrix and use it to warp the image. We can see that the translation in y is negative. To copy/paste the images, in pseudo-code: for each new image ,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |