如何在Kinect视频上叠加图像 [英] How to overlay an image on Kinect Video
问题描述
我试图在图片上放置一个图像Kinect直播视频的框架。我可以使用alpha混合机制覆盖图像。使用的IDE是Visual Studio Professional 2010.代码是用C ++开发的。我在代码中没有使用任何MFC。我是
使用Direct2D纹理。
I m trying to place an image on the colour frame of the Kinect live video. I m able to overlay the image using alpha blending mechanism.The IDE used is Visual Studio Professional 2010. The code is developed in C++.I m not using any MFCs in the code. I am
using Direct2D Texture.
使用的图像是尺寸为128 * 128的位图图像。
The image used is a bitmap image of dimension 128*128.
Kinect的分辨率为640 * 480.
The Kinect has a resolution of 640*480.
Kinect有一个渲染目标,其大小为640 * 480,因此它可以延伸到整个窗口。因此,当我尝试覆盖图像时,由于这种拉伸,它会出现5次。
The Kinect has a render target whose size is taken as 640*480 so that it stretches for the complete window. So when I try to overlay the image it appears 5 times because of this stretching.
如果我将图像大小增加到640 * 128,我会得到一个在窗口上水平拉伸的单个图像尺寸640 * 480。
If I increase the image size to 640*128 i get a single image that is stretched horizontally across the window with dimension 640*480.
我创建了一个函数,它将创建一个具有位图属性和大小等于640 * 480的渲染目标。这用于存储来自Kinect的数据,逐帧,并将其绘制到屏幕上
I have created a function that will create a render target with bitmap properties and size equal to 640*480. This is used to store the data from the Kinect, frame by frame, and draw it on to the screen
所以我认为当我覆盖图像时,它会被复制5次以满足渲染目标尺寸。
So I think when I overlay the image, it gets replicated 5 times to meet the render target size.
默认情况下,图像位于左上角位置。
By default the image is placed at the left top position.
我的怀疑是:
- 如何使用不同的函数将Kinect的渲染目标大小指定为640 * 480,将位图图像的渲染目标大小指定为128 * 128。
- 如何在特定位置为实时视频提供叠加或放置图像。
提前谢谢。
问候,
Vivek
推荐答案
您的问题是关于DX? DX不适合这里。
Your issue is about DX? DX is not suitable here.
这篇关于如何在Kinect视频上叠加图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!