Automated Data Extraction From Student Id Cards (KTM) Using Optical Character Recognition (OCR) And Regular Expressions Based On TKINTER GUI

  • Andes Putra Gunawan Universitas Muhammadiyah Bengkulu
  • Yulia Darmi Universitas Muhammadiyah Bengkulu
  • Ardi Wijaya Universitas Muhammadiyah Bengkulu
  • Yuza Reswan Universitas Muhammadiyah Bengkulu
Keywords: Data Extraction, Student ID Card, Optical Character Recognition (OCR), Regular Expression, Tesseract, Confusion Matrix, Tkinter

Abstract

This research aims to design and implement an automatic data extraction system from student ID card (KTM) images using a combination of Tesseract-based Optical Character Recognition (OCR) and Regular Expression, with a graphical user interface built using Tkinter. The developed system consists of an image preprocessing stage (text-zone cropping, skew correction with protection against textured backgrounds, and Otsu binarization), OCR text extraction using a multi-source and multi-page-segmentation-mode strategy, and data field extraction using tiered Regular Expression patterns supported by a keyword-mapping dictionary for the Study Program and Faculty fields. Testing was conducted on 100 student ID card images from Universitas Muhammadiyah Bengkulu using confusion matrix evaluation metrics, namely Precision, Recall, F1-Score, and Accuracy for each data field. The test results show that the system achieved an overall accuracy of 93.8%, with a Precision of 94.86%, Recall of 98.72%, and F1-Score of 96.75%. Per-field accuracy results show that the Student ID Number (NPM) field reached 100%, Faculty 98%, Study Program 95%, Place/Date of Birth 94%, and Name 82%. This research also identified and resolved a cross-platform issue in the OCR library that caused the loss of spaces and punctuation marks in the extraction results when run on the Windows operating system. The findings indicate that the combination of OCR and Regular Expression, specifically designed to match the visual characteristics of student ID cards, is able to produce an accurate and reliable data extraction system suitable for supporting academic administration processes.

Downloads

Download data is not yet available.
Published
2026-10-28
How to Cite
Gunawan, A., Darmi, Y., Wijaya, A., & Reswan, Y. (2026). Automated Data Extraction From Student Id Cards (KTM) Using Optical Character Recognition (OCR) And Regular Expressions Based On TKINTER GUI. Jurnal Media Computer Science, 5(4), 1837-1852. https://doi.org/10.37676/jmcs.v5i4.12751
Section
Articles

Most read articles by the same author(s)

<< < 1 2 3 4 5 6