background retrieving from video
이전 댓글 표시
hi I want to retrieve background of a street from a video So i wrote this code
if true
close all;
clc;
obj= mmreader('12.avi');
Frames = obj.NumberOfFrames;
Height = obj.Height;
Width = obj.Width;
size(obj);
a=read(obj);
sum = double(zeros(Height,Width,3));
imframe = double(zeros(Height,Width,3));
for f=1:Frames
sum(:,:,:,:) = sum(:,:,:,:) + double(a(:,:,:,f));
end
imframe = (sum(:,:,:,:)/Frames);
imframe1 = uint8(imframe);
figure;
imshow(imframe1);
end
the result as shown in below not very good

I want to delete the cars that are in specified area how I can do that please help me if any one know. best regards
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Morphological Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!