Place an image on an image


I want to place an image on a captured video frame at the coordinates which I determined.

I asked that before and I have been told to use cvCopy and cvSetImageROI but I dont want to crop on those coordinates I want to add another image. Maybe it's the right way but I didn't understand it (if its right please explain it).

1/29/2012 9:01:29 PM

I did this a while ago using SetRoi, it was something like this. I have two images, one is a thumbnail called thumb_frame that is the small picture I will include in the large image show_frame

//I set the ROI to the same size as the thumb_frame
cvSetImageROI(show_frame.image, cvRect(thumbnail_x_pos,
                    thumbnail_y_pos, thumb_frame->width, thumb_frame->height));

//I add the image to the designated ROI
cvAddWeighted(thumb_frame, alpha, show_frame, beta, 0, show_frame);

That's about it.

12/11/2009 2:03:51 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow