the evolution of computer vision over the years
this projet aims to automate surveillance using the Raspberry Pi computer and its camera module . This project was inspired by other older works and it's a push towards the AI-powered surveillance as computer vision and IoT are strongly emerging. The main focuses of this project are efficiency and accuracy .
Here's the general Idea/architecture of the project :
If we zoom in on the Raspberry Pi here's what's the script looks like :
the motion detector is completely built using Opencv . It follows these basic steps (the last image is actually for contour and motion detection) :
To secifically detect objects I used cascade classification . this classifiers will detect the object that will trigger the security camera . Here's an overview concerning cascade classifiers :
The GUI that enables the user to intract with the camera and change the settings is developed using Flask :
Here's how the GUI looks like with a live preview :
the user can specify one of many objects to trigger the security camera .Here are some examples :
I used Haar cascade and LBP classifiers just to show the difference ( Haar cascade is more accurate but LBP is faster) :
The GUI enables you to specify the sender and receiver adresses ( gmail only compatible as we are using smtp) :
Here's how the security alert looks like :
First of all code is adapted to the use of a usb camera , so if you're using the pi's camera module you have to make some small changes . I used the Raspberry Pi 4 modeb B with 2GB of RAM . To install OpenCV on the pi , please refer Adrian's tutorial (pyimagesearch.com) To control the Raspberry pi remotely to change settings and whatnot , install the VNC server on the pi , download VNC Viewer app for your Android or IOS device and create an account . This will enable you be fully in control wherever you are ; When everything is set , all you have to do is type these commad to launch the web app :
source ~/.profile
workon cv
python app.py