"Using Pre-Recorded Data for Box Measurement and Multi-Camera Calibration in Python"
Hello,
I am working with the Box Measurement and Multi-Camera Calibration example provided in the Intel RealSense Python code. I would like to know if it is possible to measure the dimensions of an object using this example without having access to a RealSense camera.
Specifically, I am exploring whether pre-recorded data (e.g., .bag
files) can be used instead of live camera feeds to perform the measurements.
Here are my key questions:
- Can the example code be modified to work with
.bag
files as input instead of live camera streams? - If yes, what changes would be required in the code to enable this?
I am using the following setup:
- Python Version: Python 3.10.12
- Operating System: Ubuntu 22.04.5 LTS
Any guidance, suggestions, or references to similar implementations would be greatly appreciated.
Thank you in advance for your help!
-
Hi Araj7322 You can use a pre-recorded bag file as the data source in a script instead of a live camera simply by inserting an enable_device_from_file() config instruction directly before the pipeline start line of the script. This principle is demonstrated in the RealSense SDK's Python example script read_bag_example.py
-
Thank you, MartyG. Can we calculate the 3D dimensions of an object using the Box Dimensioner Multi-Cam code in Python with a pre-recorded
.bag
file? If so, how can we implement that? Also, since only limited.bag
pre-recorded files are available, are there any additional.bag
files available that can be used for this task? -
I cannot recall a previous case where bag files have been used instead of a live camera with the box_dimensioner_multicam project. It may still work though if you try adding a bag import instruction to the project's code.
Some official sample bag files for testing can be found at the link below.
https://github.com/IntelRealSense/librealsense/blob/master/doc/sample-data.md
I would expect though that those bags would not be useful for use with box_dimensioner_multicam though as they are not focused on a box object.
Please sign in to leave a comment.
Comments
5 comments