简体   繁体   English

视频中的Opencv Mosaic

[英]Opencv Mosaic from video

I need to do the same thing of this video https://youtu.be/59RJeLlDAxQ but in Opencv. 我需要对视频进行同样的操作https://youtu.be/59RJeLlDAxQ,但在Opencv中。 For now I'm doing this thing http://ramsrigoutham.com/2012/11/22/panorama-image-stitching-in-opencv/ with a little modify in the final image merging, but it doesn't work very well. 现在,我正在做此事http://ramsrigoutham.com/2012/11/22/panorama-image-stitching-in-opencv/在最终图像合并中稍作修改,但效果不佳。 How can I proceed? 我该如何进行?

EDIT For testing I'm using the video lab from this page http://www.cs.ucsb.edu/~holl/CS290I/Assignments/Assignments-3/Assignment3Mosaicing.html 编辑为了测试,我正在使用此页面上的视频实验室http://www.cs.ucsb.edu/~holl/CS290I/Assignments/Assignments-3/Assignment3Mosaicing.html

I ran my code on that video and I obtain this: 我在该视频上运行了代码,并获得了以下信息: 在此处输入图片说明

It's not very accurate but its ok.If I let the program run, at a certain point my stitcher produce this: 这不是很准确,但是还可以。如果我让程序运行,那么我的订书机在某个时候会产生以下结果: 在此处输入图片说明 .

For the stitching ROIs instead of the ramsrigoutham.com ones I'm using this: 对于拼接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);

The link you mentioned is access denied http://www.cs.ucsb.edu/~holl/CS290I/Assignments/Assignments-3/Assignment3Mosaicing.html . 您提到的链接被拒绝访问http://www.cs.ucsb.edu/~holl/CS290I/Assignments/Assignments-3/Assignment3Mosaicing.html

what are ' img_loop ' and ' Vimg ' and ' rimg ' in your code? 您的代码中的“ img_loop ”,“ Vimg ”和“ rimg ”是什么? 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 您的代码和链接的代码之间有一些区别。如果可以解释一下,以便我解决您的问题,请让我在opencv中做同样的事情

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM