OpenCV overview and image processing projects

Thursday, September 7, 2017

Nowadays you can often hear of using OpenCV especially in projects related to computer vision. So you ask, what is OpenCV? How is it used? Hope you will find some answers below! So, OpenCV is a library which is mainly used for image processing projects. OpenCV is open-sourced and it’s cross platform, which makes it extremely convenient to use. It supports following frameworks: Caffe, TensorFlow, and Torch/PyTorch. It is written mainly in C++ (and runs primarily in C++ interface), however, it has bonds in Python, Java, and MATLAB. OpenCV works on different platforms, e.g. macOS, Windows, Linux, and some others. It also can be used for mobile applications development.

Theory is good, but practice is better, do you agree? Let’s have a look at two of Pro Vision Lab’s successfully completed OpenCV image processing projects.  

The objective of one of OpenCV projects was playing cards on the poker table recognition. The images were preliminarily processed using OpenCV, then those images passed through CCNN (Cascade Convolutional Neural Network) and the result was the following: the position of the card, its suit and rank were received.

The main problems, which our developers faced:

1. Homography – the table is often seen at an angle. Solution: setting the homography for each camera separately, using OpenCV;

2. Overlapping cards, non-trivial positions (Black-Jack game). Solution: use CCNN in lieu of other standard and obvious approaches.

The technologies which were used for this project: C++, GUI on C#, OpenCV, Caffe, CCNN. OS Windows.

The other OpenCV based project we are happy to share was image processing project using OpenCV. It was successfully completed as well. The objective was people detection and identification by their faces.  Images were captured using OpenCV, and then faces were detected using MTCNN (Multi-task Cascaded Convolutional Neural Network). Detection was based on face rectangle + 5 dots: eyes, nose, and mouth corners. Afterwards, feature extraction from the face was made with the help of CNN and the person was indicated and recognized. There were no problems with this project detected. The technologies which were used for this project: C++, GUI on C# and Qt, OpenCV, Caffe, CNN. OS Windows, Linux (Ubuntu).