Ask Your Question
6

Motion Detection with OpenCV (C++)

asked 2013-06-08 12:53:30 -0600

yohanrw gravatar image

updated 2020-11-30 03:02:54 -0600

I am asked to write a code which can detect ANY moving object using OpenCV. It will be used in in-door system. And it is real time, input will be taken from a camera, and system need to detect the moving stuff real time. According to my knowledge this is motion detection. I am not considering about unwanted movements like waving of a flag or curtain. When an important motion is detected, the system will raise an alarm.

I know this is possible with opencv, because I saw the following video

http://www.youtube.com/watch?v=lzRGp3nc8Tw

But, I do not have resources to learn how to. Official OpenCV tutorials do not contain any data about this.

Please provide me advice, links, learning resources or steps I need to follow.

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
4

answered 2013-06-10 03:44:42 -0600

updated 2013-06-10 03:52:11 -0600

You can do object detection using background Subtraction(object detection using background subtraction)

Check this library:

Tutorial: motion detection using BackgroundSubtractorMOG2 :

edit flag offensive delete link more

Comments

awesome! I was wondering whether that "drawing rectangles" around moving objects is possible. It seems to be :) Anyway, sorry for my delay of reply, I was waiting for an email notification. No email notifications here?

yohanrw gravatar imageyohanrw ( 2013-06-12 00:44:22 -0600 )edit
0

answered 2013-06-10 01:20:43 -0600

jigarsen18 gravatar image

i think you have to start with Learning OpenCV Book - Read it. Here you can get the step by step method to use OpenCV.

yes first you have to link the library of openCv to visual studio. See the link steps to confi. opencv.

edit flag offensive delete link more
0

answered 2013-06-10 00:47:06 -0600

keltik gravatar image

updated 2013-06-10 00:49:56 -0600

You can check out this resource:

http://www.codeproject.com/Articles/10248/Motion-Detection-Algorithms .

Although its made for python, i guess it is possible to understand the general technique and adapt to some other language.

As long as your background is fixed, you can track any object with it.

edit flag offensive delete link more
0

answered 2013-11-23 12:31:54 -0600

I did this bit in motion detection.. Go through if any one's interested.. Feel free to use if you want..

http://hardikmadhu.blogspot.com/2013/09/a-simple-and-minimal-aproach-to-human.html

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2013-06-08 12:53:30 -0600

Seen: 54,347 times

Last updated: Nov 23 '13