gpt4 book ai didi

video - 如何在 Octave 中捕获视频?

转载 作者:行者123 更新时间:2023-11-28 21:40:19 24 4
gpt4 key购买 nike

Octave 是否有原生方法捕获视频

在 Matlab 中我习惯使用以下(也可能对其他人有用):

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

但在 Octave 中,所有与视频相关的功能都不起作用。也可以使用 Octave bindings for OpenCV来捕获视频,但我主要是在寻找更纯粹便携 的方式。

最佳答案

安装并加载图像采集包。有关详细信息,请阅读 Wiki:http://wiki.octave.org/Image_acquisition_package

关于video - 如何在 Octave 中捕获视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14552676/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com