Getting object dimension X,Y, Z from IRS D455
Hi Intel,
I have IRS D455 and wish to measure ie : a box dimension. Previously i have worked on getting 2D value of a box/square (x ,y) using single camera and OpenCV. However, as D455 is very new to me (in fact this is the 1st time playing with stereo cameras), i was wondering, would the same technique will be efficient with this camera since it can measure depth via disparity or PCL.
I am in the midst if confusion. I tried the box dimensioning sample that came with SDK but not working as it should be though its mentioned all over the forum that it should work with single IRS cameras.
I am also wondering how to obtain depth Z of an object via Python or how to obtain depth map values. The C++ rs measure was fine but is there any equivalent example that can be obtained as wrapper for Python? I plan to stick with Python this time since it's going to be easier to migrate to SBC's and code maintenance.
Correct me if am wrong.Thanks
-
Though box_dimensioner_multicam can be used with a single camera, the optimal results will be from a multi-camera setup of two or more cameras, as the program automatically calibrates all attached cameras to the chessboard. Also, if you use a custom chessboard size then the parameters in the script should be adjusted, as described in the link below.
https://github.com/IntelRealSense/librealsense/issues/3540
The program is also intended to be a demonstration example and not a commercial standard application.
An alternative approach to box measuring may be to measure the angles of the box and then calculate the distances from the angles using trigonometry. Googling for measure distance from angles provides more information about this.
The link below features a Python user who was calculating box angles using a RealSense point cloud.
https://github.com/IntelRealSense/librealsense/issues/5506
In regard to the C++ Measure example program, a RealSense user called soarwing52 created a Python conversion, which they later adapted into a more advanced measuring solution.
https://github.com/soarwing52/RealsensePython
The code of the original Measure conversion is still available as a standalone script within the larger project though in its separate functions folder.
.https://github.com/soarwing52/RealsensePython/blob/master/separate%20functions/measure_new.py
Please sign in to leave a comment.
Comments
1 comment