O'Reilly logo

Raspberry Pi Essentials by Jack Creasey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Project 1b – Creating a movement detector with a USB camera

For our security system to record video only when there is action, we need to detect movement. One application that does this very reliably is an application called motion.

There is a version of motion that will work with a PiCam camera, but if we use PiCam to acquire high-resolution images at high frame rates, the CPU resources required by motion will increase significantly. Instead, we will reduce the CPU usage as much as possible by detecting movement at very slow frame rates (2 fps is normally quite adequate) and use a USB webcam to do this. By separating the high-quality, high frame-rate video acquisition task from the movement detection task, we can achieve both reliable operation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required