フィルターのクリア

subtraction the background from people that detection in video

1 回表示 (過去 30 日間)
Walaa Jasim
Walaa Jasim 2016 年 11 月 12 日
I new in Matlab , my code below detect people(forground) in everey frame in video . How can I subtraction background from every frame of video (behind all people in the frame) clc clear close all % read movi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% h1='G:\Refrence\database\new-data base\'; h2=input('name=','s')
h=[h1,h2,'.mp4'];
mov=VideoReader(h);
fps=mov.FrameRate;
% Read all Frame%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Get the number of frames %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nFrames=mov.NumberOfFrames;
%numFrames = get(readerobj, 'numberOfFrames');
%height = get(mov.NumberOfFrames, 'Height');
%width = get(mov.NumberOfFrames, 'Width');
jj0=0;
for jj=1:1 jjout=jj jj0=jj0+1;
peopleDetector = vision.PeopleDetector('ClassificationModel','UprightPeople_128x64');
I=read(mov,jj);
[bbox,scores]=step(peopleDetector ,I);
II = insertObjectAnnotation(I,'rectangle',bbox,scores); figure, imshow(II) title('Original Image After detect people')

回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by