OpenCV

Now thankfully, “OpenCV”, or Open Computer Vision is an API (application programming interface) which means that it is a collection of prewritten routines that makes it much easier to start programming computer vision applications.

Most people will use Python to access the OpenCV routines and this can be done with Python installed on a Windows or Mac computer or more properly among programmers, installed on a Raspberry Pi.

The most common thing done with Open CV would be some form of facial or object recognition .

This is where your Mac or Windows or Raspberry pi computer will have either a Webcam plugged into it and you will capture still images or videos and these images will be run through Open CV and the software where it will analyze these images against some images in a database and make some decisions on what to do with the results.

You have probably seen on television, examples of this technology where people are being watched in a crowd scene and we are shown a colored box surround the faces in the scene as the people walk around.

Some will call the use of this tool in public a blantant privacy violation and others will just call it keeping an eye on things for the security of all.

But this technology like most things to do with AI are about data. Massive amounts of data is generated when you aim a video camera at a crowd for more than just a few seconds.

To do this in Python on a Raspberry Pi you would plug in your Pi camera and then access the OpenCV API and type in a handful of commands to start taking pictures and going into a loop where you would analyze the pictures and draw a green box around the image.

In Python you will add some code like “import cv2” and “import time”

Some strange terms you will come across may be “haar cascade” for example.

This is an object detection algorithm that is used to detect faces in video and still images.

You would add some code to your Python program like “case Path=”haarcascade.xml” and “face Cascade=cv2.CascadeClassifier(casePath).

Black and white images as you would expect are easier to analyze.

Just installing Python can be very challenging for beginners so try it the first day and then try it again a few days later and you might understand it better and have success.