Professional Documents
Culture Documents
Isaac Case
Object Detection
Object Tracking
Moving Camera
How do we segment
the image into objects?
Background Subtraction
Frame Difference
Select a frame
Statistical method
+ Easy
+ Fast
background = im2double(imread(‘background.jpg’))
frame = im2double(imread(‘current_frame.jpg’))
mask = abs(frame ‐ background)
+ Easy
%%Determine Background
imname = 'image_%03d.jpg' %
back = double(zeros(size(im1))); %blank image
for idx = 20:30
new_im = im2double(imread(sprintf(imname,idx)));
back = back + new_im;
end
back = back./11
%%Difference
frame = im2double(imread(‘current_frame.jpg’))
mask = abs(frame ‐ background)
- Slower
If the difference between the current frame and the average is greater than the standard
deviation, then it is a foreground pixel
+ More accurate
- Additional Processing
variable?
static?
> 0.01
> 0.05
> 0.1
Saturday, December 12, 2009
NOISE MANAGEMENT
Morphological processing
open
close
dilate
erode
diff_image > 0.05
diff_image > 0.05
bwareaopen(image,30)
diff_image > 0.05
bwareaopen(image,30)
imclose(opened_image,strel('disk',5))
no need to guess
bwlabel
regionprops
stats =
regionprops(mask,'basic')
T=1 T=2
Harris Corners
SIFT
Two Options: