Open3D
Open3D copied to clipboard
linear depth for orthographic projection with CaptureDepthFloatBuffer
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.