Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Raspberry Pi for Secret Agents

You're reading from  Raspberry Pi for Secret Agents

Product type Book
Published in Apr 2013
Publisher Packt
ISBN-13 9781849695787
Pages 152 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Stefan Sjogelid Stefan Sjogelid
Profile icon Stefan Sjogelid

Table of Contents (12) Chapters

Detecting an intruder and setting off an alarm


Let's dive right in to the wonderful world of motion detection!

The basic idea of motion detection is pretty simple from a computer's point of view—the motion detection software processes a continuous stream of images and analyzes the positions of the pixels that make up the image. If a group of contiguous pixels above a certain threshold starts to change from one frame to the next, that must be something moving. The tricky part of motion detection is weeding out false positives triggered by naturally occurring changes in light and weather conditions.

  1. We'll be working with a motion detection application called Motion. Install it using the usual command:

    pi@raspberrypi ~ $ sudo apt-get install motion
    
  2. With Motion installed, the next step is to create a configuration file for our webcam. The Motion installation puts a sample configuration file inside the /etc/motion directory. We will use this configuration file as a template and modify it for our...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}