Warning: file_get_contents(http://feeds.delicious.com/v2/json/urlinfo/data?url=http%3A%2F%2Fwww.thoughtshots.com%2F2011%2F08%2Fturn-a-webcam-into-a-motion-sensing-security-camera%2F): failed to open stream: HTTP request failed! HTTP/1.1 503 Service Unavailable: Back-end server is at capacity in /home/chindaw/thoughtshots.com/wp-content/plugins/digg-digg/include/dd-class.php on line 1202
Thanks to the cheapness and ubiquity of the webcam, it’s now both easy and affordable to roll your own surveillance system. In this video tutorial, I’ll be demonstrating how to turn a cheap webcam into a motion-sensing surveillance camera.
HardwareThe first thing you’ll need, of course, is a webcam. Depending on the quality of the video captured, it’s a purchase that could cost you anywhere between $12 and $100. Unless you’re trying to capture a really wide area, you probably won’t need anything more than the most basic of webcams. An extensive security system is outside the scope of this video, and if you’re planning on spending more than a few bucks on this, it might make more sense to look into an integrated system.
Secondly, you’ll need a computer that you’re okay with leaving on all the time. If your computer isn’t directly located where you want to monitor, you’ll need a USB extension cable, which at the absolute most will cost about $1 per foot. Keep in mind that using any USB cable over 5m (16’5″) will probably see a degradation in image quality.
There’s a lot of different options available to you for recording – at the extremely simple end of the scale, you can just use your webcam’s bundled software and just press the record button. There’s a couple disadvantages to this – notably, if your computer is stolen, you lose all of your recordings on the computer since they’re all saved locally. You can solve this by recording with a streaming video service like Ustream or Justin TV. Ustream, however, has a recording limit of only 3 hours. Justin TV has no limit, but it doesn’t prevent the hassle of having to scrub through hours and hours of footage.
Instead of recording everything, however, you can cut down on your reviewing time by only recording when something’s happening. If you’re running Windows, an application called Yawcam will only take a picture when there’s movement within the frame. You can download it for free from Yawcam.com.
Within the application, you can control the different kinds of recording by pressing any of the 5 buttons in the control window to enable that setting. In this video, I’ll only be going over Motion sensing recording, but Yawcam is a deeply customizable application. If you’re curious about the full extent of its capabilities, check Yawcam’s website for additional information on the other recording settings.
To enable motion recording, press the motion button, and then open the motion detection window from the Window menu. You’ll see this weird blue pointillist image from your webcam on the left with two colored bars underneath. The top green bar is the amount of motion in the image, while the bottom blue bar is the motion tolerance. Anytime the green bar is longer than the blue bar, Yawcam will record this as a motion event and automatically take a photo.
The right side of the window has 3 tabs. The first is Motion Events, and licking on a motion event will bring up the image in a thumbnail below. If I double click on the thumbnail, I can open up a full size version of the image from directly within the application.
The next tab is Actions, which will determine what happens when a motion event occurs. I’m going to just save the image on my computer, and send a copy of the image to my email address.
If I click the Settings button next to the Save file option, I can adjust the image quality, change the folder where it’s saved, among several other options.
In order for Yawcam to send the image, you’ll need to enter your email account information in the Send email Settings. Check Attach Image to send a copy of the image to your email, and make sure your receiving email account has the capacity to handle the attachments. Free webmail services like Gmail or Yahoo Mail are good options for this and provide enough space to handle even the most active of accounts. You’ll also need to enter in the SMTP details from your sending email account in order to send the alerts, which is information you should be able to easily find from your email service provider.
The final tab is Settings, where you can adjust the sensitivity of your motion detection, as well as the tolerance, which sets the level of your blue bar. The easiest way to set this up is just to press the Auto Detect button so Yawcam can automatically adjust your settings. If your camera is pointed at something outside, you’ll need to keep in mind that the difference in lighting at various points during the day can alter the effectiveness of these settings. You’ll need to do some experimenting to get the best settings for your situation.
References & Other Resources
Another really great web-based motion detecting service is Cammster, which will work across all platforms. I couldn’t get it to work quite right with my webcam (it kept defaulting to my iSight camera), which is why it’s not included in the video. Cammster is currently free, though you will have to pay for each SMS alert. Credit to Alan Henry at Lifehacker for the find.
I first learned of Yawcam (along with several other webcam security solutions) from this article by Josh Lowensohn at CNET.
Music & Photo Credits
Photos used in this video were by (in no particular order) Rasmus Olsen, Mike Burns, Phil Campbell, Simone Riccardi, Keith Williamson, yoppy, Saad Akhtar, Peter Kaminski, Dan Previte, KOMUnews, Dushan Hanuska, Yury Primakov, Windell Oskay, and Cory Doctorow. All are used under CC-BY license.