A webcam-based 3x3x3 rubik's cube solver written in Python 3 and OpenCV.

Overview

Qbr

Qbr, pronounced as Cuber, is a webcam-based 3x3x3 rubik's cube solver written in Python 3 and OpenCV.

  • 🌈 Accurate color detection
  • 🔍 Accurate 3x3x3 rubik's cube detection
  • 🔠 Multilingual

Solve mode

solve mode

Calibrate mode

Isn't the default color detection working out for you? Use the calibrate mode to let Qbr be familiar with your cube's color scheme. If your room has proper lighting then this will give you a 99.9% guarantee that your colors will be detected properly.

Simply follow the on-screen instructions and you're ready to go.

calibrate mode calibrate mode success

Table of Contents

Introduction

The idea to create this came personally to mind when I started solving rubik's cubes. There were already so many professional programmers around the world who created robots that solve a rubik's cube in an ETA of 5 seconds and since 2016 in 1 second (link). That inspired me to create my own. I started using images only and eventually switched to webcam.

Installation

$ git clone --depth 1 https://github.com/kkoomen/qbr.git
$ cd qbr
$ python3 -m venv env
$ source ./env/bin/activate
$ pip3 install -r requirements.txt

Usage

Make sure you run source ./env/bin/activate every time you want to run the program.

Run Qbr:

$ ./src/qbr.py

This opens a webcam interface with the following things:

The first 9-sticker display (upper left corner)

This is preview mode. This will update immediately and display how Qbr has detected the colors.

The second 9-sticker display (upper left corner)

This is the snapshot state. When pressing SPACE it will create a snapshot in order to show you what state it has saved. You can press SPACE as many times as you'd like if it has been detected wrong.

Amount of sides scanned (bottom left corner)

The bottom left corner shows the amount of sides scanned. This is so you know if you've scanned in all sides before pressing ESC.

Interface language (top right corner)

In the top right corner you can see the current interface language. If you want to change the interface language you can press l to cycle through them. Continue to press l until you've found the right language.

Default language is set to English.

Available languages are:

  • English
  • Hungarian
  • Deutsch
  • French
  • Dutch
  • 简体中文

Full 2D cube state visualization (bottom right corner)

This visualization represents the whole cube state that is being saved and can be used to confirm whether the whole cube state has been scanned successfully.

Calibrate mode

The default color scheme contains the most prominent colors for white, yellow, red, orange, blue and green. If this can't detect your cube its colors properly then you can use calibrate mode.

Press c to go into calibrate mode in order to let Qbr be familiar with your cube's color scheme. Simply follow the on-screen instructions and you're ready to go.

Note: Your calibrated settings are automatically saved after you've calibrated your cube successfully. The next time you start Qbr it will automatically load it.

Tip: If you've scanned wrong, simple go out of calibrate mode by pressing c and go back into calibrate by pressing c again.

Getting the solution

Qbr checks if you have filled in all 6 sides when pressing ESC. If so, it'll calculate a solution if you've scanned it correctly.

You should now see a solution (or an error if you did it wrong).

How to scan your cube properly?

There is a strict way of scanning in the cube. Qbr will detect the side automatically, but the way you rotate the cube during the time you're scanning it is crucial in order for Qbr to properly calculate a solution. Make sure to follow the steps below properly:

  • Start off with the green side facing the camera and white on top, green being away from you. Start by scanning in the green side at this point.
  • After you've scanned in the green side, rotate the cube 90 or -90 degrees horizontally. It doesn't matter if you go clockwise or counter-clockwise. Continue to do this for the green, blue, red and orange sides until you are back at the green side.
  • You should now be in the same position like you started, having green facing the camera and white on top. Rotate the cube forward 90 degrees, resulting in green at the bottom and white facing the camera. Start scanning in the white side.
  • After you've scanned the white side, turn the cube back to how you started, having green in front again and white on top. Now rotate the cube backwards 90 degrees, resulting in green on top and yellow facing the camera. Now you can scan in the last yellow side.

If you've done the steps above correctly, you should have a solution from Qbr.

Keybindings

  • SPACE for saving the current state

  • ESC quit

  • c toggle calibrate mode

  • l switch interface language

Paramaters

You can use -n or --normalize to also output the solution in a "human-readable" format.

For example:

  • R will be: Turn the right side a quarter turn away from you.
  • F2 will be: Turn the front face 180 degrees.

Example runs

$ ./qbr.py
Starting position:
front: green
top: white

Moves: 20
Solution: U2 R D2 L2 F2 L U2 L F' U L U R2 B2 U' F2 D2 R2 D2 R2
$ ./qbr.py -n
Starting position:
front: green
top: white

Moves: 20
Solution: B2 U2 F' R U D' L' B' U L F U F2 R2 F2 D' F2 D R2 D2
1. Turn the back side 180 degrees.
2. Turn the top layer 180 degrees.
3. Turn the front side a quarter turn to the left.
4. Turn the right side a quarter turn away from you.
5. Turn the top layer a quarter turn to the left.
6. Turn the bottom layer a quarter turn to the left.
7. Turn the left side a quarter turn away from you.
8. Turn the back side a quarter turn to the right.
9. Turn the top layer a quarter turn to the left.
10. Turn the left side a quarter turn towards you.
11. Turn the front side a quarter turn to the right.
12. Turn the top layer a quarter turn to the left.
13. Turn the front side 180 degrees.
14. Turn the right side 180 degrees.
15. Turn the front side 180 degrees.
16. Turn the bottom layer a quarter turn to the left.
17. Turn the front side 180 degrees.
18. Turn the bottom layer a quarter turn to the right.
19. Turn the right side 180 degrees.
20. Turn the bottom layer 180 degrees.

Inspirational sources

Special thanks to HaginCodes for the main inspiration on how to improve my color detection.

https://github.com/HaginCodes/3x3x3-Rubiks-Cube-Solver

http://programmablebrick.blogspot.com/2017/02/rubiks-cube-tracker-using-opencv.html

https://gist.github.com/flyboy74/2cc3097f784c8c236a1a85278f08cddd

https://github.com/dwalton76/rubiks-color-resolver

License

Qbr is licensed under the MIT License.

Comments
  • error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

    error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

    I get:

    dmd@atto …/qbr on  master via 🐍 v3.9.6 (env) took 14s
    ✖1 ❯ ./src/qbr.py
    Traceback (most recent call last):
      File "/Users/dmd/qbr/./src/qbr.py", line 82, in <module>
        Qbr(args.normalize).run()
      File "/Users/dmd/qbr/./src/qbr.py", line 38, in run
        state = webcam.run()
      File "/Users/dmd/qbr/src/video.py", line 477, in run
        grayFrame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
    cv2.error: OpenCV(4.5.1) /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-p3unqtkr/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
    
    opened by dmd 4
  • Freetype Attribute not found

    Freetype Attribute not found

    AttributeError: module 'cv2.cv2' has no attribute 'freetype'

    Completely new with CV. Found this a cool project to start with. I was unable to find a solution for the AttributeError. Thank you.

    opened by vishaln15 4
  • Error on pip3 install -r requirements.txt

    Error on pip3 install -r requirements.txt

    Hello

    I'm on linux (Ubuntu 22.04.1 LTS)

    The command pip3 install -r requirements.txt gives an error

    in

    Collecting opencv-python==4.5.1.48 Using cached opencv-python-4.5.1.48.tar.gz (88.3 MB) Installing build dependencies ... -

    After a long time

    Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [865 lines of output] Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64"' don't match your environment Ignoring numpy: markers 'python_version >= "3.6" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64"' don't match your environment Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64"' don't match your environment

    bug 
    opened by Fr3d-P 3
  • (Request) Re-code/Delete part of the code that causes: (module 'cv2.cv2' has no attribute 'freetype').

    (Request) Re-code/Delete part of the code that causes: (module 'cv2.cv2' has no attribute 'freetype').

    Hi @kkoomen, first of all, I know the issue regarding: (module 'cv2.cv2' has no attribute 'freetype') has been already discussed. Because I could not find any solution to this, i was wondering if you knew any other method or way to "re-code" the project so that the problematic part of the code is eliminated, (even if this means that it will have less functionalities). Thank you in advanced, (amazing work btw).

    opened by wast0 3
  • module 'cv2.cv2' has no attribute 'freetype'

    module 'cv2.cv2' has no attribute 'freetype'

    Been having trouble getting qbr running for the past week or so, long story short, now running it in a Linux Mint VM and thought I'd ask for some help.

    The issue I am now stuck on is "module 'cv2.cv2' has no attribute 'freetype'" when I run "python3 qbr.py".

    I have done a lot of testing and am able to access my webcam through opencv from another script I wrote. I am also fairly positive that I have all the dependencies properly installed.

    The full output is as follows:

    (env) ben@ben-VirtualBox:~/qbr-2/qbr/src$ python3 qbr.py Traceback (most recent call last): File "qbr.py", line 84, in Qbr(args.normalize).run() File "qbr.py", line 40, in run state = webcam.run() File "/home/ben/qbr-2/qbr/src/video.py", line 504, in run self.draw_current_language(frame) File "/home/ben/qbr-2/qbr/src/video.py", line 343, in draw_current_language (textsize_width, textsize_height), _ = self.get_text_size(text) File "/home/ben/qbr-2/qbr/src/video.py", line 276, in get_text_size ft2 = self.get_freetype2_font() File "/home/ben/qbr-2/qbr/src/video.py", line 263, in get_freetype2_font ft2 = cv2.freetype.createFreeType2() AttributeError: module 'cv2.cv2' has no attribute 'freetype'

    Thanks for any help.

    opened by ArduinoBen 3
  • AttributeError: module 'cv2.cv2' has no attribute 'freetype'

    AttributeError: module 'cv2.cv2' has no attribute 'freetype'

    I'm trying to execute the program but after run ./src/qbr.py I get

    Traceback (most recent call last): File "./src/qbr.py", line 82, in <module> Qbr(args.normalize).run() File "./src/qbr.py", line 38, in run state = webcam.run() File "/.../qbr/src/video.py", line 504, in run self.draw_current_language(frame) File "/.../qbr/src/video.py", line 343, in draw_current_language (textsize_width, textsize_height), _ = self.get_text_size(text) File "/.../qbr/src/video.py", line 276, in get_text_size ft2 = self.get_freetype2_font() File "/.../qbr/src/video.py", line 263, in get_freetype2_font ft2 = cv2.freetype.createFreeType2() AttributeError: module 'cv2.cv2' has no attribute 'freetype'

    I'm using Debian 10 as a Virtual Machine (VirtualBox)

    opened by joseluislo12 2
  • AttributeError: module 'cv2.cv2' has no attribute 'freetype'`

    AttributeError: module 'cv2.cv2' has no attribute 'freetype'`

    Windows

    Traceback (most recent call last):
      File "k:\Project\qbr\src\qbr.py", line 83, in <module>
        Qbr(args.normalize).run()
      File "k:\Project\qbr\src\qbr.py", line 39, in run
        state = webcam.run()
      File "k:\Project\qbr\src\video.py", line 504, in run
        self.draw_current_language(frame)
      File "k:\Project\qbr\src\video.py", line 343, in draw_current_language
        (textsize_width, textsize_height), _ = self.get_text_size(text)
      File "k:\Project\qbr\src\video.py", line 276, in get_text_size
        ft2 = self.get_freetype2_font()
      File "k:\Project\qbr\src\video.py", line 263, in get_freetype2_font
        ft2 = cv2.freetype.createFreeType2()
    AttributeError: module 'cv2.cv2' has no attribute 'freetype'
    
    opened by AhmedDawoud3 2
  • [styling] PEP8, Mypy and styling changes

    [styling] PEP8, Mypy and styling changes

    Mostly PEP8 and Mypy (typing) related touch-ups as well as some PyCharm-Inspection touch-ups and finally a few additional ones.

    Also, due to full type-hinting support, had to expose/import "ndarray" from numpy which is used in OpenCV's APIs. numpy was anyway an indirect dependency and not it has become a direct dependency. Pipefile(s) have been updated and requirements.txt has been re-generated (via pipenv lock -r > requirements.txt).

    In high-level, these are the main (PEP8/Mypy) changes:

    1. Handing import in general-to-specific order
    2. Removed exception handling for imports of built-ins and internal modules
    3. Made static-able methods @staticmehtod(s)
    4. Add Type-Hinting
    5. Shorten too-long lines
    6. Many "x,y,z" cases replaced with "x, y, z"

    NOTE1: After this PR, code now is PyCharm-Inspection and Mypy warning/error free NOTE2: PR is based on https://github.com/kkoomen/qbr/pull/6 due to the need to update the numpy dependency in the Pipfile(s) and re-generate the requirements.txt.

    opened by eyalf-st 2
  • Color-detection is not working well

    Color-detection is not working well

    I am not sure why, but, the color detection is not working too well for me (can send some images if needed). The colors that are detected are pretty unstable/jumpy as well.

    BTW, i already have a suggestion for a new coolor-detection scheme and would love to push it as a PR for you to review/pull if you want. At the moment your Repo is locked for pushing new branches/PRs :(.

    opened by eyalf-st 2
  • setup.py install for kociemba error

    setup.py install for kociemba error

    I got out my old MacBook to run this program natively, but am unfortunately running into more problems. In this case it seems to be an issue with installing kociemba. Below are the error messages:

    Running setup.py install for kociemba ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/benadmin/Desktop/qbr_new/qbr/env/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s3/fnjbxfc56qsg4mv754_c66100000gp/T/pip-install-hmrl842e/kociemba_d13851209ca6400a96cf6a7da4a0fcb9/setup.py'"'"'; __file__='"'"'/private/var/folders/s3/fnjbxfc56qsg4mv754_c66100000gp/T/pip-install-hmrl842e/kociemba_d13851209ca6400a96cf6a7da4a0fcb9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/s3/fnjbxfc56qsg4mv754_c66100000gp/T/pip-record-zxvnkqy3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/benadmin/Desktop/qbr_new/qbr/env/include/site/python3.9/kociemba
         cwd: /private/var/folders/s3/fnjbxfc56qsg4mv754_c66100000gp/T/pip-install-hmrl842e/kociemba_d13851209ca6400a96cf6a7da4a0fcb9/
    Complete output (76 lines):
    WARNING: The wheel package is not available.
    Warning: 'classifiers' should be a list, got type 'tuple'
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.9
    creating build/lib.macosx-10.9-x86_64-3.9/kociemba
    copying kociemba/command_line.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba
    copying kociemba/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba
    copying kociemba/build_ckociemba.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba
    creating build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/FRtoBR_Move -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/URFtoDLF_Move -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/MergeURtoULandUBtoDF -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/URtoDF_Move -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/twistMove -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/URtoUL_Move -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/Slice_URtoDF_Parity_Prun -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/Slice_Twist_Prun -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/flipMove -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/UBtoDF_Move -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/Slice_URFtoDLF_Parity_Prun -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    copying kociemba/cprunetables/Slice_Flip_Prun -> build/lib.macosx-10.9-x86_64-3.9/kociemba/cprunetables
    creating build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/color.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/edge.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/tools.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/cubiecube.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/facecube.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/coordcube.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/corner.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/search.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    copying kociemba/pykociemba/facelet.py -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba
    creating build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/MergeURtoULandUBtoDF.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/twistMove.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/Slice_Flip_Prun.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/URtoDF_Move.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/FRtoBR_Move.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/flipMove.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/Slice_URFtoDLF_Parity_Prun.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/Slice_URtoDF_Parity_Prun.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/UBtoDF_Move.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/URtoUL_Move.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/URFtoDLF_Move.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    copying kociemba/pykociemba/prunetables/Slice_Twist_Prun.pkl -> build/lib.macosx-10.9-x86_64-3.9/kociemba/pykociemba/prunetables
    creating build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba
    creating build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/facecube.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/edge.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/prunetable_helpers.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/cubiecube.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/facelet.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/color.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/corner.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/search.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/include/coordcube.h -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba/include
    copying kociemba/ckociemba/coordcube.c -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba
    copying kociemba/ckociemba/search.c -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba
    copying kociemba/ckociemba/facecube.c -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba
    copying kociemba/ckociemba/cubiecube.c -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba
    copying kociemba/ckociemba/prunetable_helpers.c -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba
    copying kociemba/ckociemba/solve.c -> build/lib.macosx-10.9-x86_64-3.9/kociemba/ckociemba
    running build_ext
    generating cffi module 'build/temp.macosx-10.9-x86_64-3.9/kociemba.ckociembawrapper.c'
    creating build/temp.macosx-10.9-x86_64-3.9
    building 'kociemba.ckociembawrapper' extension
    creating build/temp.macosx-10.9-x86_64-3.9/build
    creating build/temp.macosx-10.9-x86_64-3.9/build/temp.macosx-10.9-x86_64-3.9
    creating build/temp.macosx-10.9-x86_64-3.9/kociemba
    creating build/temp.macosx-10.9-x86_64-3.9/kociemba/ckociemba
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ikociemba/ckociemba/include -I/Users/benadmin/Desktop/qbr_new/qbr/env/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c build/temp.macosx-10.9-x86_64-3.9/kociemba.ckociembawrapper.c -o build/temp.macosx-10.9-x86_64-3.9/build/temp.macosx-10.9-x86_64-3.9/kociemba.ckociembawrapper.o -std=c99 -O3 -D_XOPEN_SOURCE=700
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
    

    ERROR: Command errored out with exit status 1: /Users/benadmin/Desktop/qbr_new/qbr/env/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s3/fnjbxfc56qsg4mv754_c66100000gp/T/pip-install-hmrl842e/kociemba_d13851209ca6400a96cf6a7da4a0fcb9/setup.py'"'"'; file='"'"'/private/var/folders/s3/fnjbxfc56qsg4mv754_c66100000gp/T/pip-install-hmrl842e/kociemba_d13851209ca6400a96cf6a7da4a0fcb9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/s3/fnjbxfc56qsg4mv754_c66100000gp/T/pip-record-zxvnkqy3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/benadmin/Desktop/qbr_new/qbr/env/include/site/python3.9/kociemba Check the logs for full command output.

    I'm on MacOS Catalina with Python 3.9.6 and made sure to use pip3. Thanks for any help, I'm not very experienced with Python.

    opened by ArduinoBen 1
  • Issue with kociemba

    Issue with kociemba

    I have issue when installing Kociemba library, i type pip install in cmd and it says this error to me, can someone help me? https://prnt.sc/xlbbe7 https://prnt.sc/xlbaut https://prnt.sc/xlba4x https://prnt.sc/xlb7md

    opened by ghost 1
  • Support for Windows

    Support for Windows

    Please have a look and if you can help, think can help a lot of people on windows environment.

    C:\Users\maiqu\Documents\repos\qbr>pip3 install -r requirements.txt Requirement already satisfied: cffi==1.14.4 in c:\python39\lib\site-packages (from -r requirements.txt (line 1)) (1.14.4) Requirement already satisfied: future==0.18.2 in c:\python39\lib\site-packages (from -r requirements.txt (line 2)) (0.18.2) Requirement already satisfied: kociemba==1.2.1 in c:\python39\lib\site-packages (from -r requirements.txt (line 3)) (1.2.1) Requirement already satisfied: numpy==1.20.1 in c:\python39\lib\site-packages (from -r requirements.txt (line 4)) (1.20.1) Requirement already satisfied: opencv-python==4.5.1.48 in c:\python39\lib\site-packages (from -r requirements.txt (line 5)) (4.5.1.48) Requirement already satisfied: opencv-contrib-python==4.5.1.48 in c:\python39\lib\site-packages (from -r requirements.txt (line 6)) (4.5.1.48) Requirement already satisfied: pycparser==2.20 in c:\python39\lib\site-packages (from -r requirements.txt (line 7)) (2.20) Requirement already satisfied: pydocstyle==5.1.1 in c:\python39\lib\site-packages (from -r requirements.txt (line 8)) (5.1.1) Requirement already satisfied: python-i18n==0.3.9 in c:\python39\lib\site-packages (from -r requirements.txt (line 9)) (0.3.9) Requirement already satisfied: snowballstemmer==2.1.0 in c:\python39\lib\site-packages (from -r requirements.txt (line 10)) (2.1.0)

    C:\Users\maiqu\Documents\repos\qbr>python src\qbr.py Traceback (most recent call last): File "C:\Users\maiqu\Documents\repos\qbr\src\qbr.py", line 8, in from video import webcam File "C:\Users\maiqu\Documents\repos\qbr\src\video.py", line 6, in from colordetection import color_detector File "C:\Users\maiqu\Documents\repos\qbr\src\colordetection.py", line 8, in from config import config File "C:\Users\maiqu\Documents\repos\qbr\src\config.py", line 37, in config = Config() File "C:\Users\maiqu\Documents\repos\qbr\src\config.py", line 20, in init os.mkdir(self.config_dir) FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\Users\maiqu/.config/qbr'

    C:\Users\maiqu\Documents\repos\qbr>

    opened by crashoverburn 13
Owner
Kim 金可明
Vim enthusiast; polyglot programmer; fullstack software engineer; QA engineer
Kim 金可明
Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Sergio Díaz Fernández 1 Jan 13, 2022
Rubik's Cube in pygame with OpenGL

Rubik Rubik's Cube in pygame with OpenGL The script show on the screen a Rubik Cube buit with OpenGL. Then I have also implemented all the possible mo

Gabro 2 Apr 15, 2022
This repo contains several opencv projects done while learning opencv in python.

opencv-projects-python This repo contains both several opencv projects done while learning opencv by python and opencv learning resources [Basic conce

Fatin Shadab 2 Nov 3, 2022
This project proposes a camera vision based cursor control system, using hand moment captured from a webcam through a landmarks of hand by using Mideapipe module

This project proposes a camera vision based cursor control system, using hand moment captured from a webcam through a landmarks of hand by using Mideapipe module

Chandru 2 Feb 20, 2022
Python Computer Vision application that allows users to draw/erase on the screen using their webcam.

CV-Virtual-WhiteBoard The Virtual WhiteBoard is a project I made using the OpenCV and Mediapipe Python libraries. Using your index and middle finger y

Stephen Wang 1 Jan 7, 2022
In this project we will be using the live feed coming from the webcam to create a virtual mouse with complete functionalities.

Virtual Mouse Using OpenCV In this project we will be using the live feed coming from the webcam to create a virtual mouse using hand tracking. Projec

Hassan Shahzad 8 Dec 20, 2022
Fun program to overlay a mask to yourself using a webcam

Superhero Mask Overlay Description Simple project made for fun. It consists of placing a mask (a PNG image with transparent background) on your face.

KB Kwan 10 Dec 1, 2022
Assignment work with webcam

work with webcam : Press key 1 to use emojy on your face Press key 2 to use lip and eye on your face Press key 3 to checkered your face Press key 4 to

Hanane Kheirandish 2 May 31, 2022
A python script based on opencv and paddleocr, which can automatically pick up tasks, make cookies, and receive rewards in the Destiny 2 Dawning Oven

A python script based on opencv and paddleocr, which can automatically pick up tasks, make cookies, and receive rewards in the Destiny 2 Dawning Oven

null 1 Dec 22, 2021
Developed an AI-based system to control the mouse cursor using Python and OpenCV with the real-time camera.

Developed an AI-based system to control the mouse cursor using Python and OpenCV with the real-time camera. Fingertip location is mapped to RGB images to control the mouse cursor.

Ravi Sharma 71 Dec 20, 2022
This is a project to detect gestures to zoom in or out, using the real-time distance between the index finger and the thumb. It's based on OpenCV and Mediapipe.

Pinch-zoom This is a python project based on real-time hand-gesture detection, to zoom in or out, using the distance between the index finger and the

Harshit Bhalla 6 Jul 11, 2022
Using Opencv ,based on Augmental Reality(AR) and will show the feature matching of image and then by finding its matching

Using Opencv ,this project is based on Augmental Reality(AR) and will show the feature matching of image and then by finding its matching ,it will just mask that image . This project ,if used in cctv then it will detect black listed people if mentioned properly with their images.

null 1 Feb 13, 2022
Automatically resolve RidderMaster based on TensorFlow & OpenCV

AutoRiddleMaster Automatically resolve RidderMaster based on TensorFlow & OpenCV 基于 TensorFlow 和 OpenCV 实现的全自动化解御迷士小马谜题 Demo How to use Deploy the ser

神龙章轩 5 Nov 19, 2021
Image Detector and Convertor App created using python's Pillow, OpenCV, cvlib, numpy and streamlit packages.

Image Detector and Convertor App created using python's Pillow, OpenCV, cvlib, numpy and streamlit packages.

Siva Prakash 11 Jan 2, 2022
Introduction to Augmented Reality (AR) with Python 3 and OpenCV 4.2.

Introduction to Augmented Reality (AR) with Python 3 and OpenCV 4.2.

fernanda rodríguez 85 Jan 2, 2023
Shape Detection - It's a shape detection project with OpenCV and Python.

Shape Detection It's a shape detection project with OpenCV and Python. Setup pip install opencv-python for doing AI things. pip install simpleaudio fo

null 1 Nov 26, 2022
A document scanner application for laptops/desktops developed using python, Tkinter and OpenCV.

DcoumentScanner A document scanner application for laptops/desktops developed using python, Tkinter and OpenCV. Directly install the .exe file to inst

Harsh Vardhan Singh 1 Oct 29, 2021
A facial recognition program that plays a alarm (mp3 file) when a person i seen in the room. A basic theif using Python and OpenCV

Home-Security-Demo A facial recognition program that plays a alarm (mp3 file) when a person is seen in the room. A basic theif using Python and OpenCV

SysKey 4 Nov 2, 2021
📷 Face Recognition using Haar-Cascade Classifier, OpenCV, and Python

Face-Recognition-System Face Recognition using Haar-Cascade Classifier, OpenCV and Python. This project is based on face detection and face recognitio

null 1 Jan 10, 2022