Arduino Image processing CCTV camera system using VB.net

(Last Updated On: July 17, 2019)

image processing

Description:

In this Project “Arduino Image processing CCTV camera system”, you will learn how to make your own Arduino based CCTV camera system using image processing, Arduino Uno and PIR sensor. In this tutorial vb.net “Visual Basic” will be used for making the image processing application. This application works together with the PIR sensor connected with Arduino Uno. Once the human is detected by the PIR sensor and also by the image processing application, then a picture is captured automatically and is saved in a folder.

This is the 2nd version of the image processing based project, while in version 1 of the image processing I used the image processing for opening and closing the entrance using the electronic lock. If you want to watch Image processing based entranced controlled system then click on the link below.


https://www.electroniclinic.com/arduino-image-processing-based-entrance-lock-control-system/

For the image processing application designing Visual Basic .net will be used. Image processing application designing in vb.net is really simple. In this application, the Frontal face XML file is used for human recognition. Once the human face is detected by the computer application and a signal from the Arduino is also received, then a picture will be taken automatically and will be saved in the desired folder.

The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
Pir motion sensor: https://amzn.to/2KWErNd
the best camera with night vision: “Must purchase this one”: https://amzn.to/2NIVpjU
12v 10A SPDT relay: https://amzn.to/2MThQBK
2n2222 npn transistors: https://amzn.to/2EmXsIb
10k Resistor: https://amzn.to/2KTd6OW
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wire cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF

Circuit Diagram:

Arduino image processing

As you can see the circuit diagram is really easy, all you need is just to connect the PIR sensor with the Arduino Uno pin number 4, and the VCC and ground with the Arduino’s 5v and ground respectively.


Arduino Programming:

Arduino Programming is very simple. I started by defining the pin for the PIR sensor. The PIR Sensor is connected with the Arduino’s Pin number 4. If you want you can use any other Pin. Then I defined another variable flag which is of the type integer. This variable is initially set to Zero. The variable flag will be used to stop the unnecessary repetition of code.

the word void, when used before the function name, means that this function has no return type. If you look you will find the parenthesis are also empty, which means that this function is not taking any argument as the input. So the void setup function has no return type and it also does not take any argument as the input.

To active the Serial communication for this we use a function Serial.begin(), this is a built-in function and it takes one argument as the input, which is the baud rate. The PIR sensor is set to input using the pinMode function. the void setup function is executed only one time when the controller is turned ON.


The void loop function runs infinite times until you stop it. The void loop function also has no return type and it does not take any argument as the input.

As you can see clearly the void loop function consists of only two if conditions. the purpose of these if conditions are to find out if the PIR sensor has detected in movement and send the desired message to the computer application using the Serial.print function. You might have noticed one thing the flag status is changed each time. This is just to stop the unnecessary repetition and to send the message only one time when the human is detected.

Computer Image Processing Application:

For the application designing and program explanation you can watch a video given at the end of this Article.


Watch Video Tutorial:

 

Other Image Processing Projects:

Arduino image processing Eye Pupil Tracking, how to make Haarcascade XML file

 

OCR Optical Character recognition using VB.net and Arduino

 

Arduino Image Processing based Entrance lock Control System

 

 

 

 

 

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

5 Comments

  1. Can we use this for detecting an ambulance??
    Please do reply as soon as possible…Your response matters a lot to me since I am working on a project of detecting an ambulance

  2. Thank you so much for your reply…I have the .xml file ready with me which i have trained earlier using Cascade GUI Trainer.I am little confused where to use that .xml file in your given code.Can you please help me out in sorting my problem?? Thank you..

  3. Thank you for your reply..I have an .xml file ready with me,which I have trained using Cascade GUI Trainer.I am little confused where to use that .xml file in your given code.Can you please help me out in sorting this issue???

    Thank you..

    1. in my programming replace the front face XML with yours one. Watch my video on eye pupil tracking, in that video, I have explained this. watch that video completely and don’t skip any part. You will completely understand how to add your XML file in my program.

Leave a Reply