简体   繁体   English

用更大尺寸的图像替换(OpenCV)

[英]Replacing Image with that of a bigger size (OpenCV)

I'm doing image stitching on a video and this is basically how my loop works: frame1 + frame2 = stitched replace frame1 as stitched and repeat loop. 我正在对视频进行图像拼接,这基本上就是我的循环工作的方式:frame1 + frame2 =缝合将frame1替换为已缝合并重复循环。

I tried resizing frame1 to the size of stitched and then using stitched.copyTo(frame1) but that doesn't seem to work. 我尝试将frame1的大小调整为stitched的大小,然后使用stitched.copyTo(frame1),但这似乎不起作用。 :( :(

Do you guys have any suggestions? 你们有什么建议吗?

Thanks in advance! 提前致谢!

// Free data allocated for frame1
frame1.release();

// Clone stiched image
frame1 = stiched.clone();

I have not been working with OpenCV in a long time, but here's my sugesstion 我已经很长时间没有使用OpenCV了,但是这是我的建议

Assuming you stitched the two images sucessfully, the MAT stiched should be the resulting image. 假设您成功拼接了两个图像,则stiched的MAT应该是结果图像。 So, instead of copying stitched to frame1, stitched.copyTo(frame1) , why not just imshow(stitched) ? 所以,为什么不将imshow(stitched)复制到缝合到frame1的stitched.copyTo(frame1) imshow(stitched)呢?

Give us what you have done so far, so we can understand your question better :D 请给我们您到目前为止所做的一切,以便我们更好地理解您的问题:D

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

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