GithubHelp home page GithubHelp logo

kkoomen / qbr Goto Github PK

View Code? Open in Web Editor NEW
601.0 23.0 99.0 19.23 MB

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

License: MIT License

Python 100.00%
color-detection opencv python ciede2000 webcam canny-edge-detection delta-e qbr cuber accurate

qbr's Introduction

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

For linux users, make sure to install the following prerequisites:

$ sudo apt-get install python3-dev build-essential

Then, continue to install the project:

$ 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 live preview mode displaying the detected 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. The center piece color is used to detect which side to save.

Amount of sides scanned - text (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.

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.

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
  • Spanish
  • Dutch
  • ็ฎ€ไฝ“ไธญๆ–‡
  • ๅฐ็ฃ็น้ซ”ไธญๆ–‡

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

Parameters

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.

qbr's People

Contributors

aitalinassim avatar dependabot[bot] avatar eigenric avatar hikari-tsai avatar kinsiinoo avatar kkoomen avatar sematre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qbr's Issues

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

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'

(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).

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)

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.

Make code a bit more PEP8 compatible

Would be great if the code could be a bit more PE8-friendly, having static-checkers and PyCharm not warn on too many lines.

BTW, i already have this ready 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 :(.

A little bug that I ran into

First off, this is an amazing project. I used it to also make my own mechanical Rubix Cube solver and the scanner works great. I modified it to fit exactly what I needed, and it was easy to follow.

When I was working on installing it, one problem kept occurring. I ran the installation on multiple computers and got the same errors. Maybe this was just on my computer but I think it could also happen on others (or I could just be wrong, not sure). This was the error I was receiving:
Traceback (most recent call last):
File "/Users/
__________/qbr/./src/qbr.py", line 8, in
from video import webcam
File "/Users/qbr/src/video.py", line 6, in
from colordetection import color_detector
File "/Users/
/qbr/src/colordetection.py", line 8, in
from config import config
File "/Users//qbr/src/config.py", line 37, in
config = Config()
^^^^^^^^
File "/Users/
/qbr/src/config.py", line 20, in init
os.mkdir(self.config_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/________/.config/qbr'

I figured out how to solve the problem, but I thought it anyone else runs into the same problem, this might help.

1: Go to config.py, then on line 11 change "/.config/qbr" to "/qbr/src"
I belive that the way that it is structured right now does not get the correct file, but the qbr/src selects the correct file

2: The next step I did was move the demo photos from outside the src files into it moving it from the qbr file to src. I also think this is because it is not finding the photos due to its location.

I worked on this with a partner who helped me figure some of this stuff out so I could be wrong, but it worked for me and it may come in handy for some if running into a similar problem.

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 :(.

Error in calibration

File "/Users/binbinzhu/Code/qbr/src/qbr.py", line 82, in
Qbr(args.normalize).run()
File "/Users/binbinzhu/Code/qbr/src/qbr.py", line 38, in run
state = webcam.run()
File "/Users/binbinzhu/Code/qbr/src/video.py", line 519, in run
self.draw_current_color_to_calibrate()
File "/Users/binbinzhu/Code/qbr/src/video.py", line 306, in draw_current_color_to_calibrate
_, textsize_height = self.get_text_size(text, font_size)
File "/Users/binbinzhu/Code/qbr/src/video.py", line 289, in get_text_size
return self.get_font(size).getsize(text)
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'

It works after rolling back to Pillow==9.5

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.

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>

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.

Add PyCharm idea files to gitignore

Would be nice if PyCharm idea files could also be in the gitignore file.

BTW, i already have this ready 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 :(.

Add some (multiple?) dependency management

Would be great if there were requirement.txt or even Pipfile (pipenv) support in the Repo.

BTW, i already have this ready 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 :(.

Getting error in installation

can't install the requirements.txt file. That's all the error I'm getting --

error: subprocess-exited-with-error
  
  ร— Building wheel for numpy (pyproject.toml) did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [1246 lines of output]
INFO: CCompilerOpt.cache_flush[817] : write cache to path -> /private/var/folders/rt/3jcw80yd5bbgq7_c89cf2sfr0000gn/T/pip-install-2uo0qkr7/numpy_aa84c7662faa46dd92edf70a8758acf0/build/temp.macosx-10.9-universal2-3.11/ccompiler_opt_cache_clib.py
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

Typo in README.md

line #91 in the README.md file has a typo: "lef" which should be corrected to "left"

(ORIGINAL)
...

### Amount of sides scanned (bottom lef corner)

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

...

(EDIT)
...

### Amount of sides scanned (bottom left corner)

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

...

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.