Moving Object Detection From 2D Images
Photoed From Moving Camera
This Project is trying to implemet the paper "Parallax Geometry of Pairs of Points for 3D Scene Analysis "
published by M. Irani and P. Anandan, in 1996. The detail is available here
simple ppt
First Step : The Planar Parallax Decomposition
Using the image registration to find out the homography matrix between two frames.
Then using the optical flow algo to find the corresponding points.
Example 1:
First frame
| Second frame
| Reference frame
|
|
|
|
Difference between reference frame and first frame after image registration
| Difference between reference frame and second frame after image registration
|
|
|
Optical flow field between reference frame and first frame
| Optical flow field between reference frame and second frame
|
|
|
Example 2:
First frame
| Second frame
| Reference frame
|
|
|
|
Difference between reference frame and first frame after image registration
| Difference between reference frame and second frame after image registration
|
|
|
Optical flow field between reference frame and first frame
| Optical flow field between reference frame and second frame
|
|
|
Second Step : The ParallaxBased Rigidity Constraint
In the following figure ,
p1 is the reference point : pw1 is the image point in the reference frame which results from warping the p1's corresponding point
in the next frame by the homography matrix from the image reqistration ; and u is the parallax displacment.
Use the parallax based rigidity constraint as following to find out the moving object . If the p2 is is the moving object , it will not obey the constraint.
But in the process of implement , I find that since of the precision of the float number, we can't get the zero purely from the constraint,
so I set the threhold for the ratio for the part before and after the minus sign.
Result after applying the constraint , red points stand for moving object
Example 1:
The result of first frame
| The result of second frame
|
|
|
Example 2:
The result of first frame
| The result of second frame
|
|
|
Discussion:
From the result showed above, the effect of detection is not very good.
Although there are some red points on the real moving object, but they are with a lot of noises on it either.
Since the image registration's effect looks good, so I think the optical flow is the main reason for the bad result.
Big region of single color or big movement my cause wrong optical flow result . Besides, the choosing of reference point
will also cause the error if it is not the background but the moving object.
Page by Wei-Chen Chiu Dec 15th 2006