Kinect depth problem

Started by
1 comment, last by sensate 8 years, 1 month ago

I'm trying to convert depth data to pixels(8 bit).

I tried the default formula:

BYTE intensity = static_cast<BYTE>((depth >= nMinDepth) && (depth <= nMaxDepth) ? (depth % 256) : 0);

pRGBX->rgbRed = intensity;
pRGBX->rgbGreen = intensity;
pRGBX->rgbBlue = intensity;
However that has a lot of banding issues. I need to get rid of the banding.
So what I did was take the min & max depth values from the kinect, and use them to normalize any depth value the kinect sends me.
After that I would just multiply the normalized value with 255.
Result:
Kinect_Screenshot_Depth_09_05_28.png
The banding is gone however there are still issues such as: there's not much diversity in range, i mean the values are either very close to black, or quite close to white. And most importantly, the artifacts, especially those in the upper right corner.
Any ideas for improvements?
Advertisement
I dunno, that seems to have plenty of dynamic range to me. You are talking about a 0-255 gradient, so there's only so much visual data you can capture.

Looks more like a calibration problem to me, although I have no idea how configurable the Kinect sensors are.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

NUI data is 16 bits with 3 reserved bits for player masks.

I.e., the conversion looks like: (((unsigned short*)depthPixels)[(((i * depthWidth)+j))] >> 3)

Which means that if you want to destroy your data and convert to 8 bit, that you need to scale by 2^13-1 instead of 2^8-1.

awfulDepth = (((kinectDepth >> 3) / 2^13-1)) * (2^8-1).

Why on earth you would want to do this is beyond me, but good luck.

This topic is closed to new replies.

Advertisement