简体   繁体   中英

Record video frame by frame in OpenCV and ROS

I have a heavy program that I receive a message of ROS(an image) in a callback and I process it. I'd like to run the program frame per frame because I don't want to lose no frames and I'd like to save in a Video file with a certain frequency. Can anyone help me?

Not sure what your problem exactly is. If it's just about storing the processed images you can save them with the OpenCV cv::imwrite . The other option is to use the VideoWriter to encode the images in a video file. There you can specify the frames per second and the encoding as shown in the example.

Cheers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM