[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: aviread from video package does not return correct frame
From: |
shall689 |
Subject: |
Re: aviread from video package does not return correct frame |
Date: |
Tue, 25 Dec 2018 17:57:49 -0600 (CST) |
I was able to get python to extract the frames. However, I would still like
to use octave's video package to extract the frames.
After installing python-opencv
(https://docs.opencv.org/3.4.1/d2/de6/tutorial_py_setup_in_ubuntu.html), the
following code was able to extract the frames successfully using the
following code (using example from
https://stackoverflow.com/questions/33311153/python-extracting-and-saving-video-frames):
import cv2
vidcap = cv2.VideoCapture('Output.mp4')
success,image = vidcap.read()
count = 0
while success:
cv2.imwrite("frame%d.jpg" % count, image) # save frame as JPEG file
success,image = vidcap.read()
print('Read a new frame: ', success)
count += 1
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
Re: aviread from video package does not return correct frame, Andreas Weber, 2018/12/26