Read a depth frame from the specified path and convert it to depth values. Args: depth_frame_path (str): The full path to the depth frame file. conversion_factor (float, optional): The conversion factor to convert pixel values to depth values. Defaults to 10
(self, depth_frame_path, conversion_factor=1000)
| 544 | return color |
| 545 | |
| 546 | def read_depth_frame(self, depth_frame_path, conversion_factor=1000): |
| 547 | """ |
| 548 | Read a depth frame from the specified path and convert it to depth values. |
| 549 | |
| 550 | Args: |
| 551 | depth_frame_path (str): The full path to the depth frame file. |
| 552 | conversion_factor (float, optional): The conversion factor to convert pixel values to depth values. Defaults to 1000 to convert millimeters to meters. |
| 553 | |
| 554 | Returns: |
| 555 | (numpy.ndarray): The depth frame as a NumPy array with the depth values. |
| 556 | """ |
| 557 | |
| 558 | depth = imageio.v2.imread(depth_frame_path) / conversion_factor |
| 559 | |
| 560 | return depth |
| 561 | |
| 562 | def read_camera_intrinsics(self, intrinsics_file_path, format="tuple"): |
| 563 | """ |