Matrix Logic
Image Processing
This project involves the development of a complete Optical Character Recognition (OCR) system written entirely in C. Unlike typical Python implementations using libraries like TensorFlow or PyTorch, this project required implementing the mathematical core of a neural network (backpropagation, matrix operations, activation functions) from scratch.
The software pipeline transforms a raw image of text into digital characters through several distinct stages:
Raw images are often noisy. We implemented several filters to prepare the data:
The system isolates individual characters using XY-Cut algorithm and histogram projection profiles. This step creates the specific input matrices that will be fed into the neural network.
We built a Multilayer Perceptron (MLP) in C.
The main challenge was performance and memory management. Since we allocated memory manually for large matrices representing weights and biases, preventing memory leaks (checked with Valgrind) was critical. We also optimized the training loop to converge efficiently on the XOR problem before scaling to OCR datasets.
This project achieved a final grade of 16.87/20. It was a rigorous exercise in applying low-level programming concepts to high-level AI problems. The source code is available here: GitHub - Perceptio-S3-EPITA.