need source code for display frames of the results from video pieces in one axes only.. how can be looping ?
Show older comments
need source code for display frames of the results from video pieces in one axes only.. how can be looping??
Accepted Answer
More Answers (1)
Image Analyst
on 3 Aug 2011
Here's a snippet of source code if you need it:
mov = aviread(movieFullFileName);
% Determine how many frames there are.
numberOfFrames = size(mov, 2);
for frame = 1 : numberOfFrames
% Extract the frame from the movie structure.
thisFrame = mov(frame).cdata;
% Display it
axes(handleToYourAxisControl);
image(thisFrame);
caption = sprintf('Frame %4d of %d.', frame, numberOfFrames);
title(caption, 'FontSize', 15);
drawnow; % Force it to refresh the window.
end
4 Comments
Megah Putri
on 3 Aug 2011
Walter Roberson
on 3 Aug 2011
imshow(frame) not imshow(1)
Megah Putri
on 3 Aug 2011
Walter Roberson
on 3 Aug 2011
Is the AVI coded at a variable bit rate? If so then you need to read it through once before you know the correct NumberOfFrames .
I suggest that you change the 'error' of your final msgbox() argument:
s = lasterror();
msgbox('Codec AVI tidak didukung atau Corupted file AVI','Error',s.message);
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!