Tic Tac Toe Player CNC Pen Plotter

Me and my teammates built a CNC Pen Plotter that uses image processing to play Tic-Tac-Toe with a real person. The player has a predefined amount of time to play their move, then the machine takes the picture of the board and detects the layout. The layout is then passed to a Python script that computes the next move. Machione then plays the move by sending the corresponding moves G-Code to the Ardunio that controls the servo motors. This was a term project for ME331 at Bogazici University during the peak time of Covid that is why most parts of the machine had to be improvised. It was chosen as the best project in the class.
General workflow of the system
Image Processing Steps