Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

linear depth for orthographic projection with CaptureDepthFloatBuffer

Open bkanchan6 opened this issue 6 years ago • 0 comments

For orthograph projection, when we get depth float buffer with CaptureDepthFloatBuffer, I was expecting depth to be linearly converted from normalized device coordinate system to eye coordinate system. However, it converts them non-linearly (as needed for perspective projection) https://github.com/intel-isl/Open3D/blob/master/cpp/open3d/visualization/visualizer/VisualizerRender.cpp#L321. I think it should be handled in different manner for orthographic projection.

z_depth = (double)p_depth[j] * (z_far - z_near) + z_near;

Please correct me if wrong and if the difference between orthographic and perspective projection for converting p_depth to z_depth is handled else where.

bkanchan6 avatar Sep 10 '20 19:09 bkanchan6