Teaches 2-Look OLL and PLL for the Rubik's Cube with the help of computer vision
-
Ensure that OpenCV is installed properly on your machine.
-
In your terminal, navigate to the folder containing the repository.
-
Type the following into the terminal to compile the program.
make teacher
- Type the following into the terminal to start the program.
./teacher
-
Ensure that your cube is solved up through the first stage of 2-Look OLL and follow the instructions in the terminal.
-
Capture the front, right, back, and left sides of the cube while making sure the pieces are being correctly identified.
-
Perform the algorithm received from the program to finish the OLL step. Then, do the first step of 2-Look PLL.
-
Once again, capture the front, right, back, and left sides of the cube while making sure the pieces are being correctly identified.
-
Perform the algorithm received from the program to finish the PLL step.
-
The cube should now be solved!
It is likely that your lighting conditions and/or Rubik's Cube will differ from mine. Therefore, you will probably have to change the default threshold values for each color. To do so, perform the following steps.
-
In your terminal, navigate to the folder containing the repository.
-
Type the following into the terminal to compile the program.
make threshold
- Type the following into the terminal to start the program.
./threshold
-
A window will pop up that allows you to adjust sliders to find the min and max values of hue, saturation, and value for each color on your cube.
-
Replace the default values on lines 135-146 of colors.cpp with the new min and max values that you determined.
The default camera used by the program is the camera built into the computer. If you would like to use a different camera, for example, a USB camera, change the cameraNum variable on line 79 of teacher.cpp.