Introduction: CCTV Feed Controller—using Your Laptop's Webcam!

About: "Guitar, Gadgets, Gravity My Three G(uru)'s in Life." I'm a high school senior who's passionate about science (and applying concepts to build new things). I run a YouTube Channel called 'Scientify I…

Hi everyone, welcome to another Instructable by Scientify Inc.!

This is the laptop webcam version of my Instructable (raspberry pi).

This project optimizes what a CCTV camera records by using built in motion sensing using root mean squared (RMS) difference between two consecutive images. This helps in making CCTV feed space efficient and more importantly, easy to review. And it requires a lot less processing power compared to fancy live motion tracking softwares. In today’s times there is an overload of data with there being too much of stuff that no one knows what to do with.

Suppose something gets stolen from your house. With a normal security camera set up at your door, you’d have to go through hours of footage to get to the time when someone entered your house, precious time that the thief could be using to get away. With this program in place, you’d be directly to the point where something is happening at your front door, making the process quicker. Now while the same can be achieved using a motion detector, not everyone can afford such an expensive equipment. And getting a cheap motion sensor This code greatly reduces the cost because it is light enough to run on a Raspberry Pi also.

Without further ado, let's get to the project!

Supplies

  1. A MacBook/Mac (or a Windows Laptop but the program will need to be altered for Windows Laptops)

Well...that's it!

Step 1: Setup XCode to Run the Program

The step-wise instructions to setup XCode for our Python project can be found in the 6 images attached above.

Step 2: Program

Please note:

  1. You may adjust the floor for the RMS difference after which recording may start (as the ideal floor value will depend on your device and the way you place it). A little testing should reveal that sweet spot.
  2. The program attached only clicks the images and returns the rms difference. A very simple simple 'if rmsdiff > 70: start recording' statement can be added using OpenCV's record function for Mac.

Step 3: Output

The images show that I was able to capture the images, show the frame, and print the rms difference.

Thank you for checking out the project! Please follow me for more such interesting projects. I think you'll find this project particularly delightful: a rover operated by intuitive hand gestures. Do check out my YouTube channel if you love science!

Please share your comments below. I'd love to hear about your experience while trying out the project! I'll try to respond to all queries within 24 hours.

Social:
YouTube: Scientify Inc.

YouTube: Scientify हिंदी

Instagram

Instructables

LinkedIn