Skip to content

Using OpenCV's optical flow, I created a proof of concept for a rubik's cube reconstruction generator. All instructions for use are in the README.

Notifications You must be signed in to change notification settings

hell0w0rld2/Reconstruction-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to run:
1. Run calibrate.py. 
2. Enter the name of a video and press enter. 
3. From there, in the video, click the logo of the Rubik's cube first, then the corners and/or edges as if reading a book.
4. Copy output of calibrate.py, paste underneath TODO in opticalFlowTest.py 
5. Run opticalFlowTest.py
6. Some notes on the two files:
	Red dot represents the 'calibrating point', should always stay on the logo of the cube
	Green dots track the movement of the corners and edges
	Press 'r' to reset the green points, to be done manually in between moves
	Press 'p' to pause
	Press 'q' to quit
	If red dot loses the logo, click on the logo once again to regain the center

moveTracker.py: Called when the 'm' key is pressed. Determines the move performed using the changes in the location of points
	
videos:
solvedCube.mp4: Performing slow, outer layer turns on a solved cube. Used to enhance the optical flow map
	scrambledCubex.mp4: Performing slow, outer layer turns on a scrambled cube. Again, used to enhance the optical flow map and calculate point movements for each move. Multiple used videos to get a good average.

scrambled notes:
	Stored version of each test run in opticalFlowTest.py. These files store the changes for each move to get a good idea of range and average change of each point to best recognize moves.

	Analyzed the data in scrambled notes by hard, as I found it faster than reformatting and collecting all of it in code

About

Using OpenCV's optical flow, I created a proof of concept for a rubik's cube reconstruction generator. All instructions for use are in the README.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages