ethz-asl / kalibr

The Kalibr visual-inertial calibration toolbox
Other
4.28k stars 1.39k forks source link

ROS bag containing the image and IMU data #570

Closed JessicaBertolasi closed 1 year ago

JessicaBertolasi commented 1 year ago

Hi, I need a suggestion on how to create correctly the bag for imu-camera calibration. How can I record the images from my video? Is it e2vid useful for this purpose? because I saw that I need to insert images and a file with imu recurds. the data in question is --bag filename.bag thank you and best regards!

goldbattle commented 1 year ago

All details for the bag creation and extraction are on the wiki page: https://github.com/ethz-asl/kalibr/wiki/bag-format

JessicaBertolasi commented 1 year ago

okay but I cannot understand how to create the images. how can I extract them from an .avi video?

goldbattle commented 1 year ago

I am not sure, I recommend googling it. Once you have them in the specified format you can create a bag.

On Mon, Sep 19, 2022 at 9:54 AM Jessica Bertolasi @.***> wrote:

okay but I cannot understand how to create the images. how can I extract them from an .avi video?

— Reply to this email directly, view it on GitHub https://github.com/ethz-asl/kalibr/issues/570#issuecomment-1251053540, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ6TYTLWFD7CXAY4FCMDC3V7BWBHANCNFSM6AAAAAAQP6YTFY . You are receiving this because you commented.Message ID: @.***>

JessicaBertolasi commented 1 year ago

on wiki pages there isn't an explanation on how to do it. I have a video (.raw and .avi) and also a file with timestamp,x,y,p from event-camera record, any suggestions?

goldbattle commented 1 year ago

This isn't something that kalibr supports, thus you need to figure it out yourself. From a quick search, you can probably use FFMPEG https://www.google.com/search?q=extract+frames+from+video+ffmpeg

You will likely need to figure out how to get the timestamps correctly.

On Mon, Sep 19, 2022 at 1:56 PM Jessica Bertolasi @.***> wrote:

on wiki pages there isn't an explanation on how to do it. I have a video (.raw and .avi) and also a file with timestamp,x,y,p from event-camera record, any suggestions?

— Reply to this email directly, view it on GitHub https://github.com/ethz-asl/kalibr/issues/570#issuecomment-1251356605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ6TYUG75APEXV6OI63VVLV7CSN3ANCNFSM6AAAAAAQP6YTFY . You are receiving this because you commented.Message ID: @.***>

JessicaBertolasi commented 1 year ago

okay I've found a way to extract frames from video, but I save frames like fname = "frame_" + str(frameId) + ".jpg" ideas on how to write the name with timestamp?

goldbattle commented 1 year ago

This isn't something Kalibr supports, please try searching the internet.