Using Motion Control to Solve a Rubik's Cube
Concepts: motion tracking, OpenCV, Python, computer vision
People solve rubik's cubes with two hands, one hand, two feet, lots of ways! But in this project, I set out to solve a cube without touching it at all. Online timer csTimer has a built-in virtual cube where you can use keyboard presses to turn the faces. I decided to translate hand movements to keybinds.
The flow was straightforward - I used OpenCV to threshold the images from my webcam. Masking out irrelevant colors left me with the two blue bags you see in the video thumbnail below. All that was left was to write some logic to connect my hand positions with various keypresses in order to control the virtual cube. This is one of my favorite projects to date.
The flow was straightforward - I used OpenCV to threshold the images from my webcam. Masking out irrelevant colors left me with the two blue bags you see in the video thumbnail below. All that was left was to write some logic to connect my hand positions with various keypresses in order to control the virtual cube. This is one of my favorite projects to date.