views:

130

answers:

3

Hi, 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

thanks y.m

A: 

First, check Adding Two Images with Different Size.

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.

karlphillip
A: 

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.

Utkarsh Sinha
A: 

Hi, I have got the homography matrix. Now i want to stitch or blend the two images together.Am not really understanding how to go about with it. Any help is greatly appreciated.

Regards Biju

Biju