← Back to projects
Industrial Robot Playing Tic-Tac-Toe via Computer Vision


My contribution
- The image processing pipeline that turns the camera frame into a board matrix, in Python
- Designing and implementing the Minimax tree based game solving algorithm
- The operator interface: prototyped in Kodular Creator, then rewritten in Qt Creator
- Translating raw robot data into language the user actually understands
This project was the first version of what I do with YOLO today: turning a camera frame into a data structure a machine can decide on. It used classical image processing rather than deep learning, but the problem was the same one: turning an image into an action.
def tahta_matrisi(kare):
"""Kameradan tahta durumu: 3x3 matris (-1 bos, 0 O, 1 X)."""
gri = cv2.cvtColor(kare, cv2.COLOR_BGR2GRAY)
esik = cv2.adaptiveThreshold(gri, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C,
cv2.THRESH_BINARY_INV, 31, 7)
durum = [[-1] * 3 for _ in range(3)]
for satir in range(3):
for sutun in range(3):
hucre = hucre_kes(esik, satir, sutun) # perspektiften duzeltilmis
durum[satir][sutun] = sinifla(hucre) # kontur sayisi + doluluk
return durum