Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Rash Anan
Rash Anan le 21 Sep 2015
Clôturé : MATLAB Answer Bot le 20 Août 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.

Réponses (1)

Image Analyst
Image Analyst le 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);

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by