This recognition task is so simple for the human eye that you usually will not waste a single thought on this – but if you try to implement this as a computer algorithm it takes some effort to get a reasonable result. Herbert Kociemba uses the opencv framework and Python in his project and got good results on a PC with a USB webcam and also with the Raspberry Pi and its non-USB camera module.
This project implements the two-phase-algorithm in its fully developed form to solve Rubik’s cube in Python. Though Python is much slower than for example C++ or even Java the implementation is sufficiently fast to solve random cubes in less than 20 moves on average on slow hardware like the Raspberry Pi3 within a few seconds.
If you just want to solve Rubik’s cube and play around with its patterns Cube Explorer may be the better choice. But if you want to get a better understanding of the two-phase-algorithm details, you work on a project to build a cube solving robot or you write software for an NxNxN cube and use the reduction method this may be the right place to look.