Should I save frames as video or a sequence of images?

asked 2018-11-14 17:00:43 -0600

Hi I am newbie to both OpenCV and Python. I previously tried using Matlab's built-in functions to interact with the 60fps camera and save the whole video, but it created a memory sink and froze the whole program. Now I am thinking to switch using OpenCV/Python, but just read posts suggesting that saving each frame as one image could create a memory issue. I am wondering what is better when using OpenCV and Python? Thanks a lot!

edit retag flag offensive close merge delete

Comments

Picamera or usb webcam?

supra56 gravatar imagesupra56 ( 2018-11-14 20:19:08 -0600 )edit

please check cv2.getBuildInformation() , if you installed your cv2 via some ppm, it might not have any facilities to save video files at all (FFMPEG or GSTREAMER support needed)

and the tradeoff is not at all about memory, but about CPU load (compressing videos) vs. Disc io/space

berak gravatar imageberak ( 2018-11-15 01:12:34 -0600 )edit

@supra56 It is a USB camera (ELP 720p Full Hd H.264 USB Camera Module).

DanaChang gravatar imageDanaChang ( 2018-11-15 13:14:23 -0600 )edit

@berak.Thank you for suggestions. Will try to look into CPU and Disk i/o space. Thanks!

DanaChang gravatar imageDanaChang ( 2018-11-15 13:22:23 -0600 )edit