What is the simplest most effective way to motion detect using webcams ?

For a while now I've been searching reading and trying out some of the open source out there. With not much background in Matlab.
I'm trying to write a motion detection code based on background subtraction or temporal difference methods. And since my lack of experience when I read papers and mathematical equations I can't implement it into code and when I read source codes I can't really understand what goes on underneath.
Could you kindly point me out in the right direction. What is the best way to motion detect for a Security/ Alarm system so it needs to be fast and uninfected by noise other that intruders for closed spaces? And how can I implement it while I still understand every single line of the code?
Thank you

 採用された回答

その他の回答 (2 件)

Image Analyst
Image Analyst 2013 年 4 月 13 日

0 投票

The Mathworks web site has many pages on tracking. Most are short demos that involve the Computer Vision System Toolbox or the Image Processing Toolbox or Image Acquisition Toolbox. Do a search: http://www.mathworks.com/searchresults/?q=tracking&q1=tracking&q2=&q3=&notq=&c[]=productsservices&c[]=solutions_tn

6 件のコメント

Lobna
Lobna 2013 年 4 月 13 日
編集済み: Walter Roberson 2013 年 4 月 13 日
Yes I have tried the optical flow using computer vision toolbox. Very nice but I'm looking into something simpler and clearer just detects to trigger and alarm no need to tracking the moving object.
Thank you
Image Analyst
Image Analyst 2013 年 4 月 13 日
So what's wrong with your subtraction idea? That's simple.
Lobna
Lobna 2013 年 4 月 13 日
編集済み: Walter Roberson 2013 年 4 月 13 日
I know the concept of it I've done my reading I just have no idea how to implement it, And when I read people's sources I don't understand what goes on.
if you could point out to me some toolboxes general MATLAB methods and equations?
Image Analyst
Image Analyst 2013 年 4 月 13 日
I thought I did. Did you see the link I posted? Alternatively you could search the File Exchange for tracking applications. http://www.mathworks.com/matlabcentral/fileexchange/?search_submit=fileexchange&query=tracking&term=tracking
Ankur Singh
Ankur Singh 2014 年 3 月 31 日
hey image analyst
in optical flow method what tells us that some motion has been detected??
Image Analyst
Image Analyst 2014 年 3 月 31 日
The vector field will be non-zero where there has been motion.

サインインしてコメントする。

tairman singh
tairman singh 2013 年 4 月 18 日

0 投票

try this function function [logic]=mcheck(f,s)
sub=imabsdiff(f,s);
diff_im=im2bw(sub,.07);
diff_im = medfilt2(diff_im, [3 3]);
diff_im = bwareaopen(diff_im,500);
imbw = imfill(diff_im,'holes');
[a b c]=size(imbw);
count=im2col(imbw,[a b],'sliding');
count=sum(count);
if count<=3000
logic=1;
else
logic=0;
end
end
it takes two consecutive images clicked by the camera, as the input function parameters i.e 'f' and 's' and return logic '1' or '0' if it detect motion or not. Changing different values of count ,allows you to control the sensitivity.

質問済み:

2013 年 4 月 13 日

コメント済み:

2014 年 3 月 31 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by