Speed up D455 camera on the Raspberry Pi
Dears,
I want to capture the both color and depth images from the D455 camera on the Raspberry Pi platform. I'm currently using the following Python code to capture the data. However, the alignment process takes around 0.1 to 0.2 seconds, which is too slow. Is it possible to capture the color and depth images separately and align them later (offline)? Alternatively, can I save the whole frame from the D455 and process it offline? How can I work around this issue?"
align = rs.align(rs.stream.color)
aligned_frames = align.process(frames) ->takes 0.1~ 0.2 seconds on Raspberry Pi
aligned_color_frame = aligned_frames.get_color_frame()
aligned_depth_frame = aligned_frames.get_depth_frame()
-
Hi Bobcatkai If you record the color and depth into a bag file then the streams will be stored separately. The bag file can then be loaded back into the computer and have alignment applied to the recorded streams in real-time. A bag file is like a video recording that contains raw camera data, so it will store all of the frames that were produced during the duration of a recording session.
An alternative to aligning the entire image that has faster processing is to convert a single specific color pixel into a depth pixel using the SDK's rs2_project_color_pixel_to_depth_pixel instruction. A Python script that demonstrates use of the instruction can be found at the link below.
https://github.com/IntelRealSense/librealsense/issues/5603#issuecomment-574019008
-
Hi MartyG,
Thank you for the reply.
I came across an issue on GitHub (https://github.com/IntelRealSense/librealsense/issues/946) where a RuntimeError occurs after capturing a certain number of frames from the camera. It seems to stop at 15 frames. I'm curious to know if this issue has been resolved or if it's occurring in my case.
Please sign in to leave a comment.
Comments
3 comments