C++/OpenCV project to detect and count values on dominoes.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



This is a small C++ project in which uses the OpenCV Library 3.0. The purpose of this project is to detect and count the values on dominoes. Some simple processing is applied to the image in order to locate the dominoes within the video stream. Once found the dominoes are sliced out of the video steam into their own individual images and passed to another function in which attempts to read the values of the dominoes as two separate values (Top and bottom or left and right depending on the orientation of the domino).

This is not a perfect process and however it can be accruate in the right environment. Ideally you would like to place your camera directly above the dominoes facing down at them. The camera should be approximate 1.5ft away from the scene. Lighting in the scene should be good (however, please note that if you dominoes are shiney then a bright light may cause the algorithm to fail due to the reflective surface).

Here is an exammple of the system working.


Also note that very noisy backgrounds can cause the process to fail as it may be unable to detect the edges of the domino.


Additional Resources

OpenCV Library https://opencv.org/opencv-3-0.html