通过Opencv混合两个图像 [英] blending two images by Opencv
问题描述
我想使用Opencv对齐两个不同大小的图像,
确实,cvAddWeighted函数可以让我们组合或混合
相同大小的两个图像,这不是我的情况!
所以我需要帮助,如果有人知道如何使用
实现此功能,考虑到图像的不同尺寸
I want to align two images of different sizes using Opencv, Indeed the function cvAddWeighted enables us to combine or blend two images of identical sizes which is not my case ! so I need a help if somebody knows how to implement this function with considering the different sizes for images
谢谢
ym
thanks y.m
推荐答案
首先,检查添加两个不同大小的图像。
另一种方法是设置感兴趣的区域更大的图像使用较小的宽度/高度(cvSetImageROI()将这样做),然后执行与cvAddWeighted()的混合。您可以找到一些源代码来执行此操作并此处。
Another way to do it would be to set the region of interested on the bigger image using the width/heigh of the smaller (cvSetImageROI() will do that), and then perform the blend with cvAddWeighted(). You'll find some source code to do that and here.
这篇关于通过Opencv混合两个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!