# Reading Rubik's Cube states into computer using Computer Vision magic

#### abunickabhi

##### Member
Great work!

Are you aiming for detecting 3-4 faces simultaneously in the future?
Using an orthographic projection to map out the faces on the side, and detect stickers even there is occlusion like our fingers on some sides.
Like in one webcam shot, about 9 stickers upfront + 6-7 stickers on the side may be detected, so that the cube needs just a y2 and the webcam will register the entire cube state.

#### Herbert Kociemba

##### Member
Are you aiming for detecting 3-4 faces simultaneously in the future?
I do not think I can do this successfully. Think alone at the different lightning conditions on the different faces which makes this difficult. So I will stay away from this.

#### Claudeen

##### Member
Is there a way to analyze a photo previously taken instead of using the webcam?

#### Herbert Kociemba

##### Member
Is there a way to analyze a photo previously taken instead of using the webcam?
Yes. In the function grab_colors in vision2.py you can substitute the code given between "def grab_colors():" and "bgrcap = cv2.blur(bgrcap, (5, 5))" in the original code by the lines given below if the image has the name test.jpg and is in the same directory as vision2.py.

Code:
def grab_colors():

height, width = bgrcap.shape[:2]
while 1:
bgrcap = cv2.blur(bgrcap, (5, 5))
[

Last edited:

#### Claudeen

##### Member
Yes. In the function grab_colors in vision2.py you can substitute the code given between "def grab_colors():" and "bgrcap = cv2.blur(bgrcap, (5, 5))" in the original code by the lines given below if the image has the name test.jpg and is in the same directory as vision2.py.

Code:
def grab_colors():