Reputation: 6394
What would be the best way to detect a fast moving object using OpenCV?
Say, I have 5 random video files:
1) Video of a crowd, people walking, static camera. 2) Video of a cat playing with a ball, shaky iPhone camera. 3) Video of a person being interviewed. Static camera. 4) Animation (3D) of a fast moving car, background is blurred etc. etc. 5) A blurred out video shot with iPhone camera (just camera waved around, nothing is visible).
So I would like to isolate video5 and detect that there is a lot of movement in video4 and video2.
What would be the best approach to do that? I think of using OpenCV2, but if there is a better solution for that, I'd be happy to learn about that.
Any input greatly appreciated. Pseudo-code or just recommendations of specific algorithms.
Thank you
Upvotes: 2
Views: 4060
Reputation: 53
I don't know if you are still on it but I found it interesting to answer.
Approach 1- As suggested by user349026, one of the most intuitive way is to work with Optical flow, it will give you dominating motion but optical flow always comes with noises. You will have to use some filter before using the optical flow.
Approach- 2 This one difficult but gives good results. This is from CVPR-2013 paper link- http://www.irisa.fr/texmex/people/jain/w-Flow/motion_cvpr13.pdf I think the just introduction of this paper will solve your problem.
Upvotes: 3