Source Code
Motion Segmentation
Oreifej_RPCA.zip
Here are the instructions on how to use it:
[TrajOut,TrajIn,TrajOutLow,TrajOutE] = MotionDecomp(Traj,THRESH)
Traj: all the trajectories, each row is [X coor, Y coor].
THRESH: a value like 10 to 30
TrajOut: Independently moving trajectories
TrajIn: Camera motion trajectories
TrajOutLow: The component of TrajOut corresponding to camera motion.
TrajOutE: The component of TrajOut corresponding to object motion.
Notes:
- TrajOutE is what you want to use in action recognition.
- In order for this to work, the camera motion has to be dominant in the scene.
- You need to not include the boundary trajectories in Traj (the trajectories close to the image boundary) since they will get out the FOV and will be stuck and not include the camera motion.