-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D435i: Getting inconsistent frames for depth and color when aligned to depth #8726
Comments
Hi @adharma1 If you have depth, RGB and IMU (gyro / accel) enabled simultaneously then that would be the first aspect of the program that I would recommend investigating if you are experiencing performance problems. Performance can be improved if you use two pipelines and put the IMU on one pipeline on its own and depth & color on a second pipeline. The subject is discussed on the link below in regard to C++. Alternatively, you can use callbacks instead. Edit: if you are attempting to record aligned depth and color frames to the bag then this will not work because bags recorded in the RealSense SDK do not save aligned frames, only the individual streams. Alignment is performed by loading the pre-recorded bag file into memory and then applying alignment to the depth and color frames in real-time. |
@MartyG-RealSense, I am also seeing that number of frames received for depth and color are also different, is there a way to ensure I get same # of frames? |
The comments linked to below provide good introductory information about the subject of RGB-Depth sync and how to enforce a constant FPS rate. Please do feel free to ask further questions after reading the above links. |
Is there any sample code for "Alignment is performed by loading the pre-recorded bag file into memory and then applying alignment to the depth and color frames in real-time."? |
The RealSense SDK has an example C++ depth-color alignment program called align-advanced: https://github.com/IntelRealSense/librealsense/tree/master/examples/align-advanced Although it uses live camera data by default, the SDK examples can be modified to use a recorded bag as their data source instead of a live stream, as described on the SDK's Sample Data archive of bag test-files. https://github.com/IntelRealSense/librealsense/blob/master/doc/sample-data.md |
Hi @adharma1 Do you require further assistance with this case, please? Thanks! |
@MartyG-RealSense I am good for now. Thanks! We can close the issue |
Great, thanks very much @adharma1 for the update. As suggested, I will close the case now. Thanks again! |
Issue Description
I am using the sample code attached to get the depth and color messages and saving them into a rosbag. # of frames received for color and depth are not matching.
here is the sample code
The text was updated successfully, but these errors were encountered: