Kinect Depth calculation [closed]
Sorry guys, i am desperate for answer. That is why i didn't follow the rules of this website. I sincerly apologise. For this code, i have come up with a better one. float cx = 320.0; float cy = 240.0; float minDistance = -10; float scaleFactor = 0.0021;
for (int v=0, n=0 ; v<480 ; v++)
{
for (int u=0 ; u<640 ; u++, n++)
{
Vec3f result;
result.x = float(((u - cx) * t_gamma[depth[n]]+ minDistance) * scaleFactor * (cx/cy));
result.y = float(((v - cy) * t_gamma[depth[n]]+ minDistance) * scaleFactor);
result.z = float(t_gamma[depth[n]]);
}
}
// OS X requires GLUT to run on the main thread
gl_threadfunc(NULL);
return 0;
} is this code better? i have tried to save the depth data but all the data is zero. I don't know where is the problem?
Closed for the following reason
duplicate question by
Wim
close date 2011-08-02 11:26:49
Comments



