Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
Rash Anan
Rash Anan il 21 Set 2015
Chiuso: MATLAB Answer Bot il 20 Ago 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.

Risposte (1)

Image Analyst
Image Analyst il 21 Set 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);

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by