2 IplImages to 1?

hi,

I have 2 IplImages and i want to join them both together side by side(left and right) into 1 IplImage…

how do i do that?

Regards
icube

Hi icube,

if you have three Images, your left image, your right image and your result image, which have the size of the two others together, then you only have to do the following:

  
cvSetImageROI(iplImageResult, cvRect(0,0,w,h));  
cvCopy(iplImageLeft, iplImageResult);  
  
cvSetImageROI(iplImageResult,cvRect(w,0,w*2,h));  
cvCopy(iplImageRight, iplImageResult);  
  
cvResetImageROI(iplImageResult);  

(w,h are the width and the height of the two input images, which have the same size in this example)

,Seven