SU+ @ Strathmore University Library Electronic Theses and Dissertations This work is availed for free and open access by Strathmore University Library. It has been accepted for digital distribution by an authorized administrator of SU+ @Strathmore University. For more information, please contact library@strathmore.edu 2021 A Duplicate number plate detection system using fixed location cameras. Kibunja, Kelvin Peter School of Computing and Engineering Science Strathmore University Recommended Citation Kibunja, K. P. (2021). A Duplicate number plate detection system using fixed location cameras [Thesis, Strathmore University]. http://hdl.handle.net/11071/12755 Follow this and additional works at: http://hdl.handle.net/11071/12755 https://su-plus.strathmore.edu/ https://su-plus.strathmore.edu/ http://hdl.handle.net/11071/2474 mailto:library@strathmore.edu http://hdl.handle.net/11071/12755 http://hdl.handle.net/11071/12755 A Duplicate Number Plate Detection System Using Fixed Location Cameras By Kelvin Peter Kibunja 114814 A Thesis Submitted to the School of Computing and Engineering Science in partial fulfillment of the requirements for the award of Master of Science in Computing and Information Systems Degree. Master of Science in Computing and Information Systems Strathmore University September 2021 ii Declaration I declare that this work has not been previously submitted and approved for the award of a degree by this or any other University. To the best of my knowledge and belief, the thesis contains no material previously published or written by another person except where due reference is made in the thesis itself. © No part of this thesis may be reproduced without the permission of the author and Strathmore University. Njeri, KelvinPeter Kibunja September 2021 Approval The thesis of Njeri, KelvinPeter Kibunja was reviewed and approved by the following: Dr. Vitalis Ozianyi, Senior Lecturer, Scholl of Computing and Engineering Sciences, Strathmore University Dr. Julius Butime, Dean, School of Computing and Engineering Sciences, Strathmore University Dr. Bernard Shibwabo, Director of Graduate Studies, Strathmore University iii Abstract Vehicle registration is a legal necessity to all, any vehicle purchased must be registered and the purpose of this registration is to assist in vehicle identification. The vehicle identifier is usually a metal or plastic plate patched on the front or rear part of a vehicle and contains unique alphanumeric characters. If vehicles on the road do not have any unique identifying tags or have the wrong tags, people will have, an opportunity to be mischievous as no one will be able to identify or account for any vehicle. Hence, through vehicle registration one can be able to identify and prove ownership of the vehicle. In order to hide the identity vehicles are disguised by cloning the number plates which aids in providing inaccurate ownership details. Without the correct ownership details, it is difficult to trace any vehicle involved in an illegal activity be it theft, terrorism, to mention but a few. In Kenya for people to discover that a vehicle has duplicate number late, the vehicle must have attracted the police attention, and this could be through being involved in an illegal activity. This system of number plate identification is usually a posterior to a crime, and it entails conducting a search with the Kenya National Transport Safety Authority (NTSA). In a country like Britain, the system in place to identify number plates is a deterrent one, whereby fixed location cameras capture images of vehicle’s number plates then compare with what is in their regional registration database. In Kenya this system would work perfectly well but in cases where we have duplicates it will be an issue since it will be difficult to flag out one. To curb the problem, the researcher intends to use fixed location cameras to identify duplicate number plates. From the image, the system extracts the vehicle number plate, colour and model. Time and location of the image capture is recorded, and this will assist in comparison of the details captured. The researcher uses image processing and artificial neural network in identifying the colour and model of the vehicle. Prototyping methodology and analysis approach is used in developing the model as it allows development of independent modules on large scale applications. iv Table of Contents Declaration ...................................................................................................................................... ii Abstract .......................................................................................................................................... iii List of Tables ................................................................................................................................ vii List of Figures .............................................................................................................................. viii List of Abbreviations ..................................................................................................................... ix Chapter 1: Introduction ................................................................................................................... 1 1.1 Background ...................................................................................................................... 1 1.2 Problem Statement ................................................................................................................ 3 1.3 Aim ........................................................................................................................................ 4 1.4 Specific Objectives ................................................................................................................ 4 1.5 Research Questions ............................................................................................................... 4 1.6 Justification ........................................................................................................................... 4 1.7 Scope and Limitation ............................................................................................................ 5 Chapter 2: Literature Review .......................................................................................................... 6 2.1 Introduction ........................................................................................................................... 6 2.2 Vehicle Identification ............................................................................................................ 6 2.3 Number Plate Identification Systems .................................................................................... 8 2.3.1 Security Marking Technologies...................................................................................... 8 2.3.2 Advanced Electronic Signature ...................................................................................... 9 2.3.3 2D Barcoding ................................................................................................................ 10 2.3.4 Radio Frequency Identification (RFID) ....................................................................... 11 2.3.5 Automatic Number plate recognition. .......................................................................... 13 2.4 Machine Learning to Identify the Number Plates ............................................................... 16 2.4.1 Image Acquisition and Pre-process .............................................................................. 16 2.4.2 Number Plate Detection and Extraction ....................................................................... 17 2.4.3 Character Extraction and Segmentation ....................................................................... 18 2.4.4 Vehicle Colour Recognition ......................................................................................... 18 2.5 Challenges Associated with Current Automatic Number Plate Recognition Systems ....... 20 2.6 Conceptual Model............................................................................................................ 21 Chapter 3: Research Methodology................................................................................................ 23 v 3.1 Introduction ......................................................................................................................... 23 3.2 Research Design .................................................................................................................. 23 3.3 System Development Methodology .................................................................................... 23 3.3.1 Prototyping Methodology ............................................................................................. 24 3.4 Data Collection Instruments ................................................................................................ 27 3.5 Database Development Tools.............................................................................................. 27 3.6 Programming Tools ............................................................................................................. 27 3.7 System Analysis .................................................................................................................. 28 3.8 Research Quality ................................................................................................................. 28 3.9 Ethical Considerations......................................................................................................... 29 Chapter 4: System Design and Architecture ................................................................................. 30 4.1 Introduction ......................................................................................................................... 30 4.2 Requirement Analysis ......................................................................................................... 30 4.2.1 Functional Requirements .............................................................................................. 30 4.2.2 Non-functional Requirements ....................................................................................... 30 4.3 System Design and Architecture ......................................................................................... 31 4.3.1 Data Input ..................................................................................................................... 32 4.3.2 Data Processing ............................................................................................................ 33 4.3.3 Classification Output .................................................................................................... 33 4.3.4 Process Design .............................................................................................................. 33 4.4 System Design ..................................................................................................................... 33 4.5 Data Flow Diagram ............................................................................................................. 33 4.6 Use-Case Diagram............................................................................................................... 35 4.6.1 Detailed description of Use-Case Diagram .................................................................. 36 4.7 System Sequence Diagram .................................................................................................. 39 Chapter 5: System Implementation and Testing ........................................................................... 41 5.1 Overview ............................................................................................................................. 41 5.2 Description of The Testing Environment ............................................................................ 41 5.2.1 Hardware Specifications ............................................................................................... 41 5.2.2 Software Specifications ................................................................................................ 42 5.3 Prototype Development Environment ................................................................................. 42 vi 5.4 Model Components ............................................................................................................. 43 5.4.1 Image Input Components .............................................................................................. 43 5.4.2 System Components ..................................................................................................... 47 5.5 System Testing .................................................................................................................... 48 5.5.1 Camera Application ...................................................................................................... 48 5.5.2 Storing Captured Information ....................................................................................... 51 5.5.2 Flagging out of Duplicate Number Plates .................................................................... 53 5.6 Performance Measure .......................................................................................................... 54 5.6.1 Functional Requirements .............................................................................................. 54 5.6.2 Usability Requirements ................................................................................................ 55 5.6.3 Reliability Requirements .............................................................................................. 56 5.6.4 Supportability Requirements ........................................................................................ 56 Chapter 6: Discussion, Conclusions and Recommendations ........................................................ 57 6.1 Introduction ......................................................................................................................... 57 6.2 Evaluation of The Systems Used in Vehicle Identification ................................................ 57 6.3 Analysis of Number Plate Identification ............................................................................. 57 6.4 Challenges Associated with The Use of Image Recognition .............................................. 57 6.5 Develop a System to Flag out Duplicate Number Plates Using Fixed Location Camera ... 58 6.6 Conclusions ......................................................................................................................... 58 6.7 Recommendations ............................................................................................................... 58 6.8 Suggestions for Future Works ............................................................................................. 59 References ..................................................................................................................................... 60 Appendices .................................................................................................................................... 67 Appendix A: Originality Report ................................................................................................ 67 vii List of Tables Table 2.1: Numbers plate detection Methods ............................................................................... 20 Table 4.1: Use Case Diagram. ...................................................................................................... 37 Table 4.2: Image Analysis ............................................................................................................ 37 Table 4.3: Vehicle Details Classification...................................................................................... 38 Table 5.1: Hardware Specification. .............................................................................................. 42 Table 5.2: Functional Requirements. ............................................................................................ 54 Table 5.3: Usability Requirements. .............................................................................................. 55 Table 5.4: Reliability Requirements. ............................................................................................ 56 Table 5.5: Supportability Requirements. ...................................................................................... 56 viii List of Figures Figure 1.1: Car Cloning Report (Wheatstone, 2019). ..................................................................... 5 Figure 2.1: Digital Signature Process Flow (Hoffman et al., 2013). ............................................ 10 Figure 2.2: 2D Barcoding (White & Gardiner, 2007). .................................................................. 11 Figure 2.3: Components of an RFID System (Jia et al., 2012). .................................................... 12 Figure 2.4:Reader and Tag Message Communication (Larionov et al., 2017). ............................ 13 Figure 2.5: Image Capture from a Camera (Dias et al., 2019)...................................................... 14 Figure 2.6: Binary Images (Kashyap et al., 2018). ....................................................................... 15 Figure 2.7: Steps for Numbers Plate Identification From an Image (Kurdi & Ahmad, 2017). .... 16 Figure 2.8: Conceptual Model. ..................................................................................................... 22 Figure 3.1:Prototyping Development Model (Madhav mohan, 2019). ........................................ 25 Figure 4.1: System Architecture. .................................................................................................. 32 Figure 4.2: Data Flow Diagram. ................................................................................................... 34 Figure 4.3: Level 0 Diagram. ........................................................................................................ 35 Figure 4.4: Use Case Diagram. ..................................................................................................... 36 Figure 4.5: Sequence Diagram. ..................................................................................................... 40 Figure 5.1: Camera Home page. ................................................................................................... 44 Figure 5.2: Upload Page. .............................................................................................................. 45 Figure 5.3: Capture Page............................................................................................................... 46 Figure 5.4: No Caption page. ........................................................................................................ 47 Figure 5.5: System Login Page. .................................................................................................... 48 Figure 5.6: Capture Page............................................................................................................... 49 Figure 5.7: Upload Page. .............................................................................................................. 50 Figure 5.8: Error Page. .................................................................................................................. 51 Figure 5.9: Home page. ................................................................................................................. 52 Figure 5.10: Data base. ................................................................................................................. 53 Figure 5.11: Duplicate Number Plates. ......................................................................................... 54 file:///C:/Users/kkibunja/Desktop/Thesis%202021/Final%20Document/A%20Duplicate%20Number%20Plate%20Detection%20System%20Using%20Fixed%20Location%20Cameras.docx%23_Toc71293564 ix List of Abbreviations ANN - Artificial Neural Networks ANPR - Automatic Number Plate Recognition CNN - Convolution Neural Network IDF - Import Declaration Form ITS - Intelligent Transport Systems NTSA - National Transport and Safety Authority PSV - Public Service Vehicles RFID - Radio Frequency Identification Technology SVM - Support vector machines x Acknowledgements First and foremost, I thank the Almighty God for seeing me through thick and thin in this life and for his grace. I have been particularly fortunate to have the superb guidance and academic mentorship of Dr. Vitalis Ozianyi even though he was handling several projects at the time, at no time did he falter in offering his wisdom, wit, and research expertise until the completion of this project. Thank you very much Sir I will remain indebted to you. My sincere gratitude to the members of School of Computing and Engineering sciences Dr Vincent Omwenga Dr Joseph Orero and Dr Bernard Shibwabo. To my adoring parents, Peter, and Anne Ekoropus, I extend my utmost appreciation and gratitude for giving me the gift of education and the life lessons that brought out the best in me. May the almighty God bless you and help you to live long enough to see the good work of your hands. To my siblings Ian, Brenda, Catherine Lavender, and Louis, I appreciate your love and assistance always. Special thanks to my friends; Tiberius, Kevin, Titus, Charles and Thuo for walking with me. Lastly, I would like to thank my best friend most sincerely, Nancy. xi Dedication This project is dedicated to my family members and friends for their understanding of the time taken during this study. 1 Chapter 1: Introduction 1.1 Background Vehicle registration is a lawful act done to give identity to vehicles. This identity can be used to trace the details of the vehicles when need be and can also be used to identify vehicles that are owned by an individual, the state or any other organisation. The vehicle is given a unique identity as part of the process of registering vehicles (Driver & Vehicle Licensing Agency, 2014). The process of vehicle registration has been changing over the years because of the details being captured and the methods used in capturing the details. There is an authority that is usually mandated to handle registration. In Kenya registration, licensing of motor vehicles and drivers is handled by the National Transport and Safety Authority (NTSA) (David, 2017). After registration of the vehicle one is issued with a number plate depending on the ownership of the vehicle: Government of Kenya, parastatals, diplomats, local authorities and civilians. The process of registration should be handled by the vehicle dealers before civilians take ownership of the vehicle. The traffic act CAP 403 states that no motor vehicle imported for home use shall be used on a road unless it is registered. Thus, ownership of a car does not licence any one to use the car until registration is done hence one cannot use the vehicle on the Kenyan roads. It is illegal to have unregistered vehicle on the Road. For anyone to register a vehicle, one requires to provide well documented duty and VAT receipts, import entry form, foreign registration book which must be in English, Ainuays bill, bill of lading, Import Declaration Form (IDF), duplicate valid insurance certificate, Vehicle Inspection Report for Commercial and Public Service Vehicles (PSV) photocopies of the owner’s national identity card or business registration certificate where applicable, PIN card and the completed application form (Form A) (Procedures for Motor Vehicle - KRA, n.d.). After the registrar has gone through the submitted documents and they have ascertained that the documents and information provided certifies their requirements the request is approved and the vehicle is given a number plate as per the class of the vehicle which is unique and different from the other number plates. The registration process is robust but people with malicious intent have found ways of duplicating number plates. Duplicate number plates are either stolen from other registered vehicles or obtained from people who can create a resemblance of what is being used. Criminals are cloning number 2 plates and fraudulently registering cars (Stella Cherono, 2019). These number plates are then patched on cars to make the vehicle look legal (Driver & Vehicle Licensing Agency, 2014). Duplication of number plates presents a major security threat, as criminals and terrorist tend to hide their identity during their criminal acts. Criminals and Terrorist understand that car number plates can be used to acquire information about the owner of the car and details about the car and hence the need to duplicate number plates. Duplicate number plates are either stolen from other registered cars, some are cloned and others fraudulently manufactured and registered. Up to the beginning of October 2018 there were already 22,487 recorded incidents of stolen number plates (Wheatstone, 2019). Vehicles with cloned number plate have become a common occurrence on the Kenyan roads, the vehicle is stolen, given an illegal number plate and some will go as far as cloning the vehicle with another vehicle that has more or less common features. This in turn will be used in covering up the identity of the vehicle in question and this will generate confusion with another existing car. In an article on shocking Kenyan cars with duplicate number plate published by the Youth Village Magazine, it described a victim who saw an exact car like his with the same number plates overtake him on Thika Road. Other cases reported by the daily nation on the terrorist attack on the 14th riverside attack revealed that the terrorist used a cloned vehicle. The Flying Squad had revealed that the number plate of the Toyota Ractis (KCN 340E) believed to have been used by the attackers was not a fake, but a duplicate of an existing one (Stella Cherono, 2019). To cab this issue of duplicate number plates automatic number plate technology in fixed location cameras is used. Automatic Number Plate Recognition (ANPR) within the UK is a powerful tool and its policing purpose is to deny criminals the use of our road (Rhead et al., 2012). Automatic number plate recognition technology makes use of the image recognition technology for extracting information out of an image and in this case, particularly the number plate of a vehicle. An algorithm will be used to get the details of the number plate from the image. Auto recognition of number plate method comprises of three segments: Character segmentation, Optical character recognition and template matching (Pechiammal & Renjith, 2018). Automatic Number plate recognition systems are used in parking systems to allow vehicles in and out of the parking zone also used in toll station by automatically detecting the number plate of the vehicle and therefore issuing a pay slip that will allow that particular vehicle to use that road 3 (Kashyap et al., 2018) In Kenya this system is being used in parking system and there is a thought of implementing the same in our toll stations along the major highways (Wang & Liu, 2016). According to the NTSA, the authority seeks to provide a seamless vehicle registration that integrates all the aspect of a vehicle without producing any duplications. Currently the transport sector relies heavily on paper-based/manual systems to provide services to citizens. There are different transport agencies and exchanging information amongst them is difficult with consequent losses and inefficiency. Similarly, it is difficult for transport sector institutions to integrate all existing applications while introducing new ones to meet the demand for providing better services to its citizens. This with other factors like corruption, theft of cars and manufacturing of illegal plates have led to the availability of duplicate number plates in our roads and some of these cars with duplicate number plates are used in illegal activities like theft and terrorism. With the availability of vehicles with duplicate number plates on the roads there is need to create a system that can be able to identify the duplicate number plate and flag them out while still on the move. The solution provided in this paper will entail using a system that can compare the details proceed from the image of a car that has been captured by different cameras in different location. The system will compare the second capture from the first capture putting into consideration the time one should take to move from the first point to the second point. If the time taken is smaller than the average time one should take, the details of the vehicle are flagged out. 1.2 Problem Statement When it comes to duplicate and cloned number plates used by vehicles, the method being used is a reactive method whereby someone reports to the police of having seen a vehicle with the same number plate or when police get hold of a vehicle in a crime scene only to realise that the vehicle had cloned number plates after conducting a search with the vehicle registry. This method has proven not to be effective as it is usually a reactive response to the issue at hand. People don’t have to wait for someone to conduct a search to prove that there is a duplicate of the same. The research will focus on moving from the reactive response where it entails identifying a duplicate number plate posterior to a situation by making use of the cameras on our roads to identify the duplicates when the vehicles are on the move. The research intends to tackle the problem by designing a system that can detect vehicles with duplicate number plates and flag them out by use of the fixed location cameras on our roads. 4 1.3 Aim The purpose of this study is to tackle the problem of illegal duplicate number plates by using the existing knowledge to come up with a duplicate number plate detection system using fixed location cameras. 1.4 Specific Objectives i. To evaluate the current systems used in vehicle identification. ii. To analyse number plate identification using fixed location cameras. iii. To investigate the challenges associated with the current systems using image recognition to identify number plates. iv. To develop a duplicate number plate identification system using fixed location cameras in different locations. v. To test and validate the functionality of the proposed system. 1.5 Research Questions i. What are the current systems used in vehicle identification? ii. How is number plate identification done using fixed location cameras? iii. What challenges are associated with the current number plate identification systems using image recognition? iv. How can a duplicate number plate identification system using fixed location cameras in different locations be developed? v. How will the functionality of the system be tested? 1.6 Justification ANPR is an internationally recognized tool that is used in vehicle identification. ANPR systems allow for real time recognition of a vehicle’s number plate thus saving the time spent in vehicle identification in certain instances (Simon et al., 2017). Vehicles involved in crime usually have a cloned number plate or a duplicate number plate. A system that flag’s out vehicles with duplicate number plate when they are on the move helps reduce crime and acts as a deterrent measure when it comes to terrorism. This system does save the time used in proving that a vehicle is duplicate. From Figure 1.1 it shows a graph of the cases reported on duplicate number plate in the year 2017/18 and 2018/19. You can easily tell that the cases being reported are on the rise and hence a need for a system that is able to identify duplicate number 5 plate system. This research will aim at coming up with a system that is able to flag out duplicate number plates. This research will assist mostly the people in the security sector as they will be able to know or have information of the vehicles with duplicate number plates. Figure 1.1: Car Cloning Report (Wheatstone, 2019). 1.7 Scope and Limitation This research focuses on a system that is used to detect duplicate number plates of vehicles. With the use of cameras, the system is able to extract the number plates give time and location the image was captured then compare with what is stored in the database to determine if there is a duplicate of the same number plate. The study focuses on use of image recognition to identify number plates and google locations to give distance and the average time one should take to move from the first camera to the second camera. 6 Chapter 2: Literature Review 2.1 Introduction This chapter reviews relevant literature to further enhance the understanding of the features used in vehicle identification and ways of identifying number plates. Discussion on what it entails to flag out a duplicate number plate, challenges faced by the current methods being used in vehicle and number plate identification and how it is done are detailed in this chapter. A conceptual framework is then presented at the end of the literature review to describe how the researcher intends to approach the issue of identifying duplicate number plate by use of fixed location cameras. 2.2 Vehicle Identification Vehicle detection and identification techniques have been widely applied to acquire vehicle information depending on various sensors (C. Zhang et al., 2017). Vehicles can be similar in shape, colour and model but each vehicle can be uniquely identified by its plate number in combination with specific features like the shape, colour and model of the vehicle. Works have already been done describing the various methodologies used in vehicle identification and extraction of vehicle information. Vehicle identification is a primary requirement for Intelligent Transport Systems (ITS), these days three common techniques are available (Al-bakry et al., 2017). The three methods mentioned by Al-bakry and Mushatet include use of automated number plate recognition system (ANRP), that allows users, to automatically monitor vehicles by use of cameras to extract their number plates. Second method entails use of the barcode system to identify the vehicle and the last method used in vehicle identification is the use of the radio frequency technology (RFID). The most common method of vehicle identification is the use of computer vision to identify vehicle number plate. Computer vision is the transformation of data from a still camera or video camera into a new decision or a new representation (Suryatali & Dharmadhikari, 2015). The use of computer vision to derive number plates from the images led to development of the automatic number plate recognition from vehicle images. This automatic number plate recognition system (ANRP) was originated in 1976 at the police scientific development branch in UK , it is a mass observation method that uses optical character recognition on image to read vehicles registration 7 plates (Al-Bakry et al., 2017). ANPR consist of a camera that is linked to a computer. When a vehicle passes by the camera, the camera records an image which is automatically ‘read’ by the computer and the vehicle registration mark (VRM) recorded (NPCC, 2016). A national police fact sheet published by the UK National Police Chiefs Council in April 2016 states that the use of this ANRP systems is used to support operational responses, information and intelligence and investigations. In operational responses the, vehicle captured by the ANRP camera registration number is identified and checked against the database records of vehicles of interest and if the vehicle is listed as a vehicle of interest the police are able to intercept and they can make an arrest if need be. The police services require intelligence on movement of vehicles on the road and through the ANRP camera systems they are able to monitor what is happening on the roads and gather specific details of the vehicle from the systems. The use of ANPR has been of important in the detection of many offences, including locating stolen vehicles, tackling uninsured vehicle use and solving cases of terrorism, major and organised crime (NPCC, 2016). With the use of fixed location cameras in different locations, ANRP will be used to identify vehicle number plate and record other details like the time of capture and the location of capture. In Bengali the ANRP has been implemented in such a way that it does not only give information on the vehicles but an algorithm is added to it in order to assist the system in traffic management in metropolitan and mega cities (Shahed et al., 2017). Apart from ANRP we have the Barcode technology which is the oldest but it is rarely used as vehicle identification (Al-Bakry et al., 2017). Barcode refers to a method of storing data using geometric figures and in this case the data being stored is the vehicle details. The quick response (QR) code which is majorly used in vehicles is a barcode that has two-dimensional barcode and was developed in Japan by Denso Wave Cooperation. The information related to that vehicle is embedded on the barcode and there are barcode scanners that are used to retrieve the information (Suryatali & Dharmadhikari, 2015). Vehicles just like any other objects that are usually stationary can be identified by use of barcodes and QR codes. A bar code reader is usually mounted along a street whereby its able to read the bar code and retrieve the information. 8 Another technology used to identify vehicles is the Radio-Frequency Identification (RFID). RFID is the investment of radio waves in reading and capturing information stored on a tag tied to an object (Al-Bakry et al., 2017). RFID is a technology that provides wireless identification of a vehicle and is more robust than a bar code (Balbin et al., 2018). In this method of vehicle identification two things are involved; RFID tag which usually is placed on the windshield of the vehicle and has the vehicle details. The other element is the RFID reader which is usually in a fixed position and should be able to communicate with the RFID tag in order to produce the vehicle details. 2.3 Number Plate Identification Systems Number plate identification is the process of pinpointing vehicles by their number plates. Each vehicle upon registration in a country, is issued with a unique identification number also known as the registration number. This registration number is made up of characters that are used in identification of the vehicle and through this you can tell who owns the car, model and year of manufacturing of the car. Systems used in vehicle identification will focus mostly on identifying the unique registration number. To avoid identification of the vehicles, number plates are usually cloned, and the cases of cloned number plates is on the rise. To aid in duplicate number plate identification we need to understand identification of this number plates There are various ways that can be used in number plate identification. The methods are also commonly used in securing number plates as well as explained by Hoffman (2013) on his article on securing number plate based on digital signatures and radio frequency identification (RFID). 2.3.1 Security Marking Technologies This is not a common technology, but it applies the same principle of security markings in bank notes used to avoid counterfeiting (Hoffman et al., 2013). According to the Computer Resource Security Centre, security markings refers to the means used to associate a set of security attributes with objects in a human-readable form. It includes use of holograms watermarks as well as security inks. Identification tags are coded with a given number, or for use on vehicles, asset identification number or a unique serial number (Data Dot Technology USA[DDTU], 2018.). The security marking technologies provides a unique security code for you. This unique code is usually registered to the owner of the marked vehicle number plate. Thus once the code on the number plate is detected it gives information on the ownership of the vehicle. 9 2.3.2 Advanced Electronic Signature This is advance of the security markings and it makes good use of cryptography for data security. Cryptography brings in the mathematical algorithms and digital sequence to transform data in such a way that for someone to access the data he/she must use the correct key. The nature of the mathematical algorithm is intentionally chosen to make it as difficult as possible to derive the cryptographic key from any number of encrypted samples (Hoffman et al., 2013). Cryptography, encryption techniques based on mathematical algorithms are used for the creation and verification of the digital signatures (Sreeja & Misbahuddin, 2018). Asymmetric encryption differs from symmetric encryption in the sense that a set of two keys is always used: one key (normally called the Private Key) is used for encryption, while another matching key (called the Public Key) is used for decryption of that data (or vice versa). Validation of the digital signature on the number plate will include comparison between the two, which one is a human readable content and the other is a digital signature, and by recording each digital signature while issuing a number plate will establish a reference of comparison, which can be used to detect illegal, or legally issued number plates. The disadvantage with this system is that a criminal will try to use a number plate that was legally registered. Another disadvantage with this system is that digital signatures in the form of private keys and public keys are used to validate files sent. If it is validated that there is a fake signature by a user, then the user cannot deny it (Setiawan & Rey Citra, 2018). Figure 2.1 shows the flow of a digital signature process. 10 Figure 2.1: Digital Signature Process Flow (Hoffman et al., 2013). From the diagram above the advanced digital signature is composed of mainly three elements whereby we have the first element being the description unit, whose main function is to generate the digital signature. After this the digital signature is generated and the third function entails packaging the data to be stored in a medium. The description unit is made up of the data attributes which is information about the data. After defining the data attributes, the data is encoded into a digital signature. The encoded medium or data is then attached into a number plate as shown in the above diagram. 2.3.3 2D Barcoding Barcoding, a system of labelling using spaces and bars printed side by side on an object, was the first widely used technology for the automated identification of digital codes (Hoffman et al., 2013). The digital codes are used to store the information and this information is retrieved via a bar code reader. The disadvantage with this is that the barcode can be copied, printed and used in a different number plate thus making it difficult to tell an illegal or legal number plate. 2D barcodes, where the pattern is made up of blocks or dots, can store up to several kilobits making it 11 possible to use them as carriers of digital signatures (Hoffman et al., 2013). The figure 2.2 shows an example of a 2d bar code image. Figure 2.2: 2D Barcoding (White & Gardiner, 2007). The code for the barcode is usually generated and then evaluated. The message is a randomly generated 662-bit sequence and it is encoded with a 1324-bit code word of a (3,6) LDPC code (L. Zhang et al., 2019). The coded message is then one that has the information or the vehicle details. 2.3.4 Radio Frequency Identification (RFID) Radio frequency identification is a form of a wireless communication that integrates electrostatic coupling principles in the radio frequency spectrum to identify an object, animal or a person. Radio Frequency identification (RFID) is a technology that provides wireless identification and tracking capability and is more robust than a bar code (Balbin et al., 2018). A sticker is put on the vehicles number plate metal or vehicle wind shield and an RFID reader should be able to read the sticker in order to get the information from the sticker. The information contained in the sticker is usually the person registered as the owner of the vehicle, model, colour, type and date of registration. This has an advantage over barcode, as the vehicle details can be obtained while the car is still in motion unlike in barcode reader the vehicle should be static and at a close range. A reader uses its own antenna to communicate with the tag. When a reader broadcasts radio waves, all tags designated to respond to that frequency and within range will respond (Suryatali & Dharmadhikari, 2015). The RFID scanner does not have to be in the same line of sight with the tag if it’s on the same wavelength. The passive RFID has a capability of reading and processing multiple tags at the same time. 12 RFID tags can only hold about 1 Kilobyte (8 Kilobit) non-volatile EEPROM storage and 4-byte unique identifier burned into the chip just enough to store an identification number. There are two main types of RFID: active (where the tag is battery operated) and passive (where the tag is powered by the reader) (Hoffman et al., 2013). The battery in the active RFID makes it expensive compared to the passive and this enables the passive RFID to be massively produced and used compared to the active one. Figure 2.3: Components of an RFID System (Jia et al., 2012). From Fig 2.3 we have the tags which are also referred to as the transponders and are always attached to the object in our case it’s the wind shield of the vehicle. Tags consist mainly of a coiled antenna and a microchip, with the main purpose of storing data (Jia et al., 2012). The second component is the reader which is a radio frequency unit that is to initiate communication with the tag and ensure that data is also retrieved from the tag. Figure 2.4 below demonstrates a communication between the reader and the tag. The diagrams describe how the packets move from the initiator of communication to the last point. 13 Figure 2.4:Reader and Tag Message Communication (Larionov et al., 2017). 2.3.5 Automatic Number plate recognition. ANRP uses sensors like cameras to capture the image, which is then manipulated to detect the region of interest, the image is then normalised, and optical character recognition technique is applied to retrieve the number plate. This is by far the most common used method in number plate recognition but in this case it’s not a complete system because the idea is to not only identify the number plates but to identify duplicate number plates and flag them out. The problem with this is that there is no means to prove that a number plate is legal or not. The Automatic Number Plate Recognition (ANPR) system for vehicle identification was invented in the year of 1976 at the 14 Police Scientific Development Branch in the United Kingdom (Babbar et al., 2018). However, there has been a steady growth for the last decade due to the improvement on the digital cameras. As stated by Mutua, S.M in his research paper on an Automatic Number Plate Recognition System for Car Park Management System an ANRP is composed of a camera, computer, software to detect the license and the database. The camera is the physical device mandated in image collection and the computer is where the license plate recognition software is housed. The database is used to store the number plate identified and any other data that might be collected by the camera. Bandar Sunway in his paper on Automatic Vehicle Number Plate Recognition Using Structured Elements he proposed an algorithm of automatic number plate recognition which entails the following steps: Taking picture from the vehicle, processing the image, character extraction from the number plate, character segmentation, character matching, identify the number plate, output. Once the image is captured, we start by converting the image into a grey scale image. Greyscale Images are those images which contain only a single value that is each pixel has only a single value, they carry only the information of intensity under them (Kashyap et al., 2018). Figure 2.5 below shows an image capture of a vehicle from a camera. Figure 2.5: Image Capture from a Camera (Dias et al., 2019). The image is then converted into a Binary image. A binary image is an image whose pixels have only two possible intensity values. They are usually displayed as black and white. Normally, the 15 two values are 0 for black, and 1 for white (Kurdi & Ahmad, 2017). Threshold is usually used in creating a binary image. A vertical edge detection algorithm is used to detect the edges of the number plate. The accuracy rate of this technique to identify edges is 92.5% (Saleem et al., 2016). The figure 2.6 below shows a sample of a Binary image after the threshold process. Figure 2.6: Binary Images (Kashyap et al., 2018). In the last two steps it entails separation of characters and only figures are left for identification or recognition. In this case Artificial Neural Network is applied in order to identify the figures. Artificial Neural Networks are vastly used intelligent calculating design for recognition of patterns (Kashyap et al., 2018). Figure 2.7 summarizes all the process involved in number plate identification from an image. 16 Figure 2.7: Steps for Numbers Plate Identification From an Image (Kurdi & Ahmad, 2017). 2.4 Machine Learning to Identify the Number Plates Here, we will look at the various ways and frameworks used in identifying number plates from images. Machine learning can be defined as a set of methods that can automatically detect patterns in data and then use the uncovered patterns to predict future data or perform decision making under uncertainty (Robert, 2014). Machine learning technology is usually used to identify objects in images, transcribe speech into text, select relevant results but in our case, we will focus mostly on object identification in images. Image recognition in the context of computer technology is the aspect of identifying objects, people places and texts on images by use of a software. 2.4.1 Image Acquisition and Pre-process High-end IR cameras, placed at strategic positions to avoid obstacles in order to obtain accurate images, perform image acquisition. Image acquired by camera always reflect the camera settings; among many include colour and hue, saturation and value or brightness, whereby essentially an image can be in its natural form or slightly altered. Colour images are complex in space and time. Pre-processing aims at image enhancement and restoration. This process eliminates noise, 17 highlight edges and improve the overall quality of an image. In image pre-processing, an image goes through among many procedures grey scaling, dilation, erosion, and filtering and edge enhancement. Converting natural colour images, to high saturation value colour space, to grey scale and then to binary is important as it reduces time and space complexities. The image acquired should be of good quality as this will determine or affect the recognition result. Sensors like cameras will be used to identify the presence of a vehicle and if a vehicle is detected an image of the vehicle is captured. The camera should be of high definition and after the images are captured, they are stored in a database. Image processing is a technique where by an image is converted into a digital form and various operations are performed on this image in order to get an enhanced image to extract information (Pervez, 2013). Below see the details of the various operations performed. (i) The image is imported by use of a scanner or digital photography (ii) Image manipulation is done to enhance the image quality as well as compress it. (iii)In this operation stage analysis is done on the enhanced image to retrieve the information. In this last stage where the analysis is done on the image Convolution Neural Network (CNN) is used. 2.4.2 Number Plate Detection and Extraction Automatic Number Plate Recognition (ANPR) is a kind of image processing technology for recognizing the vehicle number plate. This system also offers users to place mark out and monitor moving vehicles automatically by extracting their number plates (Islam et al., 2016). This type of technology was first introduced in 1979 in the United Kingdom. Automatic number plate recognition systems have various applications that include traffic monitoring, parking lots control and identification of plundered vehicles. Therefore, in order to have reliable number plate detection algorithms, in such dynamic environments, several choices must be considered. Several features that could be deployed to extract a rectangular shape of number plate from a car image included colour feature, aspect ratio, and texture edge density and shape/size but for better detection rate the combination of features could provide more reliable solution. Hue saturation value colour space and integral image properties could also be employed to locate the coordinates and position of yellow number plate and non-yellow number plates. From Yogheedha (2018) HSV enables one to find out the four 18 coordinates of a rectangular shape containing English like symbols or texture from which X and Y coordinates, Width and Height could be extracted. The process of number plate area detection and extraction involved three stages of finding area of interest, filtering out background and removals of false objects, and lastly computation of connected components, which provided best results of required region of interest. 2.4.3 Character Extraction and Segmentation Image segmentation is usually the first or initial stage of image processing(Saini & Arora, 2014). Segmentation entails locating object and boundaries in an image. This has been made possible through computer visions whereby models are able to detect objects, determine their shape, give prediction on the direction the objects will move in and many other things. In this case segmentation will be used to locate the position of the number plate and the characters labelled on the number plate. Basically, there are two image segmentation techniques: Edge based and region- based technique. Edge based is segmentation method based on discontinuity find for abrupt changes in the intensity value(Saini & Arora, 2014). Segmentation by region based relating the pixel and grouping them(Nikhil & Sankar, 1993) It is must to recognize the vehicle number accurately, which is mostly dependent on the character separation or isolation. So all the character from the image are separated without losing any element of a character (Islam et al., 2016). Before you introduce the character recognition algorithm the image noise needs to be reduced by a process called normalization. Normalization is to refine the characters into a block containing no extra white spaces (pixels) in all the four sides of the characters. Then each character is fit to equal size (Ozbay & Ercelebi, 2005) Some previous researchers who contributed to recognition and interpretations of characters proposed methods like Markov model, neural network approaches, statistical pattern recognition, chain code, template matching and many others. Each of these methods has advantages and disadvantages dependent on the working environments as well as the weather conditions. This was part of this research; the processor to recognize snapshot captured by camera and return a text representation of the detected image. 2.4.4 Vehicle Colour Recognition Among the many recognition features of a vehicle colour is the most discernible feature and easy to recognize to the human eye. The image acquired by the camera be it of the front or rear end of 19 the car can be used to identify the colour of a particular vehicle. The colour identification of vehicles plays a significant role tracking crime vehicles in imaging systems based on CCTV (Jeong et al., 2018). The colour of a vehicle is a very important clue as most witnesses in a crime scene will easily recognize the colour of a vehicle and not the number plate hence this is a very important feature that should be taken into consideration. Due to the mentioned reason, it is of importance if we can be able to identify the colour of the vehicle as well. Vehicle colour recognition is one of the effective ways of vehicle recognition. Some researchers have proposed a colour recognition system using support vector machines (SVM) and convolutional neural network (CNN) which is good in rich colours but this method does not include white and silver colour classification (Tilakaratna et al., 2017). The rationale behind the exclusion of the white and silver colour in the classification scheme is because the two have pixel values that are close to each other thus leaving no room for single colour space. The system will try to classify up to thirteen colours, which are white, grey, silver, black, sky blue, red, blue, brown, orange, pink, green, yellow and finally purple. After the image has been captured, the system will identify a region of interest just slightly above the number plates of the vehicle. To successfully implement the system and be able to classify thirteen colours the system implemented two main methods for colour recognition. (i) Histogram and back projection method – it’s a technique used in finding objects of interest in an image. This method was implemented without any machine learning method. The model for each colour was found after doing some research on colour values of vehicle images (Tilakaratna et al., 2017). Back projection is a way of recording how well the pixel of a given image fit the distribution of the pixel. The system will calculate the histogram model for region of interest and then uses it to find its feature in the image. (ii) Support vector machines (SVM) based method. A novel colour correction technique will be used to reduce the image changes that will affect the quality of the result so that the vehicles can be more accurately identified. Colour histogram feature is a one of good index to analyse the colour variation and the colour distribution in an image (Jeong et al., 2018). In Yoosoo Jeong research paper on homogeneity, patch search method for efficient 20 vehicle colour classification using front-of-vehicle image he proposes the use of search method of homogeneity patches to segment the reference region for colour classification. In computer vision, we have several models used for describing the specifications of the colours the models include The first phase in this method will entail identifying the region of interest to execute the homogeneity patches searching method and the Hue Saturation Value histogram feature is extracted for each value. After this, the multicast ad boost algorithm with colour features is applied. 2.5 Challenges Associated with Current Automatic Number Plate Recognition Systems Table 2.1 shows a summary of the challenges faced by the systems used in automatic number plate recognition. Table 2.1: Numbers Plate Detection Methods. Approach Merits Demerits Security Marking Technology (Balbin et al., 2018) Robustness: should be able to with stand normal signal processing such as image cropping. Anyone who has access to the technology can be ab le to create cloned number plates. Advanced Electronic Signature (Balbin et al., 2018) It is unforgeable. Criminals will try to use a number plate that was registered. Automatic number plate recognition system (Pechiammal & Renjith, 2018) Can be applied in different systems and can be used while the vehicle is still in motion. With this system, it is difficult to prove if the number plate is legal because it could have been fake registration. 21 2D Barcoding Balbin et al., 2018) Fault tolerance: it can still restore information even when slightly damaged. Difficult to use this system while the vehicle is still in motion. Radio Frequency Identification (Larionov et al., 2017) Can be used while the vehicle is in motion They are less reliable compared to the other systems 2.6 Conceptual Model From this literature, the researcher has conceptualized the use of an expert system to aid in flagging out of duplicate number plates while the vehicles are on the move. The researcher work with creating a system that can receive captured images by the fixed location cameras. This system will have a central database to record the vehicle number plate color and the time the vehicle was captured by the camera. The researcher will use automatic number plate recognition system and histogram back projection system to identify the number plate and color of the vehicle. Time is the key facture because it will be used to determine if the vehicle captured for the second time is a duplicate. For a vehicle that has been captured by camera A to move to Camera B considering that it is moving with 110km/h it should take X time. If the time taken to move from camera A to camera B is less than X then we consider this to be a case to be flagged out. 22 Figure 2.8: Conceptual Model. 23 Chapter 3: Research Methodology 3.1 Introduction Research is all about innovation and ingenuity. The initial step being to decide the core problem that must be solved. After which comes the part where a meticulous approach has to be applied with due diligence to come build an approach roadmap that leads to the solution of the aforementioned problem or challenge (Soni & Bhadauria, 2019). The problem at hand is how to identify duplicate number plates by use of fixed location cameras. This chapter is all about research methodology which will entail clearly defining road map that the researcher has followed to provide an amicable solution to the identification of duplicate number plates by use of fixed location cameras. The researcher clearly defines the road map that is being used to come up with a system that identifies duplicate number plates and flags them out. Finally, this chapter does give details on any concerns or issues that may arise due to the ethical quality of the work. 3.2 Research Design A research design is a plan according to which one obtains research participants and collects information from them (Mugenda & Mugenda, 2003). The research design refers to the overall strategy taken to integrate the different components of the study in a coherent and logical way, thereby, ensuring that the issue of identifying duplicate number plates while vehicles are on the move is effectively addressed. This constitutes creating a system that is able to compare inputs from the available fixed location cameras with respect to time distance and speed in order to be able to flag out duplicate number plates. The research design adopted in this project is an action-based research that aims to come up with a solution to the challenges faced by the current vehicle recognition systems. 3.3 System Development Methodology The approach that has been used is the prototyping approach, which involves building an early prototype and then testing, and reworking on it until an acceptable product is achieved. The prototyping approach that is being used is the Extreme prototyping approach. The system development methodologies have evolved over time, each with its own advantages and 24 disadvantages. One of the widely cited advantages of using methodologies to systems development industry is that it makes the development process more genial to project management, monitoring and control (Ally & Ning, 2015). 3.3.1 Prototyping Methodology Prototyping is a methodology that evolved out of the need to better define specifications and it entails building a demo version of the software product that includes the critical functionality (D. S. Journal, 2014). This methodology will assist in coming up with a system that is a prototype and then expose the system to users for comments so at to rework it and ensure an acceptable system is developed. Figure 3.1 shows the different development stages that has been incorporated in the study for the development of the system. This prototyping model is often considered as the extension of waterfall. 25 Figure 3.1:Prototyping Development Model (Madhav mohan, 2019). (i) Prototype development Prototyping is a methodology that evolved out of the need to better define specifications and it entails building a demo version of the software product that includes the critical functionality. This phase involves gathering the requirements for the system. Studying already existing similar systems in order to formulate an overview of what functionalities the system should have. Based on the gathered requirements a design is made to exhibit the functionalities of the system. This design will be used to educate anyone who is interacting with the fixed location cameras or the parties involved in identification of duplicate number plate which happens to be the security 26 personnel. If the client is not pleased with the system, the additional requirements are put into consideration and another prototype is built. Once the client approves of the prototype it is then discarded and the experience gained in building the prototype is used in the next phase. (ii) Design Stage This will assist in specifying the hardware required and provide an overview of the system being developed. This helped in designing a system that is compatible with any fixed location cameras used for the transport management system. At this stage the design is documented as it will guide the researcher in development of the system to flag out duplicate number plates. (iii) Coding After all the analysis and design, the actual coding of the system begins and implemented into the initial iteration of the project. Here we will see the design of the system being developed into an actual system. If there is need be this methodology allows the researcher to go back and review with the clients. (iv) Testing Upon completing the implementation process, the system is to be tested to identify any issues or potential bugs. The functionalities of the proposed system will be tested to the full. The efficiency and accuracy of the system to identify duplicate number plate is put to the test here. The researcher checks if the system can meet the recommendations that are required. After the system is tested it is again given back to the clients for evaluation. (v) Maintenance There are some concerns which come up in the client atmosphere. To repair those issues patches are released. Also, to enhance the artefact some better versions are released (I. Journal & Engineering, 2015). This is usually done to bring the changes to the client and help on improving the model. In case the system will require an improvement then this can be an add on during the maintenance process. 27 3.4 Data Collection Instruments During the research secondary data sources were used. The experimentations allowed the researcher to find the best datasets which had different sets of number plates on different sizes as well different car models. The data that will be used will be obtained from publicly available Kaggle database. Availability of the secondary sources most of which have been discussed in chapter two enabled the researcher to compare different algorithms and different application programming interface used in extracting the car model, number plate and the colour of the vehicle Additionally, these sources also assisted the developer realize the best open-source software to use to develop the system’s prototype. The proposed model used base training data as a base comparison to the input data. From the input data the system was able to draw conclusion. In the performance and data analysis fifty car images were used to test the system and the results were successful as the system was able to identify and hence achieving an accuracy of 99% and above. 3.5 Database Development Tools The reason for using MySQL is that it is an open-source database that is easily connected to other software’s and is also able to provide optimum efficiency even when working with some of the most demanding applications. MySQL has a way of automating everything from the expansion and configuration of data design and database administration. Its security and high-performance nature make it more viable for even large project that require privatization of data and hence making it the best for the storage of the images captured and also storing data retrieved from the images. 3.6 Programming Tools The reason for using python programming language is that it is very simple and fast to implement. In addition, many community-based resources support python, especially for data analysis, which is a core part of this research. 28 The system will three major modules which will include the front end, the back end and the API used to retrieve the make model and number plate of vehicles. The languages used in the implementation of the different system modules are as stated below. (i) Backend This is the module that ensures that the client end is working by storing and organizing data, It ensures that the front end works by sharing or sending and receiving information to be stored on the front end. The language to be used here will be Laravel PHP framework. The beauty about Laravel is that it’s a lightweight and can be used seamlessly with databases enabling the query of database using the PHP syntax. (ii) Frontend This is basically what the user or client interacts with, it’s usually accessible from the browser. It includes everything the user interacts with or experience’s, including the colors texts, images and navigation buttons or menus. This module will be created using the Android Java Min SDK Lollipop (API 22). This is because the researcher will require to use the phone camera in place of the actual road cameras. 3.7 System Analysis As part of the system analysis, this research will seek to do the following: Determine who are the users of the system. The goal here is to make sure that the system developed will be of as the requirements of the users. If wrong users are identified, there is a possibility of developing the wrong solution. The users for the system developed in this research will be the security personnel. 3.8 Research Quality The research data must have both validity and reliability. Validity is the extent to which the data accurately measures what they were intended to measure, whereas reliability is the extent to which the data collection method will yield the same findings if replicated by others. The research quality will be determined by the validity of the tools being used and by checking if all the research questions have been answered. The researcher will ensure that all work used in this research will be well cited and any work used in the literature review will be from reputable sources 29 3.9 Ethical Considerations Ethics are standards or codes of conduct that help distinguish between what is acceptable and what is not (Ethical Considerations: CIRT, 2018). The ethical consideration in this research will be determining the truthfulness of the data obtained from the secondary sources which is an open- source public database called Kaggle. All previous works were cited appropriately, and due acknowledgement given to the respective authors. 30 Chapter 4: System Design and Architecture 4.1 Introduction In this section the researcher gives a layout of the design architecture of the developed automatic number plate recognition system. The architecture will be based on the conceptual model diagram outlined in chapter 2. The design architecture plays a critical role in the development process as it provides a well laid out structure on how to come up with system. The researcher intends to use class diagrams, use case diagrams, data flow diagrams and data flow diagrams to show the interaction of the user, developed system and the components of the developed system. 4.2 Requirement Analysis Requirement analysis will assist in determining the feature expectations as well as the functional specifications by breaking it down into smaller steps. In order to develop the system, the researcher categorized the requirements gathered into two categories: the functional requirement and non- functional requirement. 4.2.1 Functional Requirements Functional requirements describe the specific activities to be performed by the system. The functional requirements for the system as identified by the researcher include. i. The System should be able to accept a series of images from the Cameras. ii. The system should be able to tell the time and location of the image captured by the camera. iii. The System should be able to extract the relevant information from the images which is vehicle number plate, color, and model. iv. The system should be able to record the extracted information from the image. v. The system should be able to compare any new entry with what has been recorded before. vi. The system should be able to give an output after comparison. vii. The system should send a notification if there is a duplicate number plate that has been recorded. 4.2.2 Non-functional Requirements Non-functional requirements are used to set the quality attributes of a software; these attributes will be used to determine the quality of the software. 31 4.2.2.1 Supportability Requirements The System should be able to fit in a wide range of cameras used on the roads and can be easily used to provide the desired output. This will provide flexibility in terms of the different cameras being used the system will function as it should. 4.2.2.2 Reliability Requirements The system should firmly provide the same results with the same input data. The system should be able to give the details of the captured image with precise accuracy to avoid false recording of information in the system. In case of a failure the administrator should be able to restore the system to its functionality. 4.2.2.3 Security Requirements Software security is to engineer a software in such a way that the required application functions uninterrupted and can handle nicely the security threats during a malicious attack (Daud, 2010). The system needs to have strong security measures to ensure that integrity and privacy of information is protected. 4.2.2.4 Scalability Requirements If there is an increase in the number of images being captured and information stored the system should be able to handle the extra load without failure. The system should be able to capture more images and be able to give a complete comparison and give feedback. The system also deletes images stored for more than six hours in the system. 4.3 System Design and Architecture The system will be using Images captured by the cameras as the only input data. The image captured is then passed on to the system where image processing is done, number plate detection as well as the character recognition in order to give the identified number plate, colour and model as the output. The system is also designed to give the time, the image is captured as well as the location of the camera by use of latitude and longitudes of the camera location. Before storage of the data in the database a comparison is done to establish if there is such information and if so a comparison on the distance if there is the time in order to flag out cases where we have inconsistency in terms of time and distance. This well detailed in the Figure 4.1: 32 Figure 4.1: System Architecture. 4.3.1 Data Input In the proposed system, the Image input is done at this level after the image of a vehicle has been captured by a camera in a specific location. The Image location and time of capture are the details to be captured or recorded in the database. The camera should be able to deliver an image that can be analysed even in different weather conditions especially when it’s raining and the visibility is affected. 33 4.3.2 Data Processing The stored images are then sent to an application programming interface that is connected to the system to do the image analysis. From this, the output is the number plate, model, and colour of the vehicle. This is then compared to what is in the database and there is no match of the number plate the system stores the data in the database. If there is a match, a time and location comparison is done to establish if it’s a duplicate. If the time taken by the vehicle to move from camera A to camera B is within the threshold, then it’s not considered as a duplicate. If the time taken for the vehicle is less than the given threshold, then it is flagged out as a duplicate. 4.3.3 Classification Output This is the final stage of the proposed duplicate number plate identification system. The output of this is only generated when we have a duplicate that has been identified and it’s displayed on the system as a duplicate number plate. This will be important information especially to the security personnel as they can start tracking the vehicle since they have the details. 4.3.4 Process Design This section outlays the set of input resources which have been used to transform the input into the meaningful output information. The system has used different languages to make sure that the system processes and gives the relevant output and reflects the actual thing. A detailed information of this section has been discussed in chapter five under software development environment. 4.4 System Design The collection of the different objectives as from the analysis of the literature and other similar systems were merged with the ideas that the developer had in mind to synergize an application design with desirable functionalities to fulfil its objectives. The following design diagrams has been used to give an insight into the actual implementation of the system. This includes the different system’s modules. 4.5 Data Flow Diagram Data Flow Diagram (DFD) provides a visual representation of the flow of information that is data within a system. In the proposed system, this diagram has been used to show the information provided by and delivered to someone who takes part in the system process, the information needed to be stored and accessed. 34 Context Diagram Context diagram gives only the top-level characteristics of the system data flow. It demonstrates only one visible process node that represents the functions of a complete system in regard to how it interacts with external entities. It therefore briefly shows the boundaries of the proposed system thus viewing the system as a black box. Figure 4.2: Data Flow Diagram. Level 0 Diagram The different entities initially in the system as a black box have been broken down into various processes which interact with the external entities. The data stores represent the storages done in the system during processing. Some of the data stores are temporary as they involve temporary storage of information before processing or display. 35 Figure 4.3: Level 0 Diagram. 4.6 Use-Case Diagram A use case is a list of actions and event steps that define the interactions between an actor and a system to achieve a goal. In the proposed model, different cases have been simulated diagrammatically as shown in the figure 4.4. The entities involved included the independent system classes such as the classier of the number plates function that is in the system but interacts with the system components. Some of the assumptions that has been made in the use case diagram includes. i. The display and the client machine will do the actions independently even though in the system, the machine responsible for both actions is one. 36 ii. The camera auto controls itself to capture the image and sends the image to the database then resets to capture another image. Figure 4.4: Use Case Diagram. 4.6.1 Detailed description of Use-Case Diagram This section provides a comprehensive description of the use cases as shown by the Table 4.1 below. 37 Table 4.1: Use Case Diagram. Use Case Data Pre-processing Primary Actors Fixed Location Camera Pre-condition Camera is on and connected to the system Post-condition Vehicle image capture Main Success Scenarios Actor Actor Intention System Responsibility Capture of the vehicle image System saves location of the image capture System saves time of the image capture Table 4.2: Image Analysis. Use Case Data Pre-processing Primary Actors Image Recognition API Pre-condition User has Internet on Platform being used Should be able to access the image from the camera 38 Post-condition System can display the vehicle number plate, model and colour. Main Success Scenarios Actor Actor Intention System Responsibility Perform image recognition Image is retrieved to identify the number plate, model and colour of the vehicle. Sends the details retrieved to the system Table 4.3: Vehicle Details Classification. Use Case Data Pre-processing Primary Actors System Pre-condition Receives data and stores it properly. Post-condition Display duplicate number plate, model and colour of the vehicle Main Success Scenarios Actor 39 Actor Intention System Responsibility Verify if data exists System checks if what has been captured has been captured before. System stores the data if it has not been captured before Compares the details of the capture if the same details are available Classifies the data as duplicate or not 4.7 System Sequence Diagram The figure 4.5 shows the system sequence diagram. It shows the sequence of interactions between the user and the proposed system as well as interactions between the various internal components of the system. This focuses on how the system’s processes interact to make sure that the data processing is achieved, and a desirable output is reached. The camera captures the image then passes the image to the image recognition API which in turn gives out the vehicle number plate model and colour. This is then sent to the system where it compares the new data to what is stored. If this is the first time capture the system stores the data if it’s not a comparison is done on the time and location. With this comparison the system can classify the number plate as a duplicate or not. If it is a duplicate, then the system displays it as a duplicate as the output. 40 Figure 4.5: Sequence Diagram. 41 Chapter 5: System Implementation and Testing 5.1 Overview This chapter depicts the implementation, testing and validation of the actual prototype as proposed. The functionalities incorporated in the system includes the systems requirements as from the conceptual framework in the literature review chapter. To appreciate the feel of the system implementation, this section also includes screenshots of the various application which is mainly in the client side of the distributed system. The duplicate number plate detection system was built by improvising the cameras aspect and developing an android application that would make good use of the mobile phone camera to capture the images of vehicles. The system was built as described in chapter three and four. Testing included functional and usability tests to check if the developed system accomplished the objectives set out at the beginning of the research project 5.2 Description of The Testing Environment The system environment is made up of both the software and the hardware. This section provides details on the hardware and software used and how they aid in the system performance. Describing the system environment will also assist in ensuring that the components are key variables in the system characteristics such as being scalable. Tests also performed on the model will be described below. 5.2.1 Hardware Specifications The system runs on a test computer with a RAM (Random Access Memory) of 8 GB, this enhances the systems performance by enabling the API to be able to efficiently retrieve the number plate model and color of the vehicle with minimum time and also assisting in classification of the results as a duplicate or not. For better performance, the RAM can be enhanced making the system a lightweight on the hardware. The hard disk space used in the test environment is a minimum of 20 GB, this makes sure that there is enough storage for the images being captured which might grow in size to while trying to get more data to compare against as well as the number of vehicle’s using that road considering that the system will automatically delete images that have been stored for more than six hours. 42 A high processing speed of 2.7GHz and above is recommended and this has been made to run on a corei5 hardware 8th generation, this make it easier for the processors to handle different threads or processes that results during processing. For image capturing, the system uses a separate camera where by the researcher has improvised and created an application that can make good use of the camera. The phone camera represents the actual camera which captures the image of the vehicle sends them to the server for processing. For better performance, better fixed location cameras with higher pixels that captures clear images even with minimal clarity which could be caused by weather or the car being dirty. This will facilitate clear and accurate classification hence accurate results. Table 5.1: Hardware Specification. Hardware Minimum Requirements Processor Core i5 Cycle speed 2.7GHz Hard Disk Space 20GB 5.2.2 Software Specifications The proposed system runs on a windows operating system, there is no specific reason as to why this is preferred. Firebase real-time database has been used to maintain the client server architecture communication as it relays the processed data in real-time. Firebase enables clients to share real-time instances and automatically receive updates with the latest data. 5.3 Prototype Development Environment The proposed system has a number of applications being used in order to supplement its productivity. The applications are built in different environments as stated below; (i) Android Studio - Android studio is an integrated development environment for android development applications. Android studio offers more features and it enhances productivity during development of an application. (ii) gRPC for the distributed system - gRPC is a modern, open source remote procedure call (RPC) framework that can run anywhere. It enables client and server applications to 43 communicate transparently, and makes it easier to build connected systems. It has been used in last mile of computing in mobile and web client since it can generate libraries for iOS and Android and uses standards based HTTP/2 as transport allowing it to easily traverse proxies and firewalls, this makes the productivity of the proposed system more accurate. 5.4 Model Components This part describes the proposed systems components and where necessary screenshots are used to elaborate more on how the different components and modules of the system work, how they affect the systems performance and output. 5.4.1 Image Input Components The proposed system requires a camera or a motion sensor to identify and capture vehicle images that are using a particular route. The camera should be able to send the image, time and location to a temporary storage before the image is sent to the API for processing. With that in mind the researcher developed an android application that was able to make good use of the phone application to capture images which is also able to send the location and time of the capture to the database. The use of this application also makes it easy for anyone with the knowledge of using a basic phone to be able to take pictures of vehicles. The camera will be accessed once you have installed the application in your phone and this will enable you to take an image of a vehicle. The image time and location is sent to the database as described above. The resulting android application developed was put in a test mobile device to test it. The application interface screen shot taken from the mobile test device is shown by the figures 5.1. The figure below shows the interface once you open the application. 44 Figure 5.1: Camera Home page. After clicking on the green button, the application will allow you to access the camera and once you have taken the picture it requests you to upload the image automatically. Figure 5.2 shows the image being uploaded. 45 Figure 5.2: Upload Page. Once the image has been uploaded successfully the application system give feedback as shown by the figure 5.3. 46 Figure 5.3: Capture Page. Figure 5.4 also shows what happens when the image captured is not a vehicle. The Camera will capture it because it’s a moving object but the image is rejected by the API hence no activity recorded. 47 Figure 5.4: No Caption page. 5.4.2 System Components The system module that has been used in the proposed model is made up of the main modules that provides an interaction interface for the security personnel and also shows the results the data of the captured image which includes model, color and vehicle number plate. The security personnel need to log in as shown by the figure 5.5. The main module is the client server which provides an interface for interaction to the environment for demonstration purposes. This module shows results from the API and will help in aiding the security personnel know if there is a duplicate or not and the personnel can decide on which action is to be taken. Figure 5.5 shows the login interface by the administrator or the security personnel. 48 Figure 5.5: System Login Page. 5.5 System Testing The system was tested to check how the developed system performed in comparison to having the security personnel figuring out everything by themselves. The test was performed on the three modules, the mobile application that is supposed to act a camera, the system that is supposed to give the results as well as the API that is supposed to retrieve information from an image is described below. 5.5.1 Camera Application The camera application was tested on the android studio and later on an actual mobile device by taking images and testing if they are sent to the system. The researcher also took a picture of images that did not have number plates and the figures below shows the results of the different scenarios expected when using the camera application. The images that had number plates were correctly labelled and images that did not have number plates were also correctly labelled. 49 Figure 5.6: Capture Page 50 Figure 5.7: Upload Page. 51 Figure 5.8: Error Page. 5.5.2 Storing Captured Information Once the number plate is identified from the captured image the information is then stored in the database. The system also helps to retrieve time and location the image was taken. The Location is identified by the IP address of the camera that was used to take the image and hence identifying the location of the Image. The figure below shows the backend with a sample images of cars taken as well as the database. 52 Figure 5.9: Home page. Figure 5.10 show the details of the database. It shows the table structure and the relation view of the database. 53 Figure 5.10: Data base. 5.5.2 Flagging out of Duplicate Number Plates The administrator or the security personnel is able to view the flagged-out vehicle image with the time and location of the two instances the view was captured. The user of the system must be logged in order to be able to view the flagged-out vehicle. The figure below shows a sample of a vehicle captured within the threshold time and hence it was flagged out as a duplicate vehicle. 54 Figure 5.11: Duplicate Number Plates. 5.6 Performance Measure In model generation and building, one of the process over looked is the system validation. System validation is the process of checking the accuracy of something or in this case, the system. The researcher used functional requirements, usability requirements and supportability requirements to look at the validity of the system developed. 5.6.1 Functional Requirements Table 5.2 shows the functional requirements for the system obtained from the validations done on the system. The elements assessed were based on the images captured. Table 5.2: Functional Requirements. Requirements Priority Results 55 Allow capture of vehicle images High The system was able to capture images by using the phone camera application which was an improvisation instead of using the actual cameras. System should be able to receive images captured, when and where. High The system was able to receive the images captured by the camera, the time and location the vehicle was captured. System should be able to retrieve the number plate, model and colour of the vehicle captured High The system was able to retrieve the details of the vehicle from the image captured System should be able to flag out vehicles with duplicate number plates High The system was able to flag out vehicles with duplicate number plates captured within the time threshold. 5.6.2 Usability Requirements Table 5.3 shows the usability requirements for the system. The simplicity of use and the speed of use of the system Table 5.3: Usability Requirements. Requirements Priority Results Simplicity of use High The researcher designed the system to have few interfaces to ensure optimization of the system. Speed of the system Medium The speed of the system varied depending on availability of internet 56 5.6.3 Reliability Requirements Table 5.4 shows in this case the researcher wants to ascertain that the system is able to interface with other systems. Table 5.4: Reliability Requirements. Requirements Priority Results Ability of the system to interact with the database. High The system is able to interface properly with the system database via the system API. 5.6.4 Supportability Requirements This is the ability of the system to be able run across different desktop platforms as well as accessing the system from different web browsers as shown by the Table 5.5. Table 5.5: Supportability Requirements. Requirements Priority Results Accessibility of the system from all the browsers Medium The system was accessible across major browsers; Google Chrome, Mozilla Firefox and Internet explorer. Accessibility across Major desktop platforms Medium The system can be deployed on Windows and Linux systems. 57 Chapter 6: Discussion, Conclusions and Recommendations 6.1 Introduction This chapter discusses the results of the research in light of the objectives set out at the beginning. The researcher’s intention was to develop a system that is able to flag out duplicate number plate using fixed location cameras. The study was built on five objectives the core objective being to develop a duplicate number plate identification system using fixed location cameras in different locations. The researcher explains the findings from the study and goes ahead to discuss them as well as explaining the importance of the study. 6.2 Evaluation of The Systems Used in Vehicle Identification The first objective was to evaluate the systems used in vehicle identification. In the literature review carried out by the researcher it was realized that there are three different systems used in vehicle identification the most common of them all being the use of computer vision. It is preferred because it is a mass observation method that makes good use of image recognition to be able to identify a vehicle in an image. From the findings the use of image recognition in vehicle identification was preferred from the others to be used in vehicle identification of the research as it enables use of different fe