clear all;
close all;
movieObj = aviread('hall_monitor.avi');
getpixdiff(movieObj); %Record every pixel's variations along time axis;
getbackground; %Get the backgrund image from video frames; 
load backgroundimage backGround;
loc = double(movieObj(178).cdata) - double(backGround); % To locate the motion;
loc = uint8(loc);
figure;
imshow(loc);
return;