Automatic Car Number Plate Detection using Morphological Image Processing


  • Mustafa Qahtan Alsudani Computer Techniques Engineering Department, Faculity of information Technology, Imam Jaafar Al-sadiq University, Iraq
  • Safa Riyadh Waheed Computer Techniques Engineering Department, Faculity of information Technology, Imam Jaafar Al-sadiq University, Iraq
  • Karrar A Kadhim Computer Techniques Engineering Department, Faculity of information Technology, Imam Jaafar Al-sadiq University, Iraq
  • Myasar Mundher Adnan Islamic University, Najaf, Iraq
  • Ameer Al-khaykan Air conditioning and Refrigeration Techniques Engineering Department, Al-Mustaqbal University College, 51001 Hillah, Babylon, Iraq



Car plate, car number detection, edge detection, feature extraction, OpenCV


One of the most common uses of computer vision, automatic number plate recognition (ANPR) is also a pretty well-explored subject with numerous effective solutions. Due to regional differences in license plate design, however, these solutions are often optimized for a specific setting. Number plate recognition algorithms are often dependent on these aspects, making a universal solution unlikely due to the fact that the image analysis methods used to develop these algorithms cannot guarantee a perfect success rate. In this research, we offer an algorithm tailor-made for use with brand-new license plates in Iraq. The method employs edge detection, Feature Detection, and mathematical morphology to find the plate; it was developed in C++ using the OpenCV library. When characters were found on the plate, they were entered into the Easy OCR engine for analysis.


Zhang, J., Wang, F. Y., Wang, K., Lin, W. H., Xu, X., & Chen, C. (2011). Data-driven intelligent transportation systems: A survey. IEEE Transactions on Intelligent Transportation Systems, 12(4), 1624-1639.‏

Tang, J., Wan, L., Schooling, J., Zhao, P., Chen, J., & Wei, S. (2022). Automatic number plate recognition (ANPR) in smart cities: A systematic review on technological advancements and application cases. Cities, 129, 103833.‏

Anagnostopoulos, C. N. E., Anagnostopoulos, I. E., Loumos, V., & Kayafas, E. (2006). A license plate-recognition algorithm for intelligent transportation system applications. IEEE Transactions on Intelligent Transportation Systems, 7(3), 377-392.‏

Kadhim, K. A., Adnan, M. M., Waheed, S. R., & Alkhayyat, A. (2021). WITHDRAWN: Automated high-security license plate recognition system.‏

Salim, A. A., Ghoshal, S. K., Shamsudin, M. S., Rosli, M. I., Aziz, M. S., Harun, S. W., ... & Bakhtiar, H. (2021). Absorption, fluorescence and sensing quality of Rose Bengal dye-encapsulated cinnamon nanoparticles. Sensors and Actuators A: Physical, 332, 113055.‏

Salim, A. A., Ghoshal, S. K., & Bakhtiar, H. (2022). Prominent absorption and luminescence characteristics of novel silver-cinnamon core-shell nanoparticles prepared in ethanol using PLAL method. Radiation Physics and Chemistry, 190, 109794.‏

Hathot, S. F., Abbas, S. I., AlOgaili, H. A. T., & Salim, A. A. (2022). Influence of deposition time on absorption and electrical characteristics of ZnS thin films. Optik, 260, 169056.‏

Kakani, V., Nguyen, V. H., Kumar, B. P., Kim, H., & Pasupuleti, V. R. (2020). A critical review on computer vision and artificial intelligence in food industry. Journal of Agriculture and Food Research, 2, 100033.‏

Lemley, J., Bazrafkan, S., & Corcoran, P. (2017). Deep Learning for Consumer Devices and Services: Pushing the limits for machine learning, artificial intelligence, and computer vision. IEEE Consumer Electronics Magazine, 6(2), 48-56.‏

Buslaev, A., Iglovikov, V. I., Khvedchenya, E., Parinov, A., Druzhinin, M., & Kalinin, A. A. (2020). Albumentations: fast and flexible image augmentations. Information, 11(2), 125.‏

Patel, C., Shah, D., & Patel, A. (2013). Automatic number plate recognition system (anpr): A survey. International Journal of Computer Applications, 69(9).‏

Abbas, A. M., Abid, M. A., Abbas, K. N., Aziz, W. J., & Salim, A. A. (2021, April). Photocatalytic activity of Ag-ZnO nanocomposites integrated essential ginger oil fabricated by green synthesis method. Journal of Physics: Conference Series, 1892(1), 012005. IOP Publishing.‏

Salim, A. A., Ghoshal, S. K., Danmallam, I. M., Sazali, E. S., Krishnan, G., Aziz, M. S., & Bakhtiar, H. (2021, April). Distinct optical response of colloidal gold-cinnamon nanocomposites: Role of pH sensitization. Journal of Physics: Conference Series, 1892(1), 012039. IOP Publishing.‏

Tang, J., Wan, L., Schooling, J., Zhao, P., Chen, J., & Wei, S. (2022). Automatic number plate recognition (ANPR) in smart cities: A systematic review on technological advancements and application cases. Cities, 129, 103833.‏

Zhang, H., Chen, P., Zheng, J., Zhu, J., Yu, G., Wang, Y., & Liu, H. X. (2019). Missing data detection and imputation for urban ANPR system using an iterative tensor decomposition approach. Transportation Research Part C: Emerging Technologies, 107, 337-355.‏

Bradski, G., Kaehler, A., & Pisarevsky, V. (2005). Learning-based computer vision with intel's open source computer vision library. Intel Technology Journal, 9(2).‏

Dehghani, M., Gritsenko, A., Arnab, A., Minderer, M., & Tay, Y. (2022). Scenic: A JAX library for computer vision research and beyond. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 21393-21398).‏

Hoydis, J., Cammerer, S., Aoudia, F. A., Vem, A., Binder, N., Marcus, G., & Keller, A. (2022). Sionna: An open-source library for next-generation physical layer research. arXiv preprint arXiv:2203.11854.‏

Kaur, J., Sinha, P., Shukla, R., & Tiwari, V. (2021). Automatic Cataract Detection Using Haar Cascade Classifier. In Data Intelligence and Cognitive Informatics: Proceedings of ICDICI 2020 (pp. 543-556). Springer Singapore.‏

Carabe, L., & Cermeño, E. (2021). Stegano-morphing: Concealing attacks on face identification algorithms. IEEE Access, 9, 100851-100867.‏

Poojari, N. N., Sangeetha, J., & Shreenivasa, G. (2022). Automatic Student Attendance and Activeness Monitoring System. Intelligent Systems and Sustainable Computing: Proceedings of ICISSC 2021 (pp. 405-415). Singapore: Springer Nature Singapore.‏

Rahmad, C., Asmara, R. A., Putra, D. R. H., Dharma, I., Darmono, H., & Muhiqqin, I. (2020). Comparison of Viola-Jones Haar Cascade classifier and histogram of oriented gradients (HOG) for face detection. IOP Conference Series: Materials Science Aand Engineering, 732(1), 012038. IOP Publishing.‏

Kim, D., Hyun, J., & Moon, B. (2020, January). Memory-efficient architecture for contrast enhancement and integral image computation. In 2020 International Conference on Electronics, Information, and Communication (ICEIC) (pp. 1-4). IEEE.‏

Xing, H. J., & Liu, W. T. (2020). Robust AdaBoost based ensemble of one-class support vector machines. Information Fusion, 55, 45-58.‏

Nafees, A., Amin, M. N., Khan, K., Nazir, K., Ali, M., Javed, M. F., ... & Vatin, N. I. (2022). Modeling of mechanical properties of silica fume-based green concrete using machine learning techniques. Polymers, 14(1), 30.‏

Wang, L., & Yoon, K. J. (2021). Knowledge distillation and student-teacher learning for visual intelligence: A review and new outlooks. IEEE Transactions on Pattern Analysis and Machine Intelligence.‏

Li, Y. Q., Chang, H. S., & Lin, D. T. (2022). Large-scale printed chinese character recognition for ID cards using deep learning and few samples transfer learning. Applied Sciences, 12(2), 907.‏

Phoenix, P., Sudaryono, R., & Suhartono, D. (2021). Classifying promotion images using optical character recognition and Naïve Bayes classifier. Procedia Computer Science, 179, 498-506.‏

Bijeesh, T. V., & Narasimhamurthy, K. N. (2020). Surface water detection and delineation using remote sensing images: A review of methods and algorithms. Sustainable Water Resources Management, 6, 1-23.‏

Waheed, S. R., Suaib, N. M., Rahim, M. S. M., Adnan, M. M., & Salim, A. A. (2021, April). Deep learning algorithms-based object detection and localization revisited. Journal of Physics: Conference Series, 1892(1), 012001. IOP Publishing.‏

Salim, A. A., Bidin, N., & Islam, S. (2017). Low power CO2 laser modified iron/nickel alloyed pure aluminum surface: Evaluation of structural and mechanical properties. Surface and Coatings Technology, 315, 24-31.‏

Salim, A. A., Ghoshal, S. K., Suan, L. P., Bidin, N., Hamzah, K., Duralim, M., & Bakhtiar, H. (2018). Liquid media regulated growth of cinnamon nanoparticles: Absorption and emission traits. Malaysian Journal of Fundamental and Applied Sciences, 14(3-1), 447-449.‏

Salim, A. A., Bakhtiar, H., Shamsudin, M. S., Aziz, M. S., Johari, A. R., & Ghoshal, S. K. (2022). Performance evaluation of rose bengal dye-decorated plasmonic gold nanoparticles-coated fiber-optic humidity sensor: A mechanism for improved sensing. Sensors and Actuators A: Physical, 347, 113943.‏

Waheed, S. R., Rahim, M. S. M., Suaib, N. M., & Salim, A. A. (2023). CNN deep learning-based image to vector depiction. Multimedia Tools and Applications, 1-20.‏‏