Kinect depthmap mask


i converted the kinect depthmap via levels to a greyscale texture. is it possible to define a min max threshold to get a black & white mask of a defined area?

using levels, you can swap outputs , black into white and viceversa, then use the inputs value to determine wich threshold level apply to depth.

ok, but its an extemely small tolerance to do this, test files attacht.

the next problem would be to delete the IR reflextions in the background… the appear white, like the foreground. how can I prevent this? (586.8 kB)

This should do the trick, it’s part of my custom depth camera stuff I have been totally derelict in posting.

It will turn a raw depth image into an inverted greyscale spanning the min and max input pins (set in MM). Normally it will make the greyscale start at 1 at min, going linearly to 0 at max.

There is a “pedestal” input pin that sets the minimum level of the greyscale, so if you set it to 1, then it will only output a black/white image. For example, if you set pedestal to 1, min to 0, and max to 1000, then everything within 1 meter will be white, everything else black. By setting min to say 990, then only things from .99 to 1 meter will be white.

DepthCamGrey.fx (3.4 kB)

Oh, be sure to set the Depth Mode to Raw on the Depth node.

it works fine for me, how can I delete “lonely pixels” means small reflextions or wholes from eyeglasses? bluring and adjusting the contrast?

Hi mediadog
this is very usefull effect, far better than Depth-histogram thing alone. I think you should put it into contribution! Thanks a lot for this!
I wonder what elese have you been derelict in posting?

you can address certain depths with the colorramp fx set to luma