How to obtain reference background image using temporal frame difference method?
5 views (last 30 days)
Show older comments
i have to obtain a reference background image for the video sequence by using temporal frame difference method.i have read the multiple images from the folder and then applied the frame differencing using euclidean distance calculation and them difference matrix multiplication i have done and finally done statistical sum for getting average reference image.here is my code
srcFiles = dir('J:\frms\*.jpg'); % the folder in which ur images exists for i = 1 : length(srcFiles) filename = strcat('J:\frms\',srcFiles(i).name); I{i} = imread(filename); %figure, imshow(I); end for i=2: d(i)=sqrt(sum((I(i)-I(i+1)).^2)); d1(i)=uint16(d(i)); D(i) = immultiply(d1(k),d1(k+1)); D1{i}=imopen(D{i}); s=s+D1{i}; end
But this is not working.Please help me in this and suggest me how can i get reference background image for my frames.thanks in advance.
0 Comments
Answers (0)
See Also
Categories
Find more on Image Segmentation and Analysis 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!