(Regression) Camera Parameters All Zeros in v2 SDK
PyOrbbec SDK Version: 2.0.6 (Latest as of time of writing) OrbbecSDK Version: 2.1.1(Latest as of time of writing) Camera: Femto Bolt Camera FW Version: Both 1.1.2 (Latest as of time of writing) and 1.0.9 (The latest documented supported firmware)
Platform: Ubuntu 22.04 (Docker) running on Ubuntu 24.04 (Host)
When attempting to get the camera parameters (intrinsics), the return values for pipeline.get_camera_param() as seen in Orbbec's example here are all zeros:
This blocks our implementation of the v2 SDK in Python. Is there an undocumented new method for getting camera parameters?
More info: The Orbbec SDK via Orbbec Viewer appears to get intrinsics without an issue as seen below:
same here, did you figure it out?
seems like in their example "save_pointcloud_by_o3d.py", the function works well
This is the same issue as the one in the following link: https://github.com/orbbec/pyorbbecsdk/issues/56
Has anyone found a solution to this?
@KySmith1 @TIMESTICKING @importnumpy The issue is that the Femto series does not support hardware D2C, and you have to switch to software D2C. Try using the code as follows:
config = Config()
config.set_align_mode(OBAlignMode.SW_MODE) # using software D2C
# pipeline.enable_frame_sync() # optional but suggest
pipeline.start(config)
When using the v2-main branch, the recommended way to obtain intrinsic and extrinsic parameters is from the stream profile. You can refer to the sample coordinate_transform.py.
color_frame = color_frame.as_video_frame()
depth_frame = depth_frame.as_video_frame()
color_profile = color_frame.get_stream_profile()
depth_profile = depth_frame.get_stream_profile()
print("video profile:", color_profile.as_video_stream_profile())
color_intrinsics = color_profile.as_video_stream_profile().get_intrinsic()
color_distortion = color_profile.as_video_stream_profile().get_distortion()
depth_intrinsics = depth_profile.as_video_stream_profile().get_intrinsic()
depth_distortion = depth_profile.as_video_stream_profile().get_distortion()
extrinsic = depth_profile.get_extrinsic_to(color_profile)
In my case it had to do with at which point you are taking the reading in the script, because Python is interpreted each line plays a key role in adding context to the Pipeline class. A simple for loop placed after starting the stream solved the zeroing error for me:
global stop_rendering start_streams(pipelines, configs) for i in range(len(pipelines)): camera_param = pipelines[i].get_camera_param() print(f"This is the color parameters of device {i}:\n {camera_param.rgb_intrinsic}") print(f"This is the depth parameters of device {i}:\n {camera_param.depth_intrinsic}")
Let me know if this doesn't fix the issue for you.