Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Dec 2001 10:18:23 +0100 (CET)
From:      Søren Schmidt <sos@freebsd.dk>
To:        Tim Pozar <pozar@lns.com>
Cc:        multimedia@FreeBSD.ORG
Subject:   Re: Motion detection software?
Message-ID:  <200112080918.fB89INr58887@freebsd.dk>
In-Reply-To: <20011207224143.C12766@lns.com>

next in thread | previous in thread | raw e-mail | index | archive | help
It seems Tim Pozar wrote:
> I am looking for motion detection software.  I want to only capture
> video frames that have changes such as someone walking into the
> frame.  It would be nice if it talked to the bktr device but if it
> is something I could just pass jpg, pbm, etc. frames to and get a
> result back I would be happy.
> 
> Anything out there?


Well, I've done several intrusion systems that use very simple
methods to detect motion/changes in pictures, it essentially
just does this:

        for (i=0; i<sizeof(pic); i++)
             sum += square(pic1[i] - pic2[i]);
        if (sum > TRIGGER)
            return MOTION;
        else
            return 0;

The two pictures are raw 320x240 8bit/pixel B/W in this case.
The TRIGGER value can in this case be around 200000, it has to be
low enough to see the changes, and big enough that bitnoise
doesn't trigger it wrongly. Adjusting it is pretty easy, and it
even allows you to not trigger motion on small objects like
brids etc, but do trigger when something bigger happens.

-Søren

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112080918.fB89INr58887>