/bag2png

MATLAB script to extract .png images from ROS .bag files

MIT LicenseMIT

bag2png

MATLAB script to extract .png images from ROS .bag files

Very simple code to save .png images from ROS .bag files using MATLAB. It is indicated inside the code what modifications you have to do to make it work on your bag files. It currently runs on matlab's Live Editor. Please comment or remove line #21. All due references are stated in the bibliography section.

In this code we are using the DLR S3LI dataset (Giubilato et al., 2022), which includes the bagfiles we are using to extract .PNG format images from the ROS bag messages.

EDIT Please verify the filename requirements for your needs, you might need to modify the specific name sequence to save your images for them to work correctly on your tests. For this code we are using MATLAB R2022b, as well as the ROS Toolbox v1.6.