Finding the average frame from a video seqence.

3 views (last 30 days)
HI every one
How can I find the average frames form the video sequence.
As I can compute the average image between two images like image1+image2./2.How can I find from video sequence from series of frames.
Thanks

Answers (1)

walid
walid on 16 Jan 2014
readerobj = VideoReader('tmp.avi'); vidFrames = read(readerobj); %get number of frames numFrames = get(readerobj, 'numberOfFrames') % numFrames = size(mov,2); 53 for k = 1 : numFrames %k % numFrames mov(k).cdata = vidFrames(:,:,:,k); mov(k).colormap = []; %imshow(mov(k).cdata); end Fig1= figure ; set ( Fig1, 'position' , [40 350 readerobj.width readerobj.height]) movie ( Fig1, mov, 1, readerobj.FrameRate);
f = vidFrames(:,:,1,1)+vidFrames(:,:,1,2)+vidFrames(:,:,1,3)/3;

Community Treasure Hunt

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

Start Hunting!