• Tidak ada hasil yang ditemukan

UNIVERSITI TEKNIKAL MALAYSIA MELAKA VEHICLE PLATE DETECTION SYSTEM

N/A
N/A
Protected

Academic year: 2022

Membagikan "UNIVERSITI TEKNIKAL MALAYSIA MELAKA VEHICLE PLATE DETECTION SYSTEM"

Copied!
24
0
0

Teks penuh

(1)

UNIVERSITI TEKNIKAL MALAYSIA MELAKA VEHICLE PLATE DETECTION SYSTEM

This report is submitted in accordance with the requirement of the Universiti Teknikal Malaysia Melaka (UTeM) for the Bachelor of Electronics Engineering

Technology (Industrial Industrial Electronics) with Honours.

by

ILYANA AMALIN BINTI ZAINAL ROSLAN B071511088

960505-10-5050

FACULTY OF ELECTRICAL AND ELECTRONIC ENGINEERING TECHNOLOGY

2018

(2)

ii Tajuk: Vehicle Plate Detection System

Sesi Pengajian: Semester 1 2018/2019

Saya Ilyana Amalin binti Zainal Roslan binti Zainal Roslan mengaku membenarkan Laporan PSM ini disimpan di Perpustakaan Universiti Teknikal Malaysia Melaka (UTeM) dengan syarat-syarat kegunaan seperti berikut:

1. Laporan PSM adalah hak milik Universiti Teknikal Malaysia Melaka dan penulis.

2. Perpustakaan Universiti Teknikal Malaysia Melaka dibenarkan membuat salinan untuk tujuan pengajian sahaja dengan izin penulis.

3. Perpustakaan dibenarkan membuat salinan laporan PSM ini sebagai bahan pertukaran antara institusi pengajian tinggi.

4. **Sila tandakan (X)

SULIT*

Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia sebagaimana yang termaktub dalam AKTA RAHSIA RASMI 1972.

UNIVERSITI TEKNIKAL MALAYSIA MELAKA

BORANG PENGESAHAN STATUS LAPORAN PROJEK SARJANA MUDA

(3)

iii

TERHAD* Mengandungi maklumat TERHAD yang telah ditentukan oleh organisasi/badan di mana penyelidikan dijalankan.

TIDAK

TERHAD

Yang benar, Disahkan oleh penyelia:

... ...

Ilyana Amalin binti Zainal Roslan Ts. Tg Mohd Faisal bin Tengku Wook

Alamat Tetap: Cop Rasmi Penyelia

No. 11, Jalan Chepor Indah 1, Chepor Indah,

31200 Chemor, Perak Darul Ridzuan.

Tarikh: Tarikh:

(4)

iv

DECLARATION

I hereby, declared this report entitled Vehicle Plate Detection System is the results of my own research except as cited in references.

Signature: ………

Author : Ilyana Amalin binti Zainal Roslan Date:

(5)

v APPROVAL

This report is submitted to the Faculty of Electrical and Electronic Engineering Technology of Universiti Teknikal Malaysia Melaka (UTeM) as a partial fulfilment of the requirements for the degree of Bachelor of Electronics Engineering Technology (Industrial Electronics) with Honours. The member of the supervisory is as follow:

Signature: ……….

Supervisor : Ts. Tg Mohd Faisal bin Tengku Wook

(6)

vi ABSTRAK

Sistem pengesanan nombor plat kereta dihasilkan dengan harapan dapat mengurangkan bilangan kenderaan yang tidak dikenali memasuki premis universiti. Hal ini adalah untuk menjamin kewujudan suasana pembelajaran dan premis yang selamat kepada para pelajar dan staf fakulti teknologi kejuruteraan (FTK). Sistem ini akan mula bertindak dengan sendirinya apabila pengesan pergerakan kenderaan infrared (PIR) mengesan kewujudan kenderaan pada pagar keselamatan atau tempat tertentu.

Kemudian, setelah penderia menghantar signal pada kamera, ianya akan menangkap gambar plat kenderaan berkenaan dan ianya akan melalui proses pengimejan supaya tulisan di atas no plat berkenaan dapat dibaca oleh sistem menggunakan program Matlab yang sesuai. Tulisan pada nombor plat kenderaan akan dikenal pasti menggunakan kaedah menyuai padan dengan templat yang telah disediakan. Segala informasi yang disimpan mengenai nombor plat kenderaan yang berdaftar akan terpapar pada GUI.

Sekiranya ianya kenderaan berdaftar, motor servo yang digunakan sebagai palang akan terbuka dan sekiranya tidak, sebaliknya yang akan berlaku. Dengan adanya sistem, kadar kemasukan kenderaan yang tidak dikenali ke dalam kompaun FTK dengan harapan dapat dikurangkan serta kadar jenayah juga dapat dikurangkan.

(7)

vii ABSTRACT

The vehicle plate detection system is developed in the hope of reducing the amount of unauthorised vehicle from entering the premises such as university’s compound. This is to ensure the secured environment for the staffs and students of the FTK. The system will automatically start to operate when the passive infrared motion sensor sensed the presence of vehicles at specific checkpoints. Then, the camera will be used to capture the image of the license plate of the vehicle. The image will then be processed by the system and this involves proper development of coding using the software Matlab. The characters on the plate will be extracted and recognised by using template matching method. The characters that has been identified on the vehicle plate will be cross matched with the information stored in the data base. If there is a match found, the vehicle is an authorised vehicle and will be allowed to enter the premises and if not, the system will alert the person in charge such the security guards. The passive infrared motion sensor is used to detect the presence of the vehicle at checkpoints and servo motor was used as the opening and closing of the gate. The GUI in the Matlab will be used to display the recognised characters on the vehicle plate. The USB camera will be used to capture the image of the vehicle plate. By using this system, it was hoped the number of unauthorised vehicles entering FTK premises can be reduced and the number of crimes occurs will be reduced.

(8)

viii DEDICATION

Alhamdulillah, praise to Almighty Allah S.W.T

This thesis is dedicated to:

My beloved family,

My Mother, Puan Raziah bin Mat Juda,

My Father, Zainal Roslan bin Othman,

My Lovely Brother, Danish Iskandar bin Zainal Roslan,

My Supervisor,

My beloved housemates,

My beloved friends,

And everyone involved.

Thank you for your encouragement and support.

May Allah bless you always.

(9)

ix

ACKNOWLEDGEMENTS

Alhamdulillah, thank you Allah for his blessing. I am overwhelmed that in all humbleness and gratefulness to acknowledge my depth to all those who have helped me throughout this project. I would like to express my sincere gratitude and respect to my Supervisor, Encik Tg Mohd Faisal bin Tengku Wook for his kindness, encouragement, guidance and suggestions throughout these two semesters of being my supervisor. I also want to thank to my beloved parents because they keep giving me a lot of moral and financial support to keep me going so that I can pursue with my project and my studies. A big thank you to Noor Junisha, Siti Nur Radilah and Qkhuratu’aina Aishah for always supporting me and helping me in many possible ways. Thank you for these 4 years of lovely friendship.

Thank you to Nur Farah Wahida binti Abdul Kadir for always helping me with my project and studies. Thank you for your kindness and friendship. Thank you to Aiman for helping me with the project. Thank you to Ng Chok Tong for always teaching me a lot of things and thank you for always assisted me when I had troubled with my project. Thank you to Intan Nadhirah, my lovely roommate, Muharnisyam, Maryam, Teresa and Syafiqah for being wonderful housemates and always being supportive. Thank you to all lecturers, friends and anyone who has been directly or indirectly involved in this project. Your helps and cooperation will never be forgotten. May Allah bless and reward them for their sincere, endeavour and contribution in the way of knowledge.

(10)

x

TABLE OF CONTENTS

TABLE OF CONTENTS PAGE

LIST OF TABLES xiv

LIST OF FIGURES xv

LIST OF APPENDICES xix

LIST OF ABBREVIATIONS, SYMBOLS AND NOMENCLATURE

xx

CHAPTER 1 INTRODUCTION 1

1.0 Introduction 1

1.1 Project Background 1

1.2 Problem Statement 2

1.3 Objective 3

1.4 Project Scope 3

1.5 Significance of the Project 4

CHAPTER 2 LITERATURE REVIEW 5

2.0 Introduction 5

2.1 Background 5

2.2 Important Process in Vehicle Plate Detection System 7 2.2.1 Factors that Can Influence Plate Detection 7 2.3 Process in Image Analysis for Vehicle Plate 9

2.3.1 Greyscaling Images 9

(11)

xi 2.3.2 Image Binarization

2.3.3 Character Segmentation and Extraction 2.3.4 Character Recognition

10 11 12 2.4 Methods to Enhance the Results of Character Extraction 13 2.4.1 Otsu’s Method

2.4.2 Mathematical Morphology 2.4.3 Edge Detection

2.4.4 Contrasting Image

13 13 15 15 2.5 Complicated Environmental Issues

2.6 Microprocessor Versus Microcontroller

2.7 Sensor Used for Detecting Presence of Vehicles 2.8 Application of ANPR system

2.9 Summary

16 17 19 19 20

CHAPTER 3 METHODOLOGY 21

3.0 Introduction

3.1 Equipment Selection

21 23 3.1.1 Proteus

3.1.2 Arduino Uno R3

3.1.3 Passive Infrared (PIR) Sensor 3.1.4 USB-type Webcam Camera 3.1.5 Laptop

3.1.6 Matlab 2016a

3.1.7 Arduino IDE Software

24 25 27 27 28 30 31

(12)

xii

3.1.8 Micro Servo Motor MG90S 32 3.2 Development of the Vehicle Plate Detection System 33 3.2.1 Brief Design of The System

3.2.2 Hardware Development 3.2.3 Software Development

34 35 38 3.3 Experimental Conduct

3.4 Image Pre-Processing

3.5 Expected Result and Analysis

42 46 48

CHAPTER 4 RESULT AND DISCUSSION 49 4.0 Introduction

4.1 The Setup of Passive Infrared Sensor

49 49 4.1.1 The Wiring Connection of the Passive Infrared Sensor To Arduino Uno R3

4.1.2 The Coding for Activate the Passive Infrared Sensor

49

51

4.2 The Image Pre-Processsing in Matlab 52

4.2.1 Capture Image using Webcam Camera 4.2.2 Save Image Captured in Folder

4.2.3 Calling Image to Matlab and Image Resizing 4.2.4 Converting Colour Image to Grayscale 4.2.5 Binarization

4.2.6 Edge Detection Process

4.2.7 Skeletonization, Dilation and Erode

53 53 54 56 56 57 58

(13)

xiii 4.2.8 Character Filling Process 4.2.9 Character Segmentation

4.2.10 Template Matching Using Function Correlation

60 60 61 4.3 The Hardware Setup

4.4 The Output

63 65

4.5 Analysis of the Project 68

4.5.1 Contrast Image Made the Extraction Process Much Easier

4.5.2 Edge Detection Made the Extraction Process Better 4.5.3 White Characters on Black Background and Black Characters on White Background

4.5.4 Test on Accuracy of the System

69

70 71

72

CHAPTER 5 RESULT AND DISCUSSION 74 5.0 Introduction

5.1 Conclusion

5.0 Recommendations for Future Work

74 74 74

REFERENCES

APPENDIX

76

80

(14)

xiv

LIST OF TABLES

TABLE TITLE PAGE

Table 2.1: Comparison of the Performance between Raspberry Pi 3 and Arduino Uno (cited from Irshad and Feroz (2016))

18

Table 4.1: Connections from PIR sensor to Arduino Uno R3 pin 50

Table 4.2: The States of the LEDs 68

(15)

xv

LIST OF FIGURES

FIGURE TITLE PAGE

Figure 2.0: Main stages in the process of ANPR 7 Figure 2.1: Standard spec for vehicle plate in Malaysia 8

Figure 3.1: Flowchart of the project 22

Figure 3.2: Proteus Software 24

Figure 3.3: The component of Arduino Uno R3 in Proteus 25

Figure 3.4: The Arduino Uno R3 26

Figure 3.5: Passive Infrared (PIR) Sensor 27

Figure 3.6: The USB Camera 28

Figure 3.7: The Personal Computer (left) and Laptop (right) 29

Figure 3.8: MatLab 2016a Software 30

Figure 3.9: MatLab 2016a desktop display 31

Figure 3.10: Arduino IDE software 32

Figure 3.11: Arduino IDE workspace display 32

Figure 3.12: Micro Servo Motor MG90S 33

Figure 3.13: Brief Design of the System 34

Figure 3.14: Webcam connected to Laptop 35

Figure 3.15: The connection of PIR sensor to Arduino Uno R3 board

36

Figure 3.16: The connection of servo motor to Arduino Uno R3 board

37

(16)

xvi

Figure 3.17: Command to acquire list of the webcam 38 Figure 3.18: Command to acquire properties of the webcam 39 Figure 3.19: Command to acquire name of the webcam rejected 39 Figure 3.20: Command used for capture, preview and clear image 40

Figure 3.21: Save image to folder 40

Figure 3.22: Command to detect Arduino 41

Figure 3.23: Information about Arduino 42

Figure 3.24: Flowchart for the Vehicle Plate Detection System 45 Figure 3.25: Flowchart to Image Processing for Recognition

Characters

47

Figure 4.1: Connection PIR sensor to Arduino Uno R3 50 Figure 4.2: Connection PIR sensor to Arduino Uno R3

(Hardware)

50

Figure 4.3: Coding to activate PIR sensor 51

Figure 4.4: Display on the serial monitor 52

Figure 4.5: Coding to enable connection from webcam to Matlab 2016a software

53

Figure 4.6: Coding to save picture in folder 53

Figure 4.7: Coding to save picture in selected folder 54 Figure 4.8: Coding to upload plate image in Matlab and resizing

it

54

Figure 4.9: Vehicle plate number saved as pic2.jpg 55 Figure 4.10: Vehicle plate number saved as pic2.jpg display in

Matlab workspace

55

(17)

xvii

Figure 4.11: Code for convert colour image to grayscale 56 Figure 4.12: Converting colour image to grayscale 56

Figure 4.13: Coding for binarization 56

Figure 4.14: Output for binarization 57

Figure 4.15: Edge detection function 58

Figure 4.16: Output for skeletonization 59

Figure 4.17: Dilation process of the image 59

Figure 4.18: Filling process of the image 60

Figure 4.19: The Segmented Character 61

Figure 4.20: Prepared characters template for correlation in BMP format

62

Figure 4.21: Character segmented ‘W’ from the captured image 62 Figure 4.22: Template character ‘W’ in bmp.format 62

Figure 4.23: Hardware Setup 63

Figure 4.24: Camera Setup 63

Figure 4.25: Stripboard (Front View) 64

Figure 4.26: Stripboard (Back View) 64

Figure 4.27: The output of the image pre-processing 65 Figure 4.28: The output of the image pre-processing 2 65 Figure 4.29: The output display on command window 66

Figure 4.30: Unauthorised vehicle detected 66

Figure 4.31: The Prototype 67

(18)

xviii

Figure 4.32: Graph of Percentage of Successful Plate Recognition against Parameters of Contrasted and Non-Contrasted Image

69

Figure 4.33: Graph of Percentage of Successful Plate Recognition against Parameters Image Undergoing of Edge Detection and No Edge Detection

70

Figure 4.34: Graph of Percentage of Successful Plate Recognition against Parameters of plate with white characters on black background and black characters on white background

71

Figure 4.35: Graph of Percentage Accuracy Against Sample Cars 72

(19)

xix

LIST OF APPENDICES

APPENDIX TITLE PAGE

Appendix 1: Pin Configurations for the Components 80

Appendix 2 Coding 82

Appendix 3: Gantt Chart 85

(20)

xx

LIST OF ABBREVIATIONS, SYMBOLS AND NOMENCLATURE

ANPR - Automated Number Plate Recognition GND - Ground

GPIO - General Purpose Input/Output GPU - Graphics Processing Unit GUI - Graphical User Interface

IR - Infrared

LED - Light Emitting Diode

MB - Megabyte

OS - Operating System PCB - Printed Circuit Board PIR - Passive Infrared Sensor RAM - Random-Access Memory SD - Secure Digital

USB - Universal Serial Bus

UTeM - University Teknikal Malaysia Melaka

(21)

1

INTRODUCTION

1.0 Introduction

This chapter discussed in detail about the purpose of the project. Several important will be discussed such as background of the project, its problem statement, objectives, scopes and significance of this project. The background of the project is written as to explain about the expectation of what will be done in this project and its expected result. Problem statement is used to discuss or determine the issues, which is seen as the problem that need to be solved in this project. Then, the objective of the project will be also be determined in this project and it is known as a specific result that need to be achieved in this project. Project scopes will be discussed about listing target goals of the project and tasks that need to be done. With the presence of scope project, the understanding regarding the project will be much clearer and easier to understand. Last but not least, the significance of the project will discuss about the project will bring benefits or impacts to other people.

1.1 Project Background

A system that can detect the images of the plate number will capture the image of the license plate of the vehicle. However, the vehicle plate needed to undergo image processing process. This system can be used for safety purpose such as detecting unauthorised plate number among staff and students before entering the university compounds. This is to increase or upgrade the level of security in UTeM compound. By

(22)

2

having this system, the process of checking the vehicles by security guards do not have to be done every single time before allowing any vehicle entering the university’s compound and only come out when there is detection of unauthorised vehicle’s plate number. Before using this system, every member of staffs and students of the university need to register their vehicle and identity information in data base. The data will be stored online, and the information of the vehicle owner can be seen by the security checkpoints.

Then, at the security checkpoint, a security pole or bar will be placed with vehicle detection sensor. Once a sensor is detected, the camera will capture the image of the license plate and analyse it. It will cross match with the information in data base whether the vehicle detected was a registered vehicle or not. If it registered the pole will open but if not the pole will still closing and an alert will be warned to the security guards nearby to check and interrogate the unauthorised vehicles.

1.2 Problem Statement

There are several unauthorised vehicles keep entering the university’s compound and some of them are not even the students or staffs of the university. This need to be prevented as this may affect the safety of students or even staffs of the university. It is also crucial to prevent any crimes to occur inside the university’s compound because once it happens, it will quite hard to trace the person who had done the crime. To maintain the safe environment, a system needs to be created which is plate vehicle number detection system. Plate vehicle number recognition is a way to prevent unknown vehicles from coming inside the university’s compound without permission. The plate number will be registered under the name of the student or staff and the identity information that belong to that registered plate number will register and save in data base. If the system cannot

(23)

3

match the plate number with the data base or if the system cannot recognise any vehicle plate number, it will alert the security guard nearby to be alerted with that vehicle. To prevent the opportunity for any unauthorised vehicle from entering the compound without permission, a security bar or pole will be placed. The presence of vehicle will be sensed by the sensor and it will automatically capture and analyse the image of the vehicle plate and identity of the vehicle will be identified. If the system cannot crossmatches the plate number with data base, the system will alert that it is not an unauthorised vehicle.

1.3 Objective

The objectives of this project are to:

1. To develop image processing system that able to detect and recognise the characters on the vehicle plates using Matlab.

2. To understand important steps of image processing when extracting the vehicle plate number.

1.4 Project Scope

This system was aimed to be applied in university’s ground such as Fakulti Teknologi Kejuruteraan (FTK) security gates. This project is developed as to prevent or decrease the number of unauthorised vehicles from entering the university’s compound without proper permission. This is done to assure the secure environment for the students and staffs. The system needs to be applied at the security checkpoint. Hence, the system will be designed and developed based on the scope stated using suitable equipment or devices. It will focus on capturing and analysing the image of license plate upon entering the security checkpoint. The image of vehicle plate will be captured right after a vehicle

(24)

4

detection sensor senses the vehicle’s presence. The plate number will be recognised after undergoing several processes such as image processing, segmentation of plate image and recognition of characters written on the plate number. Several sample of data base will be created to test the efficiency of the system and whether it able to recognise the number plate with the one in the data base or not. Then, a system using Graphical User Interface (GUI) for the system will be developed to make easier for the people to use the system and able to view the information of vehicle plate detected.

1.5 Significance of the Project

This project is developed to decrease the number of unauthorised vehicles from entering FTK’s compound. When the plate recognition system using Matlab is developed, it is easier for them to use it for safety purpose such as to detect the unauthorised vehicle.

Other than that, system developed will enhance the security system of the place that uses this system by restricting the entrance of unauthorised vehicles. The uses of GUI allow much easier for people to use plate vehicle detection system and make it easier for them to retrieve the information of the owner of the vehicle.

Referensi

Dokumen terkait

TAJUK: Environmental Assessment of the Indoor Air Contaminants on the Air Conditioning System at the Universiti Teknikal Malaysia Melaka (UTeM) Main Library.. SESI PENGAJIAN: