How to capture video in Octave?

Is there a way to capture video in Octave ?

In Matlab, I use the following (also possibly useful to other people):

a = imaqhwinfo('linuxvideo',1)  # or "imaqhwinfo('winvideo',1)" in Windows
a.SupportedFormats              # check supported formats
vid = videoinput('linuxvideo', 1, 'YUYV_640x480'); # open video stream with one of supported formats

start(vid);                     # start processing video
preview(vid);                   # open preview window

pics = cell(1,20)               # create array to store images from video
for i = 1:20                    
   pause(1);                    # every 1 second ...
   pics{i} = getsnapshot(vid);  # get video frame and save into corresponding position in array
end

But in Octave, none of the video-related features work. You can also use Octave bindings for OpenCV to capture video, but I'm primarily looking for a cleaner and more portable way.

+5
source share
2 answers

Install and download the image acquisition package. For more information, read the Wiki: http://wiki.octave.org/Image_acquisition_package

+3
source

, . for / . aviread . , , , .

0

All Articles