Computer sees rubiks cube and solves it
Check out this cool video of CV Rubik a computer app written in C++ as “looks” at a Rubiks cube using a webcam and then proceeds to solve it.
[video]http://www.youtube.com/watch?v=uWhvY3lPlQ4[/video]
CV Rubik is a C++ application that solves a 3×3 Rubik’s cube. It uses a webcam to “look” at a Rubik’s cube and generate a step by step solution in 3D graphics. CV Rubik draws on knowledge from different fields of computer science such as Computer Vision, Artificial Intelligence and 3D Graphics. The following steps are performed by the program at runtime:
1. The user holds a scrambled 3×3 Rubik’s Cube in front of the webcam.
2. Using the OpenCV library, the live video feed is processed to locate the cube in the input image and determine the 9 colors of the frontal face.
3. The user rotates the cube 5 times for the software to capture all the other faces.
4. Using OpenGL, a 3D cube that matches the original one is created and displayed on the screen.
5. The cube is solved one step at a time using the solution published in 1981 in the DER SPIEGEL magazine.
Note: If no webcam or cube are available, the software gives the option to generate a random cube.