I am using ofxKinectForWindows2 to interface with a kinectv2 device. It has a function to return an ofPixels object containing depth data for the 512x424 resolution depth image, with raw values in mm, i.e. ranging from 0 to about 4500.
My question is how to pass this array to a shader, without losing or truncating any of the information. There is a function to return a depth texture from the kinect device, but it compresses the data to a 0-255 range (and doesn’t seem to take full advantage of that range).
I am trying to do blob detection. I could perform operations on the array directly in the app, but it’s slow to generate the entire value-corrected image by looping through the depth pixels and using ofImage.SetColor(x, y, value);