Place an image on an image

前端 未结 4 1761
隐瞒了意图╮
隐瞒了意图╮ 2020-12-29 14:34

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

4条回答
  •  余生分开走
    2020-12-29 14:54

    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.

提交回复
热议问题