Even if the LEGO Mindstorms color sensor is very accurate, it is hard to distinguish between the red and the orange colors. The corners are no problem, there is redundancy in that it is possible to use the colors of two sides to determine the color of the third. The center cubies have even more redundancy. The only thing I had to consider was the Rubik's logo on the white center cubie, which gives undefined color readings. The edge pieces are hardest to resolve. For example to determine whether an instance of a cubie is red/blue or orange/blue. By converting RGB values to hue and saturation and comparing them (orange has a somewhat higher hue/saturation compared to red) it is possible to resolve even these.
Users browsing this forum: No registered users and 0 guests