blending two images by Opencv

后端 未结 3 1551
执念已碎
执念已碎 2021-01-21 17:18

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 !

3条回答
  •  佛祖请我去吃肉
    2021-01-21 17:42

    I'm guessing you have two images that need to be aligned. You'll also have the amount one image needs to be displaced by.

    You can create a new image that can contain both the images after being displaced. This means, it would be the height of the original image+vertical displacement and its width would be width of original*2-horizontal displacement.

    Then you can set ROIs on this image and copy images.

提交回复
热议问题