Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getDepthPixelsRed() depth buffer strange behavior #6

Open
teemWerk opened this issue Nov 8, 2013 · 1 comment
Open

getDepthPixelsRed() depth buffer strange behavior #6

teemWerk opened this issue Nov 8, 2013 · 1 comment

Comments

@teemWerk
Copy link

teemWerk commented Nov 8, 2013

I don't know what the deal is, maybe I'm missing something, but every time I try to manipulate the pixels in the depth buffer, I don't end up working with the image I think I am. I end up manipulating three smaller copies of the depth frame that don't match at all what I think.

If I load the depth pixels into a texture that the library says it should be, e.g.

tex.loadData(kinect.getDepthPixelsRef(), GL_R8);

I get three small copies when I try to draw it, but if I do

tex.loadData(kinect.getDepthPixelsRef(), GL_LUMINANCE);

I get the image I expect. The format is GL_R8 because it's using the programmable renderer. I don't know how to get the actual pixels I am expecting from kinect.getDepthPixelsRef().

@proalias
Copy link

proalias commented Nov 8, 2013

Be aware that Kinect depth buffer image data is .... strange. It's not your standard RGB image buffer.

tex.loadData(kinect.getDepthPixelsRef(), GL_LUMINANCE);
There's extra data that needs to be trimmed off in the upper 4 bytes of each pixel, YUV conversion might accomplish that, but it's hard to say from your example. Can you post more code? Maybe a picture of your output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants