how to get this video background removal worked?
1 次查看(过去 30 天)
显示 更早的评论
hello everyone,
I cannot get this code working and it gives me black screen as output!
clc
clear
close all
obj = vision.VideoFileReader('1.mov');
frames= 550;
threshold=25;
for f=1:frames
I=step(obj);
%figure(1);imshow(I);title('Input Video Sequence');
if f==1
Background=I;
Fg=abs(I-Background);
else
Fg=abs(I-Background);
end
Fg(Fg>threshold) = 255;
Fg(Fg<=threshold) = 0;
figure(2);imshow(Fg);
drawnow;
pause(0.2)
end
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!