Project Sneak Peek
A real-time Computer Vision application that acts as an automated referee for the physical pen-and-paper game “SOS”. This system analyzes a live video feed to track the game board, detect moves (‘S’ or ‘O’), and determine the winner automatically. The project is developed as part of the Digital Image Processing course offered by Prof. Dr. İbrahim Delibaşoğlu at the Software Engineering department at Sakarya University in the Fall of 2025-2026.
.txt log of the entire session, including board states and move history.src/ & include/: Core source code for the game pipeline, image processing, and logic.training_workspace/: A separate toolkit for collecting training data and training the SVM model (DataCollector, TrainSVM).bin/: Contains the compiled executable and the sos_model.xml (SVM model).logs/: Stores session logs and screenshots of game moves.build.bat: Automated script for initializing, building, and running the project.Before building, ensure your environment is set up correctly.
OPENCV_BUILD_DIR environment variable, or define it in a .env file in the root directory.CMakeLists.txt and update the TESS_SDK variable to point to your local Tesseract installation:
set(TESS_SDK "C:/Path/To/Your/Tesseract/SDK")
target_link_libraries match your specific version (e.g., tesseract55, leptonica-1.86.0).Model Selection (Switching OCR)
The system supports two different engines for recognizing ‘S’ and ‘O’ characters. You can switch between them by modifying the source code configuration:
include/Config.hpp.ACTIVE_OCR_MODE constant at the bottom of the file.// Option B: Use Custom SVM (Requires sos_model.xml) const OCRMode ACTIVE_OCR_MODE = MODE_SVM;
## Build & Run Instructions
This project includes a convenience script (`build.bat`) to handle the CMake workflow directly from the Windows Command Prompt (cmd).
### 1. Initialize the Project
Open `cmd` in the project root and run the initialization step. This creates the visual studio solution files.
```cmd
build.bat init
Compile the source code in Release mode. This step also attempts to automatically copy the necessary OpenCV DLLs to the binary folder.
build.bat build
Execute the main program. This will open the camera feed and start the game pipeline.
build.bat run
Note: The script automatically handles directory navigation to ensure the application finds necessary assets like sos_model.xml.
logs/ folder for a record of the match.If you wish to improve detection accuracy by training your own SVM model, navigate to the training_workspace folder.
sos_model.xml based on your collected data.bin/ directory of the main project.Name: Mahfuz AHMAD Student ID: B221210591 Department: Computer Engineering University: Sakarya University Course: Digital Image Processing (Fall 2025-2026)