필터 지우기
필터 지우기

Error during creation of a VideoReader Object

조회 수: 1 (최근 30일)
Davide Magnelli
Davide Magnelli 2017년 10월 25일
댓글: Walter Roberson 2017년 10월 25일
Hello, I am trying to exctract all frames of a video (.avi) created in another matlab script. Below the code:
if true
%Acquisisco il percorso del FieldMovie.avi
folder = fileparts(which('FieldMovie.avi'));
movieFullFileName = fullfile(folder,'FieldMovie.avi');
%Creazione dell'oggetto 'videoObject'
videoObject = VideoReader(movieFullFileName);
%Creazione di un output folder per i frames
[folder,MovieName,extention] = fileparts(movieFullFileName);
folder = pwd;
outputFrame = sprintf('%s/Movie Frames from %s', folder,MovieName);
for frame = 1 : 129
%Estrazione dei frame dal video
thisFrame = read(videoObject, frame); % legge soltanto il frame specificato da l'indice 'frame'
%Scrittura dell' Array Immagine nell' output file costruito di seguito
outputBaseFileName = sprintf('Frame %4.4d.png', frame);
ExtractFrame = fullfile(outputFrame, outputBaseFileName);
end
end
The error returned is: Error in outputFolder (line 12) videoObject = VideoReader(movieFullFileName);
Someone might help me to understand what does it means? Thanks in advance
  댓글 수: 3
Davide Magnelli
Davide Magnelli 2017년 10월 25일
Here the full error message:
Error using VideoReader/init (line 607) The filename specified was not found in the MATLAB path.
Error in VideoReader (line 172) obj.init(fileName);
Error in outputFolder (line 12) videoObject = VideoReader(movieFullFileName);
Walter Roberson
Walter Roberson 2017년 10월 25일
It appears that you do not have a file named FieldMovie.avi anywhere on your MATLAB path.

댓글을 달려면 로그인하십시오.

답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by