Enhancing OCR Accuracy on Indonesian ID Cards Using Dual-Pipeline Tesseract and Post-Processing
Isi Artikel Utama
Abstrak
Manual transcription of data from Indonesian identity cards (KTP) remains prevalent in public institutions, often resulting in inefficiencies and human errors that compromise data accuracy. While Optical Character Recognition (OCR) technologies such as Tesseract have been widely adopted. However, the performance on KTP images is still inconsistent due to non-uniform layouts, low contrast, and background noise. This study proposes a dual-pipeline OCR framework designed to enhance the recognition accuracy of Indonesian KTPs under real-world conditions. First, the pipeline performs static region segmentation based on predefined Regions of Interest (ROI), then uses dynamic keyword heuristics to locate text adaptively across varying layouts. The outputs of both pipelines are merged through a voting and regex-based post-processing mechanism, which includes character normalization and field validation using predefined dictionaries. Experiments were conducted on 78 annotated KTP samples with diverse resolutions and quality of images. Evaluation using Character Error Rate (CER), Word Error Rate (WER), and field-level accuracy metrics resulted in an average CER of 69.82%, WER of 80.20%, and character-level accuracy of 30.18%. Despite moderate performance in free-text areas such as address or occupation, structured fields achieved higher accuracy above 60%. The method runs efficiently in a CPU-only environment without requiring large annotated datasets, demonstrating its suitability for low-resource OCR deployment. Compared to conventional single-pipeline approaches, the proposed framework improves robustness across heterogeneous document layouts and illumination conditions. These findings highlight the potential of lightweight, rule-based OCR systems for practical e-KYC digitization and form a foundation for integrating deep-learning-based layout detection in future research.
Rincian Artikel

Artikel ini berlisensi Creative Commons Attribution 4.0 International License.
Referensi
O. R. Indonesia, Red flag sektor pelayanan publik Indonesia. 2021.
M. R. Wardani, S. Sudin, G. Mandar, U. Muhammadiyah, and M. Utara, “Implementasi Teknologi OCR Berbasis Artificial Intelligence Dalam Perancangan Aplikasi Bansos Di Desa Daruba Pantai,” MERDEKA : Jurnal Ilmiah Multidisiplin, vol. 2, no. 2, pp. 19–29, 2024, doi: 10.62017/MERDEKA.V2I2.2677.
C. Adjetey and K. S. Adu-Manu, “Content-based Image Retrieval using Tesseract OCR Engine and Levenshtein Algorithm,” International Journal of Advanced Computer Science and Applications, vol. 12, no. 7, pp. 666–675, 2021, doi: 10.14569/IJACSA.2021.0120776.
R. Smith, “An overview of the tesseract OCR engine,” Proceedings of the International Conference on Document Analysis and Recognition, ICDAR, vol. 2, pp. 629–633, 2007, doi: 10.1109/ICDAR.2007.4376991.
N. Otsu, “Threshold Selection Method From Gray-level Histograms,” IEEE Trans Syst Man Cybern, vol. SMC-9, no. 1, pp. 62–66, 1979, doi: 10.1109/TSMC.1979.4310076.
D. Sporici, E. Cușnir, C.-A. Boiangiu, D. Sporici, E. Cușnir, and C.-A. Boiangiu, “Improving the Accuracy of Tesseract 4.0 OCR Engine Using Convolution-Based Preprocessing,” Symmetry 2020, Vol. 12, vol. 12, no. 5, 2020, doi: 10.3390/SYM12050715.
J. Gllavata, R. Ewerth, and B. Freisleben, “A robust algorithm for text detection in images,” pp. 611–616, 2004, doi: 10.1109/ISPA.2003.1296349.
K. Kounlaxay, Y. C. Yoon, and S. K. Kim, “Vehicle License Plate Detection and Recognition using OpenCV and Tesseract OCR,” International Journal on Advanced Science, Engineering and Information Technology, vol. 14, no. 4, pp. 1170–1177, 2024, doi: 10.18517/IJASEIT.14.4.18137.
M. D. A. Cheema, M. D. Shaiq, F. Mirza, A. Kamal, and M. A. Naeem, “Adapting multilingual vision language transformers for low-resource Urdu optical character recognition (OCR),” PeerJ Computer Science, vol. 10, pp. 1–24, 2024, doi: 10.7717/PEERJ-CS.1964/FIG-6.
M. Samantaray, A. K. Biswal, D. Singh, D. Samanta, M. Karuppiah, and N. P. Joseph, “Optical Character Recognition (OCR) based Vehicle’s License Plate Recognition System Using Python and OpenCV,” Proceedings of the 5th International Conference on Electronics, Communication and Aerospace Technology, ICECA 2021, pp. 849–853, 2021, doi: 10.1109/ICECA52323.2021.9676015.
S. Bansal, M. Gupta, and A. K. Tyagi, “A Necessary Review on Optical Character Recognition (OCR) System for Vehicular Applications,” Proceedings of the 2nd International Conference on Inventive Research in Computing Applications, ICIRCA 2020, pp. 918–922, 2020, doi: 10.1109/ICIRCA48905.2020.9183330.
R. G. de Luna, “A Tesseract-based Optical Character Recognition for a Text-to-Braille Code Conversion,” International Journal on Advanced Science, Engineering and Information Technology, vol. 10, no. 1, pp. 128–136, 2020, doi: 10.18517/IJASEIT.10.1.9956.
I. N. T. Lestari and D. I. Mulyana, “Implementation of OCR (Optical Character Recognition) Using Tesseract in Detecting Character in Quotes Text Images,” Journal of Applied Engineering and Technological Science (JAETS), vol. 4, no. 1, pp. 58–63, 2022, doi: 10.37385/JAETS.V4I1.905.
G. P. Moshi, L. S. P. Busagala, W. Ohyama, T. Wakabayashi, and F. Kimura, “An impact of linguistic features on automated classification of OCR texts,” ACM International Conference Proceeding Series, pp. 287–292, 2010, doi: 10.1145/1815330.1815367.
J. Memon, M. Sami, R. A. Khan, and M. Uddin, “Handwritten Optical Character Recognition (OCR): A Comprehensive Systematic Literature Review (SLR),” IEEE Access, vol. 8, pp. 142642–142668, 2020, doi: 10.1109/ACCESS.2020.3012542.
N. Babu and A. Soumya, “Character recognition in historical handwritten documents - A survey,” Proceedings of the 2019 IEEE International Conference on Communication and Signal Processing, ICCSP 2019, pp. 299–304, 2019, doi: 10.1109/ICCSP.2019.8697988.
A. Ul-Hasan and T. M. Breuel, “Can we build language-independent OCR using LSTM networks?,” ACM International Conference Proceeding Series, 2013, doi: 10.1145/2505377.2505394.
T. M. Breuel, A. Ul-Hasan, M. A. Al-Azawi, and F. Shafait, “High-performance OCR for printed english and fraktur using lstm networks,” Proceedings of the International Conference on Document Analysis and Recognition, ICDAR, pp. 683–687, 2013, doi: 10.1109/ICDAR.2013.140.
S. Ren, K. He, R. Girshick, and J. Sun, “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 39, no. 6, pp. 1137–1149, 2017, doi: 10.1109/TPAMI.2016.2577031.
M. S. Alkoffash, M. J. Bawaneh, H. Muaidi, S. Alqrainy, and M. alzghool, “A Survey of Digital Image Processing Techniques in Character Recognition,” IJCSNS International Journal of Computer Science and Network Security, vol. 14, no. 3, p. 65, 2014.
X. C. Yin, X. Yin, K. Huang, and H. W. Hao, “Robust text detection in natural scene images,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 36, no. 5, pp. 970–983, 2014, doi: 10.1109/TPAMI.2013.182.
M. Jaderberg, K. Simonyan, A. Vedaldi, and A. Zisserman, “Synthetic Data and Artificial Neural Networks for Natural Scene Text Recognition,” 2014, Accessed: Dec. 07, 2025. [Online]. Available: https://arxiv.org/abs/1406.2227v4.
A. Gupta, A. Vedaldi, and A. Zisserman, “Synthetic Data for Text Localisation in Natural Images,” Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, vol. 2016-Decem, pp. 2315–2324, 2016, doi: 10.1109/CVPR.2016.254.
D. Nie, L. Wang, E. Adeli, C. Lao, W. Lin, and D. Shen, “3-D Fully Convolutional Networks for Multimodal Isointense Infant Brain Image Segmentation,” IEEE Transactions on Cybernetics, vol. 49, no. 3, pp. 1123–1136, Mar. 2019, doi: 10.1109/TCYB.2018.2797905.
T. Nasir, M. K. Malik, and K. Shahzad, “MMU-OCR-21: Towards End-to-End Urdu Text Recognition Using Deep Learning,” IEEE Access, vol. 9, pp. 124945–124962, 2021, doi: 10.1109/ACCESS.2021.3110787.
S. Saeed, S. Naz, and M. I. Razzak, “An Application of Deep Learning in Character Recognition: An Overview,” Smart Innovation, Systems and Technologies, vol. 136, pp. 53–81, 2019, doi: 10.1007/978-3-030-11479-4_3.
N. Anakpluek, W. Pasanta, L. Chantharasukha, P. Chokratansombat, P. Kanjanakaew, and T. Siriborvornratanakul, “Improved Tesseract optical character recognition performance on Thai document datasets,” Big Data Research, vol. 39, p. 100508, 2025, doi: 10.1016/J.BDR.2025.100508.