This sample demonstrates the ability to use the SDK for aligning multiple devices to a unified co-ordinate system in world to solve a simple task such as dimension calculation of a box.
This code requires Python 3.6 to work and does not work with Python 2.7.
Place the 2 cameras in a similar way as the picture
Place the calibration chessboard object into the field of view of all the Intel RealSense cameras. See example for a target below.
Update the chessboard parameters in the script according to the target size, if using a different target than the one used for this demo here.
6 x 9 chessboard
chessboard_width = 6 # squares chessboard_height = 9 # squares square_size = 0.0253 # meters
Start the program. Allow calibration to occur and place the desired object ON the calibration object when the program asks for it. Make sure that the object to be measured is not bigger than the calibration object in length and width.
The length, width and height of the bounding box of the object is then displayed in millimeters.
Note: To keep the demo simpler, the clipping of the usable point cloud is done based on the assumption that the object is placed ON the calibration object and the length and width is less than that of the calibration object.
Once the calibration is done and the target object's dimensions are calculated, the application will open as many windows as the number of devices connected each displaying a color image along with an overlay of the calculated bounding box. In the following example we've used two Intel® RealSense™ Depth Cameras D435 pointing at a common object placed on a 6 x 9 chessboard.
Updated 7 months ago