Filter löschen
Filter löschen

Plot frames of a matlab movie

4 Ansichten (letzte 30 Tage)
Davide Magnelli
Davide Magnelli am 30 Nov. 2017
Kommentiert: Mukul Rao am 5 Dez. 2017
Hello, My purpose is to plot a figure of the frames of a video stored in an array named 'processo' as you can see in the code below:
if true
folder = fileparts(which('Field_adv_diff_2D.avi'));
movieFullFileName = fullfile(folder,'Field_adv_diff_2D.avi');
videoObject = VideoReader(movieFullFileName);
numberOfFrames = videoObject.NumberOfFrames;
for frame = 1:numberOfFrames
thisFrame = read(videoObject,frame);
if frame == 1
h = size(thisFrame,1);
w = size(thisFrame,2);
processo = zeros(h, w, 3, numberOfFrames);
end
processo(:, :, :,frame) = im2double(thisFrame);
end
end
The video is a simulation of a diffusive process in grey scale. I need to plot its frame in every iteration of a for loop but with the following code I didn't get the hoped results
if true
figure
plot(processo(:,:,1,i));
end
Might anyone help me?
Thanks in advance Davide
  1 Kommentar
Mukul Rao
Mukul Rao am 5 Dez. 2017
Hello, what are the results you observe, and what is the expectation?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by