Optical Character Recognition (OCR) Of License Plates Using the KNN Method - Abim Tisanarada; Yo Ceng Giap (Indonesian Applied Research Computing and Informatics, 2025)
This study aims to implement an IoT-based security system with character recognition (OCR). The OCR system utilizes a webcam and the KNN method to recognize vehicle license plate text in real-time. This prototype was tested using six samples of the latest Indonesian license plates. The character detection process involves steps such as capturing images from the webcam, preprocessing images to improve contrast and convert them to grayscale, and applying calibrated transformations. Image inversion and thresholding are performed to separate characters from the background. Character segmentation and filtering criteria are also performed to clean the character image from noise and remove inappropriate backgrounds. The detected characters are identified using Region of Interest (ROI) detection to ensure the validity of the characters. The validated contours are sorted from left to right to form the complete license plate number. Subsequently, KNN implementation is used to recognize the detected characters. Test results indicate that the KNN-based webcam license plate detection system, with K set to 1, performs well and achieves a sufficiently high level of performance. Testing at camera-to-license plate distances of 60 cm, 70 cm, and 80 cm shows an average accuracy rate of 100% within 5 seconds. This research contributes to the development of an efficient and accurate vehicle license plate recognition system for various applications, including parking systems and access control.