Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

can someone tell me how to fix this matlab code in frames

1 Ansicht (letzte 30 Tage)
Rash Anan
Rash Anan am 21 Sep. 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
clear data
disp ('input video');% "input video"
avi = VideoReader('DSCN0928.avi');% avi: MATLAB movie structure
video = readFrame(avi);% CDATA: M x N x 3 matrix used to represent the true color image
for a = 1: length (video)% length (video) said the number of frames of this video
imshow (video {a})% in order of the number of frames to display image
DrawNow; end
the error i get is Cell contents reference from a non-cell array object.
Error in cdata2 (line 11) imshow (video {a})% in order of the number of frames to display image
i'm using matlab 2015a version.

Antworten (1)

Image Analyst
Image Analyst am 21 Sep. 2015
Try this:
videoObject = VideoReader(movieFullFileName)
% Extract the frame from the movie structure.
thisFrame = read(videoObject, frameNumber);
% Display it in the current axes.
imshow(thisFrame);

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by