Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Motion Detection With a Web Cam

  1. #1

    Post Motion Detection With a Web Cam

    This tutorial is aimed at those who seek a degree of protection with the installation of a motion detecting web camera.

    One often overlooked area in computer security is physical security. Your own home computer can be a powerful tool used to protect your assets. One simple and rather inexpensive way to add a bit of security to your home is to install a web camera with motion detection capablities. (*Warning*: it probably isn't a good idea to install a camera into an office, public area, or other workplace without express written consent of the owners. You may violate laws and company policies otherwise, and its just plain creepy.) This may sound complicated but, infact with a little patience it can be done, and work quite well. This tutorial will focus primarily around *nix based systems and the excellent software named Motion.

    Some basic supplies needed will be:

    -A camera that is supported by your operating system. (Many common webcams have support built into the lastest linux kernels.)
    -An open USB slot on your computer.
    -USB extension cords if you plan to put the darn thing on your roof.
    -Software with motion detection capablities. (Some Windows drivers come with this, for *nix a good one to use is Motion. http://motion.sourceforge.net)
    -Some patience, and some sort of heavily caffeinated beverage.
    Optional:
    -mpeg_encode for Motion to convert jpeg to mpeg.
    -ffmpeg if you want realtime mpeg encoding for Motion.

    The Setup:

    -First plug the webcam into an open usb slot on your computer.
    -Next fire it up!
    -If using Windows, you will now need to install the drivers that likely came with the camera.
    -If using *nix, hopefully the camera is automatically detected by the kernel upon startup. (If it is not, there are many websites that provide detailed instructions to get it working.)
    -Next you need to find a good location for the camera, preferably one with full coverage of the area to be protected.
    -XawTV for *nux is a decent utility to see what the camera is seeing. (You may need to adjust the settings if you have a TV card, the webcam is likely video0 or video1)

    Installing Motion:

    -Motion is a superb piece of software that allows jpegs to be taken whenever a motion event occurs, and then automatically converted to mpeg.
    -Follow the install instructions on the website that I provided earlier. The quick way is this:
    1) cd /usr/local
    2) tar -xvzf /PATH/motion-VERSION.tar.gz
    3) cd motion-VERSION
    4) ./configure
    5) make
    6) make install
    -Next, determine if the default settings in /usr/local/etc/motion.conf (default location) are ok for your setup. You may need to adjust these settings with care though!

    Running Motion:

    -It is useful to type 'motion -h' to see some of the options available.
    -Run motion. (Example: motion -B -Q -f 4 -t /home/user/Video)
    -That's it! You survived!

    Hopefully this will be enough information for the average person to get going. If not, there is a great deal of info available on the web. Just use the all powerful Google. Let me also say that I am certainly no expert on this, so forgive my ignorance. I have attached below a sample image that my camera has taken. (The white box in the image is the location where Motion detected movement, cool huh?)
    \"Is this heaven? No, this is Iowa.\"
    -Field of Dreams

  2. #2
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    Nice little tutorial. I'd like to add my little testimonial...

    I have setup a couple of these. I have one that I setup that will keep an eye in the communications room in my hotsite. All I have to do is point my web browser at it... enter a couple of passwords and I can see everything in there. I can move the camera, zoom, take still shots and everything. It is pretty nice... I can even zoom to the point that I can read the lights on equipment of something like a failing UPS so I know its time to replace. This is great because I don't have to drive all the way down there all the time to find out that everything is OK. That along with logs from servers and other monitoring devices... makes my live so much easier!

    I have also setup something like this to catch a "snooper" in action. I had a problem when I would leave the house I'd lock my bedroom door. Even though I had a lock on it... someone was using a credit card to get it. I didn't know it at the time.. but when I'd come home, I'd notice little things being moved... or my closet had gone through... or a shirt missing.

    I setup the cam and I had it email me at work when it detected motion. Sure enough... 2 hrs after I got to work... I recieved an urgent email. I viewed a snapshot and then made a call home. I asked someone to keep an eye on my room cause I thought someone was going in there. Again, I recieved an email with a snapshot.

    When I came home, I asked if anyone was in my room... they claimed that nobody was in my room... so I called them into my room and pulled up the video along with snapshots of the person in my room and what they were doing.

    They bout sh17 in their pants...

    Needless to say... I haven't had a problem since!

    It works! Is it an invasion of privacy? Who cares! Its your property... do with it what you want.
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  3. #3
    AO Part Timer
    Join Date
    Feb 2003
    Posts
    331
    Originally posted here by phishphreek80


    It works! Is it an invasion of privacy? Who cares! Its your property... do with it what you want.
    It is a shame that things like this are needed to keep people honest. But I agree with ya phish.

    theuser

    Nice tutorial, I like learning new things.
    Your heart was talking, not your mind.
    -Tiger Shark

  4. #4
    Senior Member RoadClosed's Avatar
    Join Date
    Jun 2003
    Posts
    3,834
    Nice toot,

    I was looking at some windows versions that were very expensive at smarthome.com. This one seems much better. Been contemplating this and whole house automation for a while. smarthome has some kewl stuff and your tutorial hits a nice interest peak I have in the subject. Thank you.
    West of House
    You are standing in an open field west of a white house, with a boarded front door.
    There is a small mailbox here.

  5. #5
    Senior Member
    Join Date
    Aug 2002
    Posts
    113

    Thumbs up

    Thanks for the tutorial. Got to try this for sure...seems interesting. I hope it works for the windows part as well.

    Phishphreek80, you did not tell us that how you achieved it. What kind of software you used and stuff like that. I am really interested in knowing that and if you implemented it on a Win machine then I am more than eager to know all about it.
    Beware Clarity! A person talking to you in clear language is clearly using obsolete ideas.

  6. #6
    Senior Member
    Join Date
    Mar 2003
    Posts
    217
    does anyone know of some decent and cheap windows software for this?
    i\'m starting to think that i\'m bound to always be the first guy on the second page of the thread.

  7. #7
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    For home, I used the creative webcam III and the software that came with it. It had all of the monitoring functionality in the little package that came with it. It was a cheepie and it did what I wanted it to. If you look in my profile, the pic of my PCs is about the quality you you are going to get. Yes, I did this one on a XP box. Though, it will work in linux too with extra software similar to the one theuser mentioned above.

    For the other setup... I used the KX-HCMxxx

    The KX-HCM230 is a pretty nice one... and it worked well for what I needed. Positioning is key!

    It is a little pricy... but if you have the budget... its well worth it.
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  8. #8
    Senior Member
    Join Date
    Mar 2003
    Posts
    217
    thanks phish, this is a good idea. I think that i might take an old 350 mhz box and make a security system for myself.

    does anyone know if you can run multiple webcam apps on a computer? i mean can you just put like a 120 gig HD in your box, and have 3 cams running and recording, for legitimate security issues (one on the front door, one on the back door, and one near the window, or whatever)

    i'm sure it's cheaper than ADT, and i can have it email my cellphone when something goes on.


    i\'m starting to think that i\'m bound to always be the first guy on the second page of the thread.

  9. #9
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    The creative one I posted will not allow you to use more than one camera at a time with the included software. There might be open source software that will do it as they call them by different device names and etc. /dev/vid0 /dev/div1 etc. That camera is pretty crappy anyway. I just used it cause it was cheap and I wanted to catch a snooper.

    The other link I posted for the panosonic will, however, if you want to use it for security... you will need the sensor too... which means more $$. It is already pretty pricy as it is. Remember... if someone is going to break in... and you are storing the video on your computer... they will most likey take your computer too. Which means... the system is useless.

    I just like it for the realtime web browser based monitoring. Little zoom, and you can move the camera around. Its nice for keeping an eye on restricted rooms and if the camera is close enough... you can see the status lights on equipment.

    I saw a nice little security setup at COMPUSA a while back. I'll see if I can find it for you. It is a wireless system (which sux cause ppl can war drive it... but if its just looking at your front and back door... who cares) and is a lot cheaper. Check out their site if you see this before I post it. Its similar to those X-11 camera ads you see online all the time. Except this one is built to work with several cameras and etc.
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  10. #10
    Senior Member RoadClosed's Avatar
    Join Date
    Jun 2003
    Posts
    3,834
    Most wireless systems use 2 ghz microwave range that is fairly directional so you should be safe from less savvy attackers. You really wouldn't be able to disrupt it without drawing some attention to your self. It does add a lot to the cost though and you need to power the transmitter somehow. I would stay away from it unless you want a very remote location. I have though about a small bullet camera over my driveway in the garage vent many times. You can run the video cable and power cable right back to your computer. I would shove mine in the crawl space under the house for protection against theft.
    West of House
    You are standing in an open field west of a white house, with a boarded front door.
    There is a small mailbox here.

Posting Permissions

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