• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 35,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

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

Joined
Jan 9, 2014
Messages
663
Likes
217
Location
Yo
WCA
2013GHOD01
YouTube
abunickabhi
#21
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.
 
Joined
Nov 29, 2008
Messages
184
Likes
66
#24
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():
    global cent, width, height, hsv, color_mask, white_mask

    bgrcap = cv2.imread('test.jpg')
    height, width = bgrcap.shape[:2]
    while 1:
        bgrcap = cv2.imread('test.jpg')
        bgrcap = cv2.blur(bgrcap, (5, 5))
[
 
Last edited:
Joined
Apr 13, 2019
Messages
2
Likes
1
#25
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():
    global cent, width, height, hsv, color_mask, white_mask

    bgrcap = cv2.imread('test.jpg')
    height, width = bgrcap.shape[:2]
    while 1:
        bgrcap = cv2.imread('test.jpg')
        bgrcap = cv2.blur(bgrcap, (5, 5))
[
Thank you so much for your work, you helped me a lot for my project
 
Top