Moro
Moro

Reputation: 41

recognize the moving objects and differentiate them from the background?

iam working in a project that i take a vedio by a camera and convert this vedio to frames (this part of project is done ) what iam facing now is how to detect moving object in these frames and differentiate them from the background so that i can distinguish between them ?

Upvotes: 0

Views: 1205

Answers (2)

mpenkov
mpenkov

Reputation: 21912

I recently read an awesome CodeProject article about this. It discusses several approaches to the problem and then walks you step by step through one of the solutions, with complete code. It's written at a very accessible level and should be enough to get you started.

Upvotes: 2

code-gijoe
code-gijoe

Reputation: 7244

One simple way to do this (if little noise is present, I recommend smoothing kernel thought) is to compute the absolute difference of two consecutive frames. You'll get an image of things that have "moved". The background needs to be pretty static in order to work. If you always get the abs diff from the current frame to the nth frame you'll have a grayscale image with the object that moved. The object has to be different from the background color or it will disappear...

Upvotes: 0

Related Questions