Motion Detection with VB

Motion Detection with VB

Post by dude » Tue, 16 Jan 2001 10:31:54



Am currently working on a school project, trying to develop a motion
detector from software using commercially available *s, and after
searching for about three weeks I found your site.

Am really looking for information on how to compare clips from an avi steam
taken from a Logitech camera, in order to develop a basic software motion
detector.

Any help will appreciate

Thank You

Angel Mercado

San Juan, Puerto Rico

 
 
 

Motion Detection with VB

Post by dude » Wed, 17 Jan 2001 03:37:17


Am currently working on a school project, trying to develop a motion
detector from software using commercially available *s, and after
searching for about three weeks I found your site.

Am really looking for information on how to compare clips from an avi steam
taken from a Logitech camera, in order to develop a basic software motion
detector.

Any help will appreciate

Thank You

Angel Mercado

San Juan, Puerto Rico

 
 
 

Motion Detection with VB

Post by Rudie Shepher » Wed, 24 Jan 2001 19:47:40


Hi Angel,

I use a very simple mechanism:
- Load the picture from the video capture buffer into a bitmap structure
(this is the reference image)
- Wait a couple of frames - depending on how sensitive the motion detection
needs to be. At a framerate of 10 fps, wait 5 frames to check every half
second.
- Load frame into another bmp structure.
- Check the pixels one by one comparing the pixel on frame 1 to the pixel on
frame 2. For less sensitive application, and to go faster, check every tenth
of 50th pixel. This is fine to detect a person moving across the screen for
instance.
- To check the pixels, do a pixelref = (red value + green value + blue
value)/3    pixelcheck = (red value + green value + blue value)/3.
Difference = abs(pixelref-pixelcheck).
- Compare the Difference to some variable you set (I call it
SignificantDifference) indicating that the two pixels are quite different in
colour.
- Count the number of pixels with significant differences until some
threshold is reached - which then tells you there's motion - and you can
exit the loop immediately.
- If you reach the end of the loop, with no significant count, then you know
the two images are very much the same.

I get good results with the following parameters with 388 x 244 video to
detect a person walking past the camera:
- Check every 100th pixel (94672 pixels in total -so I check 1% of pixels)
- The pixels are significantly different if the (r+g+b)/3 > 50.
- If I get more than 10% such pixels, I know there's motion.

You can play with the sensitivity by changing the above parameters.

You can find a lot of info re video at http://www.veryComputer.com/

Rudie


>Am currently working on a school project, trying to develop a motion
>detector from software using commercially available *s, and after
>searching for about three weeks I found your site.

>Am really looking for information on how to compare clips from an avi steam
>taken from a Logitech camera, in order to develop a basic software motion
>detector.

>Any help will appreciate

>Thank You

>Angel Mercado

>San Juan, Puerto Rico

 
 
 

1. vb script and javascript in flash plugin detection

hi,
        in the following script below, i am not able to understand what
javascript does and what vb script does.
        is javascript checking netscape plugin and vb script checking
explorer??
        what does navigatot mean in javascript? is it any browser that is
called navigator or only netscape is called navigator?
        ps let me know.
        thanks for your time and reply.
        - himanshu
        ps . alo any experiences with this kind of sniffer scripts? are
they succesful? any other alternatives??
        ---------
        <HTML>
        <HEAD>
        </HEAD>

        <BODY>

        <SCRIPT LANGUAGE="JavaScript">
        <!--
        var useFlash = navigator.mimeTypes &&
        navigator.mimeTypes["application/x-shockwave-flash"] &&
        navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;

        //-->

        </SCRIPT>
        <SCRIPT LANGUAGE="VBScript">
        <!--
        On error resume next
        useFlash = NOT
IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))
        -->

        </SCRIPT>
        <SCRIPT LANGUAGE="JavaScript">
        <!--
        if ( useFlash ) {
        window.location = "index.html";
        } else {
        window.location = "indexnonflash.html";
        }
        //-->
        </SCRIPT>

        </BODY>
        </HTML>

--
Posted via CNET Help.com
http://www.help.com/

2. PS 4.0 + Win NT 4.0

3. Grey Scale Images Reqd for Motion Detection

4. ADMIN: Monthly LightWave mailing list FAQ

5. FREE *new interactive tutorial* HOWTO: use motion detection in max with your mouse

6. Help regrading superscripts

7. Efficient motion detection algorithm

8. AutoCad to 3DS

9. Motion Detection

10. Motion Detection Algorithm

11. logical difference?? motion detection

12. Motion detection algorithm...?

13. Motion detection