MCPcopy Create free account
hub / github.com/SceneFun3D/scenefun3d / read_depth_frame

Method read_depth_frame

utils/data_parser.py:546–560  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 1

mainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected