All Projects → kkoomen → Qbr

kkoomen / Qbr

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

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Qbr

Caffe2 Ios
Caffe2 on iOS Real-time Demo. Test with Your Own Model and Photos.
Stars: ✭ 221 (+81.15%)
Mutual labels:  demo, opencv
Skeleton
A ready-to-use CodeIgniter skeleton with tons of new features and a whole new concept of hooks (actions and filters) as well as a ready-to-use and application-free themes and plugins system. Facebook Page: http://bit.ly/2oHzpxC | Facebook Group: http://bit.ly/2o3KOrA. Help me carry on making more free stuff → http://bit.ly/2ppNujE ←
Stars: ✭ 74 (-39.34%)
Mutual labels:  demo, multilingual
Live Video Magnification
An OpenCV/Qt based realtime application for Eulerian Video Magnification / Motion Magnification. Works with multiple videos and cameras at the same time and let's you export the magnified videos.
Stars: ✭ 187 (+53.28%)
Mutual labels:  webcam, opencv
Pytorch Cpp
PyTorch C++ inference with LibTorch
Stars: ✭ 194 (+59.02%)
Mutual labels:  demo, opencv
Realtime Detectron
Real-time Detectron using webcam.
Stars: ✭ 42 (-65.57%)
Mutual labels:  webcam, demo
Node Camera
Access and stream web camera in nodejs using opencv and websockets.
Stars: ✭ 135 (+10.66%)
Mutual labels:  webcam, opencv
Mocapnet
We present MocapNET2, a real-time method that estimates the 3D human pose directly in the popular Bio Vision Hierarchy (BVH) format, given estimations of the 2D body joints originating from monocular color images. Our contributions include: (a) A novel and compact 2D pose NSRM representation. (b) A human body orientation classifier and an ensemble of orientation-tuned neural networks that regress the 3D human pose by also allowing for the decomposition of the body to an upper and lower kinematic hierarchy. This permits the recovery of the human pose even in the case of significant occlusions. (c) An efficient Inverse Kinematics solver that refines the neural-network-based solution providing 3D human pose estimations that are consistent with the limb sizes of a target person (if known). All the above yield a 33% accuracy improvement on the Human 3.6 Million (H3.6M) dataset compared to the baseline method (MocapNET) while maintaining real-time performance (70 fps in CPU-only execution).
Stars: ✭ 194 (+59.02%)
Mutual labels:  webcam, demo
Realtime object detection
Plug and Play Real-Time Object Detection App with Tensorflow and OpenCV. No Bugs No Worries. Enjoy!
Stars: ✭ 260 (+113.11%)
Mutual labels:  opencv
Facial Expression Recognition Using Cnn
Deep facial expressions recognition using Opencv and Tensorflow. Recognizing facial expressions from images or camera stream
Stars: ✭ 261 (+113.93%)
Mutual labels:  opencv
Jwt Spring Security Demo
This is a demo for using JWT (JSON Web Token) with Spring Security and Spring Boot. I completely rewrote my first version. Now this solution is based on the code base from the JHipster Project. I tried to extract the minimal configuration and classes that are needed for JWT-Authentication and did some changes.
Stars: ✭ 2,843 (+2230.33%)
Mutual labels:  demo
Pedestrian detection
通过HOG+SVM训练进行行人检测,行人数据库使用INRIAPerson,程序基于OpenCV实现
Stars: ✭ 253 (+107.38%)
Mutual labels:  opencv
Laravel Demo Mode
A package to protect your work in progress from prying eyes
Stars: ✭ 259 (+112.3%)
Mutual labels:  demo
Flutter Ui Nice
More than 130+ pages in this beautiful app and more than 45 developers has contributed to it.
Stars: ✭ 3,092 (+2434.43%)
Mutual labels:  demo
Ai Job Notes
AI算法岗求职攻略(涵盖准备攻略、刷题指南、内推和AI公司清单等资料)
Stars: ✭ 3,191 (+2515.57%)
Mutual labels:  opencv
Spider For Netease Music
抓取网易云音乐上所有歌曲的评论数量,并整理数据打造一个前端展示页面
Stars: ✭ 268 (+119.67%)
Mutual labels:  demo
Instagram
A universal instagram clone built with Expo
Stars: ✭ 258 (+111.48%)
Mutual labels:  demo
Api Docs
api.nasa.gov
Stars: ✭ 267 (+118.85%)
Mutual labels:  demo
Androiddocumentscanner
This library helps to scan a document like CamScanner.
Stars: ✭ 264 (+116.39%)
Mutual labels:  opencv
Spring Security Oauth2.0
本项目原名为CitySecurity,主要用于浏览器端的登录鉴权.使用了SpringSecurity实现表单安全登录、图形验证的校验、记住我时长控制机制、第三方登录.比较独特的一点是集合SpringSocial做第三方登录的支持(此处本人测试自用app-id和app-secret,如果需要测试可以帮忙点下星发邮件给我,会尽快给与回复,谢谢支持!).该方案是目前本人觉得比较完善的一套安全登录的方式,前端页面设计也是本人制作,比较简洁,当然你也可以用自己的一套比较漂亮的UI,此处仅供参考,有什么好的建议都可以给予反馈.该框架在Spring官方网站上也有相关的文档介绍,喜欢本项目的伙伴可以给我点下星,支持一下,当然可以与我交流,共同学习,共同进步!
Stars: ✭ 265 (+117.21%)
Mutual labels:  demo
Opencv Python Blueprints
M. Beyeler (2015). OpenCV with Python Blueprints: Design and develop advanced computer vision projects using OpenCV with Python, Packt Publishing Ltd., ISBN 978-178528269-0.
Stars: ✭ 262 (+114.75%)
Mutual labels:  opencv

Qbr

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 a 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 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.

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
  • Nederlands
  • 简体中文

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

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].