Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 2.51 KB

README.md

File metadata and controls

70 lines (44 loc) · 2.51 KB

Rubiks-Cube-Teacher

Teaches 2-Look OLL and PLL for the Rubik's Cube with the help of computer vision

Usage

  1. Ensure that OpenCV is installed properly on your machine.

  2. In your terminal, navigate to the folder containing the repository.

  3. Type the following into the terminal to compile the program.

make teacher
  1. Type the following into the terminal to start the program.
./teacher
  1. Ensure that your cube is solved up through the first stage of 2-Look OLL and follow the instructions in the terminal.

  2. Capture the front, right, back, and left sides of the cube while making sure the pieces are being correctly identified. oll

  3. Perform the algorithm received from the program to finish the OLL step. Then, do the first step of 2-Look PLL. ollAlg

  4. Once again, capture the front, right, back, and left sides of the cube while making sure the pieces are being correctly identified. pll

  5. Perform the algorithm received from the program to finish the PLL step. pllAlg

  6. The cube should now be solved!

Important Notes

Thresholding

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.

  1. In your terminal, navigate to the folder containing the repository.

  2. Type the following into the terminal to compile the program.

make threshold
  1. Type the following into the terminal to start the program.
./threshold
  1. 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.

  2. Replace the default values on lines 135-146 of colors.cpp with the new min and max values that you determined.

Camera

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.