software design for license plate detection and recognition using

11
SOFTWARE DESIGN FOR LICENSE PLATE DETECTION AND RECOGNITION USING CONTOUR EXTRACTION ALGORITHM AND OCR Himawan Setiadi Binus University, Jakarta, DKI Jakarta, Indonesia Advisor: Alexander Agung Santoso Gunawan , Samuel Mahatmaputra Tedjojuwono , S.Si., M.T., M.Sc S.Kom., M.Info.Tech D3579 D2131 Abstract At present the development of number of vehicles in Jakarta is growing very rapidly, both cars and motorcycles. On that basis, required an application that can identify the vehicle number plate data quickly. This thesis aims to develop a program of detection and recognition of license plates, or better known as Licence Plate Recognition (LPR) which is currently being developed for the needs of Intelligent Transportation System (ITS) in Indonesia. The workings of this program's first the image of four-wheeled vehicles inserted into the program, license plate is then detected using contour extraction algorithm and character of figures and letters on the plate identified using Optical Character Recognition (OCR). Program that has 82% accuracy rate is made using C# programming language, and compiler Visual Studio 2010 ultimate edition. Keyword : Licence Plate Recognition, Contour Extraction Algorithm, Optical Character Recognition, Intelligent Transportation System.

Upload: others

Post on 03-Feb-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

SOFTWARE DESIGN FOR LICENSE PLATE DETECTION AND

RECOGNITION USING CONTOUR EXTRACTION ALGORITHM AND OCR

Himawan Setiadi Binus University, Jakarta, DKI Jakarta, Indonesia

Advisor:

Alexander Agung Santoso Gunawan, Samuel Mahatmaputra Tedjojuwono, S.Si., M.T., M.Sc S.Kom., M.Info.Tech D3579 D2131

Abstract

At present the development of number of vehicles in Jakarta is growing very rapidly, both cars

and motorcycles. On that basis, required an application that can identify the vehicle number

plate data quickly. This thesis aims to develop a program of detection and recognition of license

plates, or better known as Licence Plate Recognition (LPR) which is currently being

developed for the needs of Intelligent Transportation System (ITS) in Indonesia. The workings

of this program's first the image of four-wheeled vehicles inserted into the program, license

plate is then detected using contour extraction algorithm and character of figures and letters on

the plate identified using Optical Character Recognition (OCR). Program that has 82% accuracy

rate is made using C# programming language, and compiler Visual Studio 2010 ultimate edition.

Keyword : Licence Plate Recognition, Contour Extraction Algorithm, Optical Character Recognition, Intelligent Transportation System.

1. Introduction

Today the development of Science and Technology especially in the field of Information

Technology is rapidly. Nearly all areas of daily life using Information Technology.

Information is very important role now because of the existence of information can make it

easier for someone to take a decision.

With the presence of Information Technology can make it easier for someone to finish

the job or can help provide a solution to a problem that exists in real life. Also the development

of image processing. In image processing, images are processed in such a way that images are

easier to process. Automatic Number Plate Recognition (ANPR) has become a very important

application in image processing.

Automatic Number Plate Recognition (ANPR) technology continues to grow until

in Indonesia which is currently being developed by government which called ITS (Intelligent

Transportation System). Intelligent Transportation System (ITS) is a system built for the

transportation problem in which input data are obtained through visual surveillance.

Information or data about the driver on the road can be obtained through the license plates of

vehicles owned by drivers is.

License Plate Recognition system is receiving the input image, then be detected where

the license plate number and automatically recognized the character numbers and

letters on license plates at four wheel vehicles.

2. Methodology

The scope of research includes analysis, design and implementation of

application automatic number plate recognition and detection. As for a discussion covering the

design, implementation, and evaluation of program.

2.1. Software Design

An outline this program there are four main process shown in the diagram below.

Image 1 - Global flowchart process in the system

On phase preprocessing, input image converted into grayscale image first. After that

just performed the location of license plate detection using one of contour extraction

algorithm which is canny edge detection to detect the edge.

Image 2 – (a) Original Image (b) Grayscale Image (c) Final Canny Edge Detection

If the edge has been detected then the next detected section is rectangular.

Preprocessing

Detection

Selection

Noise Filtering

Recognition

Image 3 – Rectangular Detection

From some rectangle formed, will be selected rectangle which is by calculating the

ratio of the number plate length:width of a vehicle number plate. In this case the ratio

obtained in Indonesian license plates in the range of 2-3.

Image 4 – Selection Result of License Plate

The next step is noise filtering by using canny edge detection once again to detect the

edges of the numbers and letters on license plates. Then do the erosion and dilation are used

together to unify the separate pixels so as to clarify the form of letters or numbers, and also

eliminates the noise of powder on the pixel.

When it is free from noise, then it is ready to be recognized by Optical Character

Recognition (OCR). OCR used is tesseract ocr. Tesseract OCR is open source OCR which

first developed by HP (Hewlett-Packard) between 1984 and 1994. Tesseract started from the

PhD research project in HP Laboratory, Bristol by Ray Smith. (Ray Smith, 2005, p1)

Recognition process is performed by tesseract ocr shown below.

segmentation

normalization

feature extraction

Image 5 – Recognition Process in Tesseract OCR

First, character will be separated at the step chopping character. If there

are characters that overlap each other will be fixed at step separation of connected

characters. Next is checked whether the character is broken, if there are damage characters,

it will be repaired at this step of associate the broken character.

Next, the process adaptive classifier, characters on the plate matched with prototype

characters in tesseract training data. When approaching similarities then the character will be

shown. The results following the recognition shown below.

Image 6 - The Results of License Plate Character Recognition

Chopping character

Separation of Connected Character

Associate the Broken Character

Adaptive Classifier

Recognition Result

2.2. Implementation Implementation of the design of the application program uses the following hardware

specifications.

• Processor : Intel Core 2 Duo CPU T8100 @ 2,10GHz

• Memory (RAM) : 2.00 GB

• Hard Disk : 500 GB

• Monitor : 13.7” LED

Whereas specification of software that is used as follows.

• Operating System : Windows 7 Professional 32 bit

• Compiler : Microsoft Visual Studio 2010 Ultimate Edition

• Programming Language : C#

• Library : EmguCV version 2.3

• Engine : Tesseract OCR

2.3. Evaluation

The car image that will be tested, collected first in the folder testing image. The

program has advantages in edge detection. All parts of the edge is detected, so that the candidate

license plate number will not be missed. Another advantage of this program is the time to detect

and recognize the number plate that fast enough just in milliseconds, the average recognition

time for about 227,3047 milliseconds.

But it also has some disadvantages such as when the picture was taken some distance

away, program is still not able to detect the license plate and edge detection are still less

powerful that the car is too skewed positions (more than 45 degrees) the license plate can’t be

detected.

In testing to this program, used 60 samples of car images that have the standard number

plate in accordance with existing regulations in Indonesia. Some of the successful test results

will be presented as follows.

Image 7 – Successful Test Results

Whereas some of the failed test results as follows.

Image 8 – Failed Test Results

Based on the results of testing to 60 images that contain license plates, can be

recognized as much as 49 license plates and not be recognized as much as 11 license plates.

Then the accuracy rate can be calculated from this program by way of:

Based on the above formula, can be obtained by the calculation accuracy from this program.

= 81.6667 % 82%

Then the failure rate can be obtained by this program is 100% - 82% = 18%. From

the analysis, the detection failure occurred due to several things:

• Detection of the location of a number plate is not powerful enough so that the

position of the car that leans more than 45 degrees or license plate can’t be detected.

• The position image capture a little distance so that the license plate not detected.

• The condition of broken number plate.

• Effect of poor light or too bright.

3. Conclusion

Based on the results of testing to 60 images on a car that has run by the program, it

can be concluded that:

• The accuracy from this program by 82%.

• The program has advantages such as:

1. The average time of detection and recognition approximately 227,3047 milli seconds.

2. All the edges are considered as a rectangle will be detected so that the candidate's

license plate number will not be missed.

• The program also has disadvantages such as:

1. When the picture was taken a little distance, the program still can’t detect the license

plates.

2. When the image skewed more than 45 degrees, the program still can’t detect and

recognize vehicle’s license plates with properly.

• Thus the plate recognition system is still not powerful enough (robust) in terms of

number plate detection and recognition of four-wheeled vehicle.

References

[1] A.Broumandnia, M. (2005). Application of pattern recognition for Farsi license plate

recognition. International Congress for Global Science and Technology (ICGST)-GVIP

Journal Vol 5 , 25-31.

[2] AIM, Inc., (The Association for Automatic Identification and Data Capture

Technologies). (2000). Optical Character Recognition (OCR). 634 Alpha Drive

Pittsburgh, PA 15238-2802, USA: AIM, Inc.

[3] Andi Wahju Rahardjo Emanuel, A. H. (2008). Pengembangan Aplikasi Pengenalan

Karaketer Alfanumerik. Jurnal Informatika , 49-58.

[4] C.N. Anagnostopoulos, I. A. (2005). A Template-Guided Approach to Vehicle

Surveillance and Access Control. Journal of Electrical Engineering , 534-539.

[5] Dharmawan, S. (2009). Perancangan Program Aplikasi Pengenalan Letak Plat Nomor

Menggunakan Metode Konvolusi. Jakarta: Universitas Bina Nusantara.

[6] Draghici, S. (2004). A neural network based artificial vision system for licence plate

recognition. Detroit, Michigan: Wayne State University.

[7] Eka Priyatma, E. H. (2004). PERLUASAN ALGORITMA PENGENAL HURUF

METODE TUPEL-N MEMAKAI LOGIKA KABUR. INTEGRAL, Vol. 9 No. 3 , 108-

116.

[8] Federal Signal Public Safety System Corporation. (2008). Automated License Plate

Recognition Investment Justification and Purchasing Guide. Federal Signal

Corporation,1-14.

[9] J. Eka Priyatma, S. E. (2004). PERLUASAN ALGORITMA PENGENAL HURUF.

INTEGRAL Vol 9 No 3 , 108-116.

[10] Kristanto, A. (2004). Jaringan Syyaraf Tiruan (Konsep Dasar, Algoritma, dan Aplikasi).

Yogyakarta: Gava Media.

[11] Kumar, S. (2008). License Plate Recognition System for Indian Vehicle. Journal of

Information Technology and Knowledge Management , 311-325.

[12] Liberty, J. (2001). Programming C#. O'Reilly.

[13] Luis, C. Y. (2006). Pengenalan Plat Nomor Otomatis Dengan Metode Morfologi,

Connected Component Labelling dan Bidirectional Associative Memory. Jakarta:

Universitas Bina Nusantara.

[14] MARTINSKY, O. (2007). Algorithmic and Mathematical Principles Of Automatic

Number Plates Recognition Systems. Brno Country: BRNO UNIVERSITY OF

TECHNOLOGY.

[15] Munir, R. (2004). Pengolahan Citra Digital dengan Pendekatan Algoritmik. Bandung:

Informatika.

[16] Nelson, L. J. (2007, February 3). Plate Recognition: Electro-Optical Technologies, Inc.

Retrieved September 29, 2011, from Electro-Optical Technologies, Inc.:

http://www.photocop.com/recognition.htm

[17] Pressman, R. S. (2010). Software Engineering A Practitioners Approach 7 Edition. New

York: McGraw-Hill.

[18] Resmana Lim, L. V. (2003). Sistem Pengenalan Plat Nomor Mobil Menggunakan

Metode Principal Component Analysis. Jurnal Teknik Elektro Universitas Petra Volume

3 , 31-38.

[19] Rodr´ıguez, J. J., & Maudes, J. (2007). LICENSE PLATE NUMBER RECOGNITION

New Heuristic and a Comparative Study of Classifier. Burgos, Spain: University of

Burgos.

[20] Smith, R. (2009). Adapting the Tesseract Open Source OCR Engine for. Mountain View:

Google Inc.

[21] Smith, R. (2005). An Overview of the Tesseract OCR Engine. Bristol: Google Inc.

[22] Szeliski, R. (2011). Computer Vision, Algorithms and Applications. Washington, USA:

Springer.

[23] Wawrzyniak, H. K. (2002). License plate localization and recognition in camera

pictures. Gliwice: Wrocław University of Technology.

[24] Wicaksana, R. P. (2008). Pengenalan Plat Nomor Kendaraan Secara Otomatis Untuk

Pelanggaran Lalu Lintas. Surabaya: Insitut Teknologi Sepuluh Nopember.

SOFTWARE DESIGN FOR LICENSE PLATE DETECTION AND

RECOGNITION USING CONTOUR EXTRACTION ALGORITHM AND OCR

Himawan Setiadi Binus University, Jakarta, DKI Jakarta, Indonesia

Advisor:

Alexander Agung Santoso Gunawan, Samuel Mahatmaputra Tedjojuwono, S.Si., M.T., M.Sc S.Kom., M.Info.Tech D3579 D2131

Abstract

At present the development of number of vehicles in Jakarta is growing very rapidly, both cars

and motorcycles. On that basis, required an application that can identify the vehicle number

plate data quickly. This thesis aims to develop a program of detection and recognition of license

plates, or better known as Licence Plate Recognition (LPR) which is currently being

developed for the needs of Intelligent Transportation System (ITS) in Indonesia. The workings

of this program's first the image of four-wheeled vehicles inserted into the program, license

plate is then detected using contour extraction algorithm and character of figures and letters on

the plate identified using Optical Character Recognition (OCR). Program that has 82% accuracy

rate is made using C# programming language, and compiler Visual Studio 2010 ultimate edition.

Keyword : Licence Plate Recognition, Contour Extraction Algorithm, Optical Character Recognition, Intelligent Transportation System.

1. Introduction

Today the development of Science and Technology especially in the field of Information

Technology is rapidly. Nearly all areas of daily life using Information Technology.

Information is very important role now because of the existence of information can make it

easier for someone to take a decision.

With the presence of Information Technology can make it easier for someone to finish

the job or can help provide a solution to a problem that exists in real life. Also the development

of image processing. In image processing, images are processed in such a way that images are

easier to process. Automatic Number Plate Recognition (ANPR) has become a very important

application in image processing.

Automatic Number Plate Recognition (ANPR) technology continues to grow until

in Indonesia which is currently being developed by government which called ITS (Intelligent

Transportation System). Intelligent Transportation System (ITS) is a system built for the

transportation problem in which input data are obtained through visual surveillance.

Information or data about the driver on the road can be obtained through the license plates of

vehicles owned by drivers is.

License Plate Recognition system is receiving the input image, then be detected where

the license plate number and automatically recognized the character numbers and

letters on license plates at four wheel vehicles.

2. Methodology

The scope of research includes analysis, design and implementation of

application automatic number plate recognition and detection. As for a discussion covering the

design, implementation, and evaluation of program.

2.1. Software Design

An outline this program there are four main process shown in the diagram below.

Image 1 - Global flowchart process in the system

On phase preprocessing, input image converted into grayscale image first. After that

just performed the location of license plate detection using one of contour extraction

algorithm which is canny edge detection to detect the edge.

Image 2 – (a) Original Image (b) Grayscale Image (c) Final Canny Edge Detection

If the edge has been detected then the next detected section is rectangular.

Preprocessing

Detection

Selection

Noise Filtering

Recognition

Image 3 – Rectangular Detection

From some rectangle formed, will be selected rectangle which is by calculating the

ratio of the number plate length:width of a vehicle number plate. In this case the ratio

obtained in Indonesian license plates in the range of 2-3.

Image 4 – Selection Result of License Plate

The next step is noise filtering by using canny edge detection once again to detect the

edges of the numbers and letters on license plates. Then do the erosion and dilation are used

together to unify the separate pixels so as to clarify the form of letters or numbers, and also

eliminates the noise of powder on the pixel.

When it is free from noise, then it is ready to be recognized by Optical Character

Recognition (OCR). OCR used is tesseract ocr. Tesseract OCR is open source OCR which

first developed by HP (Hewlett-Packard) between 1984 and 1994. Tesseract started from the

PhD research project in HP Laboratory, Bristol by Ray Smith. (Ray Smith, 2005, p1)

Recognition process is performed by tesseract ocr shown below.

segmentation

normalization

feature extraction

Image 5 – Recognition Process in Tesseract OCR

First, character will be separated at the step chopping character. If there

are characters that overlap each other will be fixed at step separation of connected

characters. Next is checked whether the character is broken, if there are damage characters,

it will be repaired at this step of associate the broken character.

Next, the process adaptive classifier, characters on the plate matched with prototype

characters in tesseract training data. When approaching similarities then the character will be

shown. The results following the recognition shown below.

Image 6 - The Results of License Plate Character Recognition

Chopping character

Separation of Connected Character

Associate the Broken Character

Adaptive Classifier

Recognition Result

2.2. Implementation Implementation of the design of the application program uses the following hardware

specifications.

• Processor : Intel Core 2 Duo CPU T8100 @ 2,10GHz

• Memory (RAM) : 2.00 GB

• Hard Disk : 500 GB

• Monitor : 13.7” LED

Whereas specification of software that is used as follows.

• Operating System : Windows 7 Professional 32 bit

• Compiler : Microsoft Visual Studio 2010 Ultimate Edition

• Programming Language : C#

• Library : EmguCV version 2.3

• Engine : Tesseract OCR

2.3. Evaluation

The car image that will be tested, collected first in the folder testing image. The

program has advantages in edge detection. All parts of the edge is detected, so that the candidate

license plate number will not be missed. Another advantage of this program is the time to detect

and recognize the number plate that fast enough just in milliseconds, the average recognition

time for about 227,3047 milliseconds.

But it also has some disadvantages such as when the picture was taken some distance

away, program is still not able to detect the license plate and edge detection are still less

powerful that the car is too skewed positions (more than 45 degrees) the license plate can’t be

detected.

In testing to this program, used 60 samples of car images that have the standard number

plate in accordance with existing regulations in Indonesia. Some of the successful test results

will be presented as follows.

Image 7 – Successful Test Results

Whereas some of the failed test results as follows.

Image 8 – Failed Test Results

Based on the results of testing to 60 images that contain license plates, can be

recognized as much as 49 license plates and not be recognized as much as 11 license plates.

Then the accuracy rate can be calculated from this program by way of:

Based on the above formula, can be obtained by the calculation accuracy from this program.

= 81.6667 % 82%

Then the failure rate can be obtained by this program is 100% - 82% = 18%. From

the analysis, the detection failure occurred due to several things:

• Detection of the location of a number plate is not powerful enough so that the

position of the car that leans more than 45 degrees or license plate can’t be detected.

• The position image capture a little distance so that the license plate not detected.

• The condition of broken number plate.

• Effect of poor light or too bright.

3. Conclusion

Based on the results of testing to 60 images on a car that has run by the program, it

can be concluded that:

• The accuracy from this program by 82%.

• The program has advantages such as:

1. The average time of detection and recognition approximately 227,3047 milli seconds.

2. All the edges are considered as a rectangle will be detected so that the candidate's

license plate number will not be missed.

• The program also has disadvantages such as:

1. When the picture was taken a little distance, the program still can’t detect the license

plates.

2. When the image skewed more than 45 degrees, the program still can’t detect and

recognize vehicle’s license plates with properly.

• Thus the plate recognition system is still not powerful enough (robust) in terms of

number plate detection and recognition of four-wheeled vehicle.

References

[1] A.Broumandnia, M. (2005). Application of pattern recognition for Farsi license plate

recognition. International Congress for Global Science and Technology (ICGST)-GVIP

Journal Vol 5 , 25-31.

[2] AIM, Inc., (The Association for Automatic Identification and Data Capture

Technologies). (2000). Optical Character Recognition (OCR). 634 Alpha Drive

Pittsburgh, PA 15238-2802, USA: AIM, Inc.

[3] Andi Wahju Rahardjo Emanuel, A. H. (2008). Pengembangan Aplikasi Pengenalan

Karaketer Alfanumerik. Jurnal Informatika , 49-58.

[4] C.N. Anagnostopoulos, I. A. (2005). A Template-Guided Approach to Vehicle

Surveillance and Access Control. Journal of Electrical Engineering , 534-539.

[5] Dharmawan, S. (2009). Perancangan Program Aplikasi Pengenalan Letak Plat Nomor

Menggunakan Metode Konvolusi. Jakarta: Universitas Bina Nusantara.

[6] Draghici, S. (2004). A neural network based artificial vision system for licence plate

recognition. Detroit, Michigan: Wayne State University.

[7] Eka Priyatma, E. H. (2004). PERLUASAN ALGORITMA PENGENAL HURUF

METODE TUPEL-N MEMAKAI LOGIKA KABUR. INTEGRAL, Vol. 9 No. 3 , 108-

116.

[8] Federal Signal Public Safety System Corporation. (2008). Automated License Plate

Recognition Investment Justification and Purchasing Guide. Federal Signal

Corporation,1-14.

[9] J. Eka Priyatma, S. E. (2004). PERLUASAN ALGORITMA PENGENAL HURUF.

INTEGRAL Vol 9 No 3 , 108-116.

[10] Kristanto, A. (2004). Jaringan Syyaraf Tiruan (Konsep Dasar, Algoritma, dan Aplikasi).

Yogyakarta: Gava Media.

[11] Kumar, S. (2008). License Plate Recognition System for Indian Vehicle. Journal of

Information Technology and Knowledge Management , 311-325.

[12] Liberty, J. (2001). Programming C#. O'Reilly.

[13] Luis, C. Y. (2006). Pengenalan Plat Nomor Otomatis Dengan Metode Morfologi,

Connected Component Labelling dan Bidirectional Associative Memory. Jakarta:

Universitas Bina Nusantara.

[14] MARTINSKY, O. (2007). Algorithmic and Mathematical Principles Of Automatic

Number Plates Recognition Systems. Brno Country: BRNO UNIVERSITY OF

TECHNOLOGY.

[15] Munir, R. (2004). Pengolahan Citra Digital dengan Pendekatan Algoritmik. Bandung:

Informatika.

[16] Nelson, L. J. (2007, February 3). Plate Recognition: Electro-Optical Technologies, Inc.

Retrieved September 29, 2011, from Electro-Optical Technologies, Inc.:

http://www.photocop.com/recognition.htm

[17] Pressman, R. S. (2010). Software Engineering A Practitioners Approach 7 Edition. New

York: McGraw-Hill.

[18] Resmana Lim, L. V. (2003). Sistem Pengenalan Plat Nomor Mobil Menggunakan

Metode Principal Component Analysis. Jurnal Teknik Elektro Universitas Petra Volume

3 , 31-38.

[19] Rodr´ıguez, J. J., & Maudes, J. (2007). LICENSE PLATE NUMBER RECOGNITION

New Heuristic and a Comparative Study of Classifier. Burgos, Spain: University of

Burgos.

[20] Smith, R. (2009). Adapting the Tesseract Open Source OCR Engine for. Mountain View:

Google Inc.

[21] Smith, R. (2005). An Overview of the Tesseract OCR Engine. Bristol: Google Inc.

[22] Szeliski, R. (2011). Computer Vision, Algorithms and Applications. Washington, USA:

Springer.

[23] Wawrzyniak, H. K. (2002). License plate localization and recognition in camera

pictures. Gliwice: Wrocław University of Technology.

[24] Wicaksana, R. P. (2008). Pengenalan Plat Nomor Kendaraan Secara Otomatis Untuk

Pelanggaran Lalu Lintas. Surabaya: Insitut Teknologi Sepuluh Nopember.