Hi,
I used libfreenect to read the Kinect data. my problem is after getting the depth map how can i draw it using Cinder. sorry I'm a newbie with Cinder
I tried:
ci::Surface8u mSurface=ci::Surface8u(640,480,false);
Area area( 0, 0, 640, 480 );
Surface::Iter iter = mSurface.getIter( area );
int i = 0 ;
while( iter.line() )
{
while( iter.pixel() )
{
iter.r() = pDepthFront[i];
iter.g() = pDepthFront[i];
iter.b() = pDepthFront[i];
i++;
}
}
depthTexture=gl::Texture(mSurface,gl::Texture::Format());
if( depthTexture )
gl::draw(depthTexture,getWindowBounds());
and
gl::Texture depthTexture = gl::Texture(pDepthFront,GL_RGB,640,480,gl::Texture::Format()) ;
the depth map is gray scale. What do you suggest?
Thanks,
Hadi