Hello to all,
I have a depth map extracted from a kinect recording via the kinect azure sdk.
I extracted it well. I wrote a GLSL shader to get the depth.
But for the moment impossible to use the Lens Distort TOP to remove the lens distortion.
My point cloud is still stretched towards the camera.
Does anyone have an idea?
Here is a zip of the toe and the depth map.
RemoveDistor.zip (327.4 KB)
I took a look at your network and I think the issue may be that the kinect azure depth map is already in z space rather than a distance from the camera. So in your shader you can just do z = d, rather than the sqrt method you’re doing now.
There are also a few issues with the way you’re using the lens distort top. The optical center from the kinect is in absolute pixels (measure from the corner) rather than relative pixels (from the center) as you have it set. And, the focal lengths are measured in pixels and you’ve currently got the unit set to fraction.
Most importantly, I think you also need to toggle the ‘Invert Distortion’ button on the top to remove distortion using those values. I’d also suggest putting the lens distort directly after the depth map and before the projection.
With that said, in my testing the len distort top does a lot of interpolation that creates a lot of noise in the depth map which is probably worse than any distortion in the source.
If it’s helpful, I made this simple component awhile ago that does depth projection without any shader code: depthProjection.tox (1.2 KB)
Hope that helps. Let me know if you have any questions.