Finding the average frame from a video seqence.
Show older comments
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
1 Comment
Algorithms Analyst
on 20 Mar 2013
Answers (1)
walid
on 16 Jan 2014
0 votes
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;
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!