How to obtain reference background image using temporal frame difference method?
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!