What distance does the camera show
Hi! Can you tell me if the D435 camera measures the distance to the plane in which the object is located or directly to the object itself? The picture shows it. That is, the camera measures X distance or Y distance, provided that the object is at the side of the camera
-
If you are writing your own program script to find the distance then you could use the RealSense SDK's get_distance() instruction to receive the distance in real-world meters.
If you also measure with a tape measure from the front glass of the camera to the object then that should also provide you with the rough distance between camera and object, regardless of the method that the camera uses to calculate the distance.
In addition, if you have installed the RealSense SDK with its tools and examples included in the installation then you can find a pre-made program called rs-hello-realsense that will provide the distance to an object in meters as a plain-text value with no graphics. The program should be at the following folder locations on Windows and Linux.
Windows
C: > Program Files (x86) > Intel RealSense SDK 2.0 > Tools
Linux
usr/local/bin
-
The C++ source code for rs-hello-realsense makes use of the get_distance() instruction.
For the RealSense Python wrapper the RealSense SDK provides a beginner example that uses the instruction.
-
get_distance() will give you the real-world distance measured in meters from the front glass of the camera to a coordinate on the depth image.
The alternative method of finding the distance is to retrieve the raw depth value of a pixel and then convert it to real-world meters by multiplying the raw depth value by the depth unit scale of the camera, which for most RealSense 400 Series camera models is '0.001' (meters). The link below compares the two methods (get_distance() and raw depth value x depth unit scale).
https://github.com/IntelRealSense/librealsense/issues/7264
Please sign in to leave a comment.


Comments
8 comments