Results 1 to 1 of 1

Thread: Motion Detector - detects movement inside a webcam's field of view (VB 5/6)

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,321

    Motion Detector - detects movement inside a webcam's field of view (VB 5/6)

    This program (see the .zip file attached to this thread) captures images from a webcam and determines the level of movement in the camera's field of view. When the level of movement exceeds a threshold specified by the user, it sends a snapshot to an e-mail address (also specified by the user.) If no e-mail address is given, it displays a message box.

    The program works by comparing the most recently captured image with the previous one. The difference between the two images is used to determine the level of movement. Thanks to the getdibits/setdibits API functions the PSet/Point methods are avoided which improves the program's performance.

    This program should also be useful to find out how to use a webcam in general in Visual Basic 5 or 6.

    See the attached .zip file for the program.

    EDIT:
    Uploaded v1.06 - Made minor changes to the interface.
    Uploaded v1.07 - Fixed "Unspecified Failure has occurred (Runtime error 32002)".
    Uploaded v1.08 - Added an icon.
    Uploaded v1.09 - Revised the code.
    Uploaded v1.10 - Fixed crashing, no image at 640 x 480, and API error handling.
    Last edited by Peter Swinkels; Aug 25th, 2014 at 06:46 AM. Reason: Updated attached code.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width