Intel® NUCs
Assistance in Intel® NUC products
13317 Discussions

How to change .bag file to normal video ?

SBald8
Beginner
928 Views

Hello, I have a bag file recorded with realsense t265 camera. How to extract the bag file to any other video format. At the end I need to change the video file to extracted images

0 Kudos
9 Replies
MartyG
Honored Contributor III
741 Views

Dorodnic the RealSense SDK Manager has said regarding converting a bag to video format: "There is no built-in functionality in librealsense for this, but you can accomplish it with python + pyrealsense2 + opencv2-python script".

 

If your end goal is to extract the video into images though, you may be able to skip the video stage and convert the bag directly into a set of PNG images using the SDK's Convert tool.

 

https://github.com/IntelRealSense/librealsense/tree/master/tools/convert

0 Kudos
SBald8
Beginner
741 Views

Thanks a lot i have done it.

Could you please help me on one more issue that how to get pose data for those images?

Using Linux environment and T265 camera.

0 Kudos
MartyG
Honored Contributor III
741 Views

Usually, the pose (the orientation) of an object is obtained from live camera data. I have not encountered a case where the pose is calculated from a PNG file.

 

There was a case in October 2019 where it was described how to get object orientation from a PNG image using the MATLAB computer vision software.

 

https://www.mathworks.com/matlabcentral/answers/486131-find-the-orientation-of-each-arbitrary-object-in-an-image

0 Kudos
SBald8
Beginner
741 Views

I think I was not so clear to explain, I want to do Odometry with realsense T265 for that I need pose file for my dataset , so is there any way to get pose by making video from that camera, or taking single image from that camera and obtain pose file.

Ultimately need a method to get pose file.

0 Kudos
MartyG
Honored Contributor III
741 Views

You can get the pose of an object observed by the T265 camera using Apriltags (tags applied to the surface of an object that you want to track). The SDK has an example program for this.

 

https://github.com/IntelRealSense/librealsense/tree/master/examples/pose-apriltag

 

An example of a use of Apriltags is attaching tag stickers or print-outs to construction machinery and observing the movements of a part of the machine such as a digger bucket.

 

Apriltags can also be used on robots for tracking. For example, navigating a robotic boat towards a dock with Apriltags on it or following another robot with an Apriltag applied to its rear.

0 Kudos
SBald8
Beginner
741 Views

Thanks.

But the above message is not useful to me , I want to make dataset similar as Kitti Dataset, I have images for my dataset but need to make "pose file" which I am unable to configure how to generate.

0 Kudos
MartyG
Honored Contributor III
741 Views

Your question about a pose file and datasets is outside of my knowledge unfortunately. I recommend posting this question at the RealSense GitHub forum, as there are Intel RealSense team members there who have specialist T265 knowledge (I am not a T265 specialist). You can do so by visiting the link below and clicking the New Issue button.

https://github.com/IntelRealSense/librealsense/issues

0 Kudos
SBald8
Beginner
741 Views

Okay Thanks.

But can you tell me what is ./data_collect.cfg file in https://github.com/IntelRealSense/librealsense/tree/master/tools/data-collect , I have read the document but unable to understand what is .cfg file and how to make that file .

0 Kudos
MartyG
Honored Contributor III
741 Views

I am not familiar with the data_collect file. Please ask the GitHub. Thanks!

0 Kudos
Reply