# rubiks-cube-tracker: locate a NxNxN rubiks cube in an image or video



## dwalton76 (Mar 3, 2017)

rubiks-cube-tracker is written in python and uses opencv to locate a rubiks cube in an image or video feed. The source code is available here:
https://github.com/dwalton76/rubiks-cube-tracker

Here it is in action:





"spacebar" to capture the colors of the current side
"r" to reset everything
ESC to exit the program
Blog post on exactly how it works:
http://programmablebrick.blogspot.com/2017/02/rubiks-cube-tracker-using-opencv.html

I have tested up to 6x6x6 but it should work for larger cubes if the squares are all the same size. I realize that is not the case for many cubes 7x7x7 and larger...it is fixable I just haven't gotten around to it.


----------



## Genius4Jesus (Mar 3, 2017)

Not much of a programmer myself, but this looks really neat! Great work!


----------



## jfly (Mar 9, 2017)

This is awesome! Feel free to send in a PR to https://github.com/cubing/cube-code if you'd like it to show up on http://cubing.github.io/cube-code/.


----------

