来自视频的Opencv Mosaic

时间:2015-04-11 17:50:47

标签: c++ opencv image-stitching mosaic

我需要对此视频https://youtu.be/59RJeLlDAxQ做同样的事情,但在Opencv中。现在我正在做这件事http://ramsrigoutham.com/2012/11/22/panorama-image-stitching-in-opencv/并在最终图像合并中进行一些修改,但它并没有很好地工作。我该怎么办?

修改 我可以使用此页面上的视频实验室http://www.cs.ucsb.edu/~holl/CS290I/Assignments/Assignments-3/Assignment3Mosaicing.html

进行测试

我在该视频上运行了我的代码,我得到了这个: enter image description here

它不是很准确但是没问题。如果我让程序运行,在某个时刻我的缝合器产生这个: enter image description here

对于拼接ROI而不是ramsrigoutham.com,我使用它:

warpPerspective(current_frame, rImg, H, Size(current_frame.cols, current_frame.rows), INTER_NEAREST);


        Mat roi1(final_img, Rect(img_loop.cols, img_loop.rows, vImg[1].cols, vImg[1].rows));
        Mat roi2(final_img, Rect(img_loop.cols, img_loop.rows, rImg.cols, rImg.rows));
        rImg.copyTo(roi2);
        vImg[1].copyTo(roi1);

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

The link you mentioned is access deniedhttp://www.cs.ucsb.edu/~holl/CS290I/Assignments/Assignments-3/Assignment3Mosaicing.html .

what are 'img_loop' and 'Vimg' and 'rimg' in your code? there is some difference between your code and the code you linked.if it is possible explain a little so I can work on your problem , cause Im doing the same thing in opencv