Comments (10)
Red vs. Orange is always a beast :( I am able to reproduce the problem with the output from the html file you attached (thanks)...let me see what I can do
from rubiks-cube-tracker.
Thanks for responding so quickly. A couple of other things that may be important:
- I am actually implementing this on BuildHat (and not on BrickPi3). So my solution is a combination of your code and the original PrimeCuber code
- However, I am using your scanning code pretty much as is since PrimeCuber scans using the color sensor
- Could the problem be related to the direction of spin in between scanning? I dont think so, but thought I would put it out there
- I tried looking into the init.py file to see if there are any tolerances etc that I could tweak but could not see anything obvious
Very interested to see what you find out. So please do let me know
from rubiks-cube-tracker.
question...is square 23 Orange and square 41 Red or is it the other way around?
from rubiks-cube-tracker.
I think that is the problem. The actual cube looks like this:
So by that 23 should be Red, right? The dictionary of returned RGB values shows:
'23': (230, 61, 33) ... '41': (180, 0, 7)
If 41 is orange as per the actual cube pictures, then the RGB values seem good (230 is "more" red than 180).
So am I spinning the cube the wrong way in between scans? Or is it some other problem?
from rubiks-cube-tracker.
yeah so 23 is Red and 41 is Orange...so we are getting the centers and corners correct but the orange vs red edges are all reversed.
You are not doing anything wrong...I suspect this is a bug:
from rubiks-cube-tracker.
Yes, the edges seem to be getting flipped. The RGB values of the edges look good (e.g. '20': (224, 54, 29) vs '38': (172, 0, 5)). So it does look like a bug.....
from rubiks-cube-tracker.
I see what was wrong and pushed a fix, do sudo python3 -m pip install git+https://github.com/dwalton76/rubiks-color-resolver.git
to install the latest code from the repo with the fix and let me know if it works
from rubiks-cube-tracker.
wow! that was quick. Unfortunately, I wont get to testing this later today, but I will try and match your alacrity and let you know as soon as I test it out :) Do I need to uninstall the current install before pulling in the fix? Also, just out of curiosity, what was the bug?
from rubiks-cube-tracker.
In a nutshell we were looking at all of the corner squares and classifying them as one of the six colors and we used that to define a baseline RGB for each of the six colors. For an odd cube though we can do a little better by only using the square in the dead center of each side for defining a baseline RGB for each of the six colors. For odd cubes we know that:
- yellow must always be opposite white
- red must always be opposite orange
- green must always be opposite blue
so that makes it much easier to get them classified as one of the size colors correctly.
from rubiks-cube-tracker.
Your fix worked! I can now successfully scan the cube 4 times out of 5. Every once in a while the cube becomes a little skewed while turning and then the scanner complains about not finding the black border, but that is a mechanical issue. I need to adjust my flipper so that the cube does not get skewed. Thanks a lot - I am now moving to the next part. Hopefully I can get this working for BuildHat soon....
from rubiks-cube-tracker.
Related Issues (10)
- Webcam issues HOT 2
- Raspberry pi camera HOT 9
- Identify the problem HOT 1
- Isn't working after 2019 update HOT 17
- run problem HOT 2
- This photo fails an assert HOT 5
- Typo? HOT 2
- AttributeError: 'RubiksImage' object has no attribute 'get_black_border_width' HOT 64
- brickuber_lib.py modified for RaspiOS Bullseye with libcamera-still
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rubiks-cube-tracker.