%%%%%% Extracting frames from a Video file Matlab Code %%%%%%%
clc;
close all;
% Open an sample avi file
filename = '.\003.AVI';
mov = MMREADER(filename);
% Output folder
outputFolder = fullfile(cd, 'frames');
if ~exist(outputFolder, 'dir')
mkdir(outputFolder);
end
%getting no of frames
numberOfFrames = mov.NumberOfFrames;
numberOfFramesWritten = 0;
for frame = 1 : numberOfFrames
thisFrame = read(mov, frame);
outputBaseFileName = sprintf('%3.3d.png', frame);
outputFullFileName = fullfile(outputFolder, outputBaseFileName);
imwrite(thisFrame, outputFullFileName, 'png');
progressIndication = sprintf('Wrote frame %4d of %d.', frame,numberOfFrames);
disp(progressIndication);
numberOfFramesWritten = numberOfFramesWritten + 1;
end
progressIndication = sprintf('Wrote %d frames to folder "%s"',numberOfFramesWritten, outputFolder);
disp(progressIndication);
how to extract text from video can you help me out please.
ReplyDeleteFantastic blog! I'm so glad to find your page.I really appreciated the concept that you have posted here. Thanks for sharing !
ReplyDeletesir can u send for torn film detection and correction to v.vishakha22@gmail.com
ReplyDeleteI get an error :s : The frame index requested is beyond the end of the file.
ReplyDeletewith the same source code
hello friends............does anyone have the code for key frame extraction based on entropy difference...........or code for scene change detection.....if anyone has.please sent it to the mail id: divyankg@gmail.com
ReplyDeleteHi! Does anyone have a code for counting number of human beings in an image and counting number of cars in an image? Please mail me to bhaskarsngh19@gmail.com
ReplyDelete