get_distance (int x, int y) of rs2::depth_frame does not support interpolation
It looks the get_distance(int x, int y) of rs2::depth_frame does not support interpolation because the parameter type is int. If I detect some key point with sub-pixel accuracy on the left infrared image and then want to get its 3D position, I can get the distance first and then use the rs2_deproject_pixel_to_point to get the position. However since the get_distance() does not support interpolation, it looks the sub-pixel accuracy cannot reach.
The way I can think to reach sub-pixel accuracy is to get the distance for the four pixels surrounding the key point and then do interpolation myself. The other way is to detect the key point on both the left and right infrared image with sub-pixel accuracy and then do triangulation myself to find the intersection.
Thanks for sharing your ideas in Intel® RealSense™ community!
Please refer to rs-align Sample from Sample Code for Intel® RealSense™ cameras for more information on sampling via interpolation.
Intel Customer Support
Please sign in to leave a comment.