在图像上放置图像 [英] Place an image on an image

查看:110
本文介绍了在图像上放置图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我确定的坐标处捕获的视频帧上放置图像。

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

我问过,我被告知要使用 cvCopy cvSetImageROI 但我不想裁剪这些坐标我想添加另一个图像。
也许是正确的方法,但我不明白它(如果它的权利请解释它)。

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).

推荐答案

我这样做了一段时间使用SetRoi,它是这样的东西。我有两个图像,一个是缩略图thumb_frame,这是小图片我将包括在大图像show_frame

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);

就是这样。

这篇关于在图像上放置图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆