Closed linxizi closed 2 days ago
Hi @linxizi If you have converted 2D pixel coordinates into 3D world coordinates with the instruction rs2_deproject_pixel_to_point then you can convert the 3D points back to 2D pixel coordinates with the instruction rs2_project_point_to_pixel
The link below has an example of a RealSense Python script for deprojecting 2D to 3D, and then projecting 3D back to 2D.
depth_point = rs.rs2_deproject_pixel_to_point(depth_intrin, depth_pixel, depth_scale)
color_point = rs.rs2_transform_point_to_point(depth_to_color_extrin, depth_point)
color_pixel = rs.rs2_project_point_to_pixel(color_intrin, color_point)
In regard to an interface, do you mean that you would like to perform the 3D to 2D conversion through a graphical user interface (GUI) please? If so then there are only a limited number of available ways to do so.
One way would be to use pyglet, as demonstrated by the RealSense SDK's 'pyglet_pointcloud_viewer.py' example program:
The other way would be to use Tkinter.
Hi @linxizi Do you require further assistance with this case, please? Thanks!
Case closed due to no further comments received.
During the project process, we want to convert the world coordinate system of known points into a pixel coordinate system through an interface, But I can't find any interface in the python language