[Paper Review] Optical Character Recognition, Using K-Nearest Neighbors
This paper proposes a simple K-Nearest Neighbors (K-NN) based handwritten digit recognition system using feature extraction via image partitioning and either pixel averaging or gradient-based features. The method achieves 92.6% accuracy with a 1.092-second runtime using 4×8 vertical-horizontal partitioning, demonstrating high efficiency and accuracy despite its simplicity.
The problem of optical character recognition, OCR, has been widely discussed in the literature. Having a hand-written text, the program aims at recognizing the text. Even though there are several approaches to this issue, it is still an open problem. In this paper we would like to propose an approach that uses K-nearest neighbors algorithm, and has the accuracy of more than 90%. The training and run time is also very short.
Motivation & Objective
- To develop a fast and accurate handwritten digit recognition system using simple feature extraction and K-NN classification.
- To address the curse of dimensionality by minimizing the number of features while maintaining high recognition accuracy.
- To reduce computational complexity in feature extraction and classification for real-time or embedded applications.
- To evaluate the performance trade-offs between pixel averaging and gradient-based feature representation in K-NN-based OCR.
- To demonstrate that simple, low-complexity methods can achieve high accuracy in digit recognition tasks.
Proposed method
- The image is preprocessed via morphological skeletonization to reduce noise and shadows, using recursive bwmorph in MATLAB.
- The effective region of the digit is isolated by computing the minimum and maximum X and Y coordinates of non-zero pixels.
- The image is partitioned into 4×8 rectangular sections (32 total) to extract features, with alternative partitioning tested (e.g., 4×4, 8×8).
- For the first method, the average pixel intensity within each partition is computed as the feature vector.
- For the second method, the maximum absolute gradient values in X and Y directions are computed per partition, doubling the number of features.
- A K-Dimensional (Kd) tree data structure is built from the training feature vectors to enable efficient k-nearest neighbor queries with O(log N) expected query time.
Experimental results
Research questions
- RQ1Can a simple feature extraction method based on image partitioning achieve high accuracy in handwritten digit recognition?
- RQ2How does pixel averaging compare to gradient-based feature representation in terms of accuracy and runtime?
- RQ3What is the optimal partitioning scheme (e.g., 4×8 vs. 8×8) for balancing accuracy and computational efficiency?
- RQ4Can a K-NN classifier with a Kd-tree achieve high performance with minimal preprocessing and low-dimensional features?
- RQ5To what extent does the use of skeletonization improve recognition accuracy in the proposed framework?
Key findings
- The 4×8 partitioning scheme using pixel averaging achieved the highest accuracy of 92.6% on the test set.
- The same 4×8 partitioning with gradient-based features yielded a lower accuracy of 80.6%, indicating that averaging outperforms gradients in this setup.
- The 4×8 partitioning method had a runtime of 1.092 seconds, making it significantly faster than the 8×8 partitioning (2.152 seconds).
- The method using pixel averaging achieved 92.6% accuracy with only 32 features, demonstrating effectiveness despite low dimensionality.
- The Kd-tree data structure enabled efficient k-NN queries with expected O(log N) query time, supporting fast inference.
- The overall system achieved over 90% accuracy with minimal computational overhead, validating the approach as both accurate and efficient.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.