我想使用視頻從下面的目錄 'E:\Multimedia Security\matlab\UCSD_Anomaly_Dataset.v1p2\UCSDped1\Train\Train001'
計算機視覺:路徑播放視頻
以下是我寫的
close all
clear all
clc
workingDir = 'E:\Multimedia
Security\matlab\UCSD_Anomaly_Dataset.v1p2\UCSDped1\Train\Train001';
videoofReader = vision.VideoFileReader(dir(fullfile(workingDir, 'abc.avi')));
videoPlayer = vision.VideoPlayer;
while ~isDone(videoofReader)
frame = step(videoofReader);
step(videoPlayer, frame);
end
release(videoofReader);
release(videoPlayer);
錯誤,我得到的是
`Error using VideoFileReader.set.Filename (line 139)
Expected Filename to be one of these types:
char
Instead its type was struct.
Error in C:\Program
Files\MATLAB\R2012a\toolbox\matlab\system\+matlab\+system\setProp.p>setProp
(line 14)
Error in
代碼C:\ ProgramFiles \ MATLAB \ R2012a \ toolbox \ matlab \ system + matlab + system \ SystemProp.p> SystemProp.set(line 373)
錯誤在C:\ Program Files文件\ MATLAB \ R2012a \工具箱\ MATLAB \系統+ MATLAB +系統\ SystemProp.p> SystemProp.parseInputs (線635)
錯誤在C:\程序 文件\ MATLAB \ R2012a \工具箱\ MATLAB \系統+ MATLAB +系統\ SystemProp.p> SystemProp.setProperties (線138)
錯誤在C:\程序 文件\ MATLAB \ R2012a \工具箱\視力\視力+ vision \ VideoFileReader.p> VideoFileReader.VideoFileReader (line 131)
kl2錯誤(第18行) videoofReader = vision.VideoFileReader(dir(fullfile(workingDir,'abc.avi')));