Functions | |
| def | calculate_boundingbox_points (point_cloud, calibration_info_devices, depth_threshold=0.01) |
| def | calculate_cumulative_pointcloud (frames_devices, calibration_info_devices, roi_2d, depth_threshold=0.01) |
| def | visualise_measurements (frames_devices, bounding_box_points_devices, length, width, height) |
| def measurement_task.calculate_boundingbox_points | ( | point_cloud, | |
| calibration_info_devices, | |||
depth_threshold = 0.01 |
|||
| ) |
Calculate the top and bottom bounding box corner points for the point cloud in the image coordinates of the color imager of the realsense device
Parameters:
-----------
point_cloud : ndarray
The (3 x N) array containing the pointcloud information
calibration_info_devices : dict
keys: str
Serial number of the device
values: [transformation_devices, intrinsics_devices, extrinsics_devices]
transformation_devices: Transformation object
The transformation object containing the transformation information between the device and the world coordinate systems
intrinsics_devices: rs.intrinscs
The intrinsics of the depth_frame of the realsense device
extrinsics_devices: rs.extrinsics
The extrinsics between the depth imager 1 and the color imager of the realsense device
depth_threshold : double
The threshold for the depth value (meters) in world-coordinates beyond which the point cloud information will not be used
Following the right-hand coordinate system, if the object is placed on the chessboard plane, the height of the object will increase along the negative Z-axis
Return:
----------
bounding_box_points_color_image : dict
The bounding box corner points in the image coordinate system for the color imager
keys: str
Serial number of the device
values: [points]
points: list
The (8x2) list of the upper corner points stacked above the lower corner points
length : double
The length of the bounding box calculated in the world coordinates of the pointcloud
width : double
The width of the bounding box calculated in the world coordinates of the pointcloud
height : double
The height of the bounding box calculated in the world coordinates of the pointcloud
Definition at line 70 of file measurement_task.py.
| def measurement_task.calculate_cumulative_pointcloud | ( | frames_devices, | |
| calibration_info_devices, | |||
| roi_2d, | |||
depth_threshold = 0.01 |
|||
| ) |
Calculate the cumulative pointcloud from the multiple devices
Parameters:
-----------
frames_devices : dict
The frames from the different devices
keys: str
Serial number of the device
values: [frame]
frame: rs.frame()
The frameset obtained over the active pipeline from the realsense device
calibration_info_devices : dict
keys: str
Serial number of the device
values: [transformation_devices, intrinsics_devices]
transformation_devices: Transformation object
The transformation object containing the transformation information between the device and the world coordinate systems
intrinsics_devices: rs.intrinscs
The intrinsics of the depth_frame of the realsense device
roi_2d : array
The region of interest given in the following order [minX, maxX, minY, maxY]
depth_threshold : double
The threshold for the depth value (meters) in world-coordinates beyond which the point cloud information will not be used.
Following the right-hand coordinate system, if the object is placed on the chessboard plane, the height of the object will increase along the negative Z-axis
Return:
----------
point_cloud_cumulative : array
The cumulative pointcloud from the multiple devices
Definition at line 14 of file measurement_task.py.
| def measurement_task.visualise_measurements | ( | frames_devices, | |
| bounding_box_points_devices, | |||
| length, | |||
| width, | |||
| height | |||
| ) |
Calculate the cumulative pointcloud from the multiple devices
Parameters:
-----------
frames_devices : dict
The frames from the different devices
keys: str
Serial number of the device
values: [frame]
frame: rs.frame()
The frameset obtained over the active pipeline from the realsense device
bounding_box_points_color_image : dict
The bounding box corner points in the image coordinate system for the color imager
keys: str
Serial number of the device
values: [points]
points: list
The (8x2) list of the upper corner points stacked above the lower corner points
length : double
The length of the bounding box calculated in the world coordinates of the pointcloud
width : double
The width of the bounding box calculated in the world coordinates of the pointcloud
height : double
The height of the bounding box calculated in the world coordinates of the pointcloud
Definition at line 147 of file measurement_task.py.