Ask Your Question
0

Record images with timestamp

asked 2020-03-26 20:37:20 -0500

arafatsadasd gravatar image

updated 2020-03-27 22:54:03 -0500

Hello all, simple question. Is there a way to save images with their timestamp? I need to record images with their timestamps and export them.

Thanks in advance

UPDATE1: let me expand. using rosbag I can record and export the /odom topic well, but when recording an image I can't export the image with the time stamp. So what I did is that I have a cv2 based code to record the images and label them with the msg header except that the msg header makes no sense.

this is the timestamp

4520000000, 4570000000, 4570000000, 4620000000, 4630000000

is there a way to convert them to date and time?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-26 23:10:35 -0500

The sensor msgs image message contains a header, which amongst other things includes a timestamp. You should then have the image and time for exporting!

edit flag offensive delete link more

Comments

thanks for responding, I added an update please take a look.

arafatsadasd gravatar image arafatsadasd  ( 2020-03-27 22:54:40 -0500 )edit

That's not a ROS question, that's a programming question now that you have. There are plenty of resources if you google to convert unix time to human date time.

stevemacenski gravatar image stevemacenski  ( 2020-03-28 01:03:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-03-26 20:37:20 -0500

Seen: 21 times

Last updated: Mar 27