13.07.2015 Views

real-time image capturing system for car plate recognition

real-time image capturing system for car plate recognition

real-time image capturing system for car plate recognition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

REAL-TIME IMAGE CAPTURING SYSTEM FOR CAR PLATE RECOGNITIONLEE CEN YANGA project report submitted in partial fulfilment of therequirements <strong>for</strong> the award of the degree ofBachelor of Engineering (Electrical-Electronics)Faculty of Electrical EngineeringUniversitiTeknologi MalaysiaJUNE 2012


iiI declare that this thesis entitled “Real-<strong>time</strong> Image Capturing System <strong>for</strong> Car PlateRecogintion” is the result of my own research except as cited in the references. Thethesis has not been accepted <strong>for</strong> any degree and is not concurrently submitted incandidature of any other degree.Signature : ..............................................................Name : LEE CEN YANGDate : ..............................................................


iiiSpecially to my beloved grandfather and grandmother,Lee Swee Tow and Low Hee,father and mother,Lee Kim Tee and Gan Lam Pen,brothers, sisters and all my friends<strong>for</strong> their endless and unconditional supportthroughout my adventure of educations


ivACKNOWLEDGEMENTIn the way to accomplish my final year project, there are many people, whohave been responsible <strong>for</strong> coaching me, encouraging me and advising me when Ifaced the challenges and encountered problems in this project. For that, I am deeplygrateful and would like to take this opportunity to express my heartfelt gratitude tomy project supervisor, ASSOC. PROF. DR. SYED ABDUL RAHMAN BIN SYEDABU BAKAR, who had gave me a lot of support and guidance throughout the entireproject. It would be very difficult <strong>for</strong> me to complete the project and also thesiswriting without his helping hand especially in providing the references andresources.My outmost thank to my family <strong>for</strong> giving me support along the journey tocomplete my academy study in Universiti Teknologi Malaysia. Besides that, I alsonot <strong>for</strong>get about eternally moral support from my beloved grandparents, parents andall the valuable advices from my siblings which make me always energetic to givethe best per<strong>for</strong>mance in my academic study.Other than that, I would like to thank to course mates, all the seniors, UTMsecurity guards and staffs in the lab of Computer Vision, Video and ImageProcessing (CvviP) <strong>for</strong> their endless support when I enquire helps from them.Nevertheless, my appreciation is also dedicated to Faculty of ElectricalEngineering, UTM <strong>for</strong> providing excellent services and instruments throughout theproject. Lastly, I also would like to express my gratitude to individuals who wereinvolved directly or indirectly with this project.


vABSTRACTCar Plate Recognition System (CPRS) is a <strong>system</strong> that identifies the license<strong>plate</strong> so that the <strong>car</strong> can be tracked down through some existing database. Real-<strong>time</strong>Image Capturing System is a very important part of Car Plate Recognition Systembecause <strong>image</strong> captured from <strong>real</strong>-<strong>time</strong> video will be used as input <strong>for</strong> CPRS process.However, the <strong>image</strong> quality of moving vehicles within video streaming turns out tobe poor because of compression be<strong>for</strong>e displaying it through a web browser. Theefficiency of <strong>real</strong>-<strong>time</strong> CPRS decreases when poor quality <strong>image</strong> is captured from thevideo. There<strong>for</strong>e, this project is aimed at developing an application that can integratethe camera and the Intel Atom-based board so that a high and smooth quality of <strong>real</strong><strong>time</strong>streaming video can be displayed through the developed application. License<strong>plate</strong> <strong>image</strong> will be captured and saved from <strong>real</strong>-<strong>time</strong> video streaming mode andoffline video mode based on the capture rate inserted by the user. The per<strong>for</strong>manceanalysis has shown that the efficiency of <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> <strong>system</strong> to obtaina clear license <strong>plate</strong> <strong>image</strong> are 75.86% <strong>for</strong> <strong>real</strong>-<strong>time</strong> video streaming mode and97.50% <strong>for</strong> offline video mode.


viABSTRAKSistem Pengecaman Plat Kereta (SPPK) merupakan sistem yang digunakanuntuk mengenal pasti plat kereta supaya kereta dapat dijejaki melalui pangkai datayang sedia ada. Sistem penangkapan gambar masa nyata merupakan salah satubahagian yang sangat penting dalam Sistem Pengecaman Plat Kereta kerana gambaryang ditangkap dalam video masa nyata akan digunakan sebagai sumber dalamproses SPPK. Walau bagaimanapun, kualiti video dari segi pengerakkan kenderaanyang diperolehi dalam video masa nyata telah menjadi rendah. Hal ini kerana videopengaliran kereta akan dimampatkan sebelum ia dipaparkan melalui pelayar web.Kecekapan bagi Masa Nyata SPPK menurun apabila kualiti gambar yang rendahtelah ditangkap daripada video tersebut. Oleh itu, projek ini dijalankan bertujuanmembina satu aplikasi yang boleh mengintegrasikan kamera dan papan litar utamadasaran Intel Atom supaya video nyata masa yang dipaparkan melalui aplikasitersebut adalah berkualiti tinggi dan lebih lan<strong>car</strong>. Plat kereta akan ditangkap dandisimpankan dalam mod video masa nyata dan mod video luar talian. Plat keretaditangkap daripada video berdasarkan kadar penangkapan yang dimasukkan olehpengguna. Analisis prestasi telah menunjukkan bahawa kecekapan SistemPenangkapan Plat Kereta Masa Nyata untuk mendapatkan gambar plat kereta yangjelas adalah 75.86% bagi mod video masa nyata dan 97.50% bagi mod video luartalian.


viiTABLE OF CONTENTSCHAPTER TITLE PAGEDECLARATIONDEDICATIONACKNOWLEDGEMENTSABSTRACTABSTRAKTABLE OF CONTENTSLIST OF TABLESLIST OF FIGURESLIST OF APPENDICESiiiiiivvviviixxixiii̶̶̶̶̶1 INTRODUCTION 11.1 Problem Statement 21.2 Objective 31.3 Scope 31.4 Project Outline 41.4.1 Chapter 1 Introduction 41.4.2 Chapter 2 Literature Review 41.4.3 Chapter 3 Methodology 41.4.4 Chapter 4 Result and Discussion 51.4.5 Chapter 5 Conclusion andRecommendation 52 LITERATURE REVIEW 62.1 Development History 62.2 Video Surveillance Camera Installation 7


viii2.3 Type of Vehicle Detection Camera 82.3.1 Hardware Trigger 92.3.2 Software Trigger 92.3.3 Free Flow 92.4 Type of License Plate Capture Camera 102.4.1 Interlace Camera 102.4.2 Progressive Camera 102.5 Video Surveillance via IP Camera 112.5.1 Centralized IP Camera 122.5.2 Decentralized IP Camera 132.6 Video Signal Transmission 132.7 Streaming Video over the Network 152.7.1 Implementation of the Server-side 162.7.2 Implementation of the Client-side 172.8 Format of Capture Video and Image 182.9 Microsoft Visual C++ 193 METHODOLOGY 203.1 Hardware Implementation Part 213.1.1 Basler IP Camera 213.1.2 Intel Desktop Board D525MW 233.1.3 Monitor 243.2 Software Implementation Part 243.2.1 Application Architecture 253.2.2 Live Streaming Video Mode 273.2.3 Offline Video Mode 294 RESULT AND DISCUSSION 314.1 Project Setup 314.2 Application Functionality Test 344.2.1 Basler IP Camera Live Streaming Mode 354.2.2 Basler IP Camera Offline Video Mode 404.3 Per<strong>for</strong>mance Analysis 44


ix5 CONCLUSION AND RECOMMENDATION 485.1 Conclusion 485.2 Future Recommendation 48REFERENCES 50Appendices A-B 52-58


xLIST OF TABLESTABLE NO. TITLE PAGEA.1 Gantt chart <strong>for</strong> 2011/2012 semester 1 52A.2 Gantt chart <strong>for</strong> 2011/2012 semester 2 53


xiLIST OF FIGURESFIGURE NO. TITLE PAGE2.1 A Merseyside Police <strong>car</strong> equipped with mobile ANPR 72.2 Internal viewer of video capture via ANPR camera 72.3 Procedure of <strong>image</strong> captured in interlace camera 102.4 Procedure of <strong>image</strong> captured in progressive camera 112.5 Sample IP Camera 112.6 Connection of centralized IP video surveillance <strong>system</strong> 122.7 Transmission of video signal from IP camera to monitorscreen 142.8 Streaming videos over the IP network 162.9 Diagram of stream servers 172.10 Diagram of stream client 173.1 Hardware implementation part 203.2 Software implementation part 213.3 Hardware overview of Basler IP camera 223.4 Connection between camera and PoE injector 223.5 Hardware overview of Intel desktop board D525MW 233.6 Monitor 243.7 Flow chart of the developed application architecture 263.8 Flow chart of live video streaming mode 28


xii3.9 Flow chart of offline video mode 304.1 Overview of hardware implementation 324.2 Basler IP camera 324.3 Accessories 334.4 Intel desktop board connections 334.5 Welcome message of application 344.6 Program exit screen shot 354.7 Camera undetected screen shot 364.8 Camera detected screen shot 364.9 Capture rate checking process 374.10 Live video <strong>time</strong>r and frame rate display on windowconsole 384.11 (a) Images captured from live video in specific period(set 1) 39(b) Images captured from live video in specific period(set 2) 404.12 Video undetected screen shot 414.13 Video detected screen shot 414.14 Offline video <strong>time</strong>r and frame rate display on windowconsole 424.15 (a) Images captured from offline video in specific period(set 1) 43(b) Images captured from offline video in specific period(set 2) 444.16 Car <strong>plate</strong> is blocked by body of vehicle leading in frontof it 454.17 No license <strong>plate</strong> attached on the vehicle 464.18 Vehicle <strong>plate</strong> blocked by installed bumper 46


xiiiLIST OF APPENDICESAPPENDIX TITLE PAGEA Project Gantt Chart 52B Source Code of Developed Application 54


CHAPTER 1INTRODUCTIONNowadays, transportation has becoming one of the important core factorswhich contribute to the growth of a country. The development of the IntelligentTransportation System (ITS) has attracted worldwide attention from many fields,either automotive industry or transportation professional to involve it. As a result,there are a lot of researches on improving the transportation was <strong>car</strong>ried out andspread over many different technology sectors. Among these, Car Plate RecognitionSystem (CPRS) is the most significant research issue [1].Basically, <strong>car</strong> <strong>plate</strong> or vehicle registration <strong>plate</strong> is a <strong>plate</strong> which is made byeither metal or plastic and is usually will be attached to the front or back of a vehicle.Car <strong>plate</strong> number is a combination between numbers and alphabetical letter whichcan be used to represent an identity of respective vehicle. In Malaysia, vehicle <strong>plate</strong>is derived from early iterations of license <strong>plate</strong> designed in United Kingdom. Thefirst letter of the vehicle serves as the location prefix and followed by four numericaldigits.A Car Plate Recognition System is a tracking <strong>system</strong> that identifies thevehicle so that the <strong>car</strong> is tracked down through the existing database. Normally the<strong>recognition</strong> <strong>system</strong> will be installed at the gate of the residential area, factoryentrance, parking lot, toll gates, entrance of university or other high-secured building.The <strong>system</strong> will identify the vehicle automatically by recognising the target <strong>car</strong> <strong>plate</strong>which may involve in stolen vehicle case, crime scenes and traffic violations. Hence,


2the <strong>real</strong>-<strong>time</strong> video capture and <strong>recognition</strong> process is very crucial so that the <strong>system</strong>can analyse and read the characters on the vehicle <strong>plate</strong>.Currently there are many video surveillance software and camera devicesavailable in the market. Every type of the video recording devices and its videosurveillance software has its own specification which may suitable in certainsituation. In Car Plate Recognition System, the <strong>real</strong>-<strong>time</strong> video captured qualitytakes the significant place compared to the audio recording because it needs tocapture the vehicle <strong>plate</strong> <strong>image</strong> from the <strong>real</strong>-<strong>time</strong> video as the input of the <strong>image</strong>processing. So the video surveillance devices must have a high quality of <strong>real</strong>-<strong>time</strong>video recording in order to produce a high quality <strong>image</strong> <strong>for</strong> further processing [2].The purpose of this project is to implement and utilize C++ language tostream out the <strong>real</strong>-<strong>time</strong> video signal from the camera module and display it onmonitor screen. An application will be developed to obtain the high quality of <strong>real</strong><strong>time</strong>video streaming and the captured license <strong>plate</strong> <strong>image</strong> will be used as the input<strong>for</strong> simulation in Car Plate Recognition System.1.1 Problem StatementIn the <strong>real</strong>-<strong>time</strong> Car Plate Recognition System which is already currentlyavailable in the market, most of the <strong>system</strong>s record the <strong>real</strong>-<strong>time</strong> video signals byusing interlaces video technique. It is a technique which doubling the perceivedframe rate and it takes two fields of a video frame shot at two different <strong>time</strong>s. Then,the recorded video will be displayed on the monitor screen through the web browservideo decoder. The quality of the moving vehicle video turn to be poor compared tothe <strong>real</strong>-<strong>time</strong> video signal seen from the interlace camera lens actually. Althoughinterlace camera provides low quality video streaming, it is usually used in the CarPlate Recognition System as the video capture device by the manufacturer becausethe cost of interlace camera is lower compared to progressive camera. Besides that,web browser will compress the video signal so that video become compatible <strong>for</strong>matand can be displayed through a browser. The accuracy of Car Plate Recognition


3System decreases if the quality of input <strong>image</strong> decreases with the video quality. Thequality of video turn worst if there are any disturbances factors such as lightreflection and other exist during the <strong>real</strong>-<strong>time</strong> video recording process [3].1.2 ObjectiveThe objectives of this project as following:-To develop an application that can integrate the camera with the board sothat it is able to receive the video signal and display it through the board.To display a clear and smooth quality <strong>real</strong>-<strong>time</strong> streaming video throughdeveloped application compared to the quality of video that view byusing web browser.To capture and save <strong>image</strong>s of <strong>car</strong> <strong>plate</strong> from the <strong>real</strong>-<strong>time</strong> streamingvideo.1.3 ScopeFirst and <strong>for</strong>emost, the project will be 100% programming and will notinvolve in any hardware design. The Basler IP camera BIP2-640c must be able tointegrate with the Intel Desktop Board D525MW. An application is designed mainlyto stream out the <strong>real</strong>-<strong>time</strong> video signal seen by the IP camera lens. The IP camerawill be setup at the main exit location of Universiti Teknologi Malaysia to record the<strong>real</strong>-<strong>time</strong> video of vehicle flow-out from the university. Due to the limitation of thesetup place, the IP camera will record the video right in front of vehicle which isperpendicular to the IP camera view with ±20°offsets. The <strong>real</strong>-<strong>time</strong> video will berecorded in any situations, either day <strong>time</strong> or night <strong>time</strong>, sunny or raining weather.Video input of IP camera will be set at the rate of 30 frames per second so that the<strong>image</strong> processing to recognise the <strong>car</strong> <strong>plate</strong> can be done as fast as possible. Inaddition, the <strong>real</strong>-<strong>time</strong> video signal will be able to be streamed out through the


4application as received by the motherboard and then display it on a monitor screen.The frame will be grabbed from the live video or offline video and then it will besaved as .JPG picture <strong>for</strong>mat. The application has been developed using MicrosoftVisual Studio 2010 Ultimate with the aid of the OpenCV library.1.4 Project OutlineThere will be five chapters included in the project. The overview of eachchapter is given as follows:-1.4.1 Chapter 1 ̶ IntroductionChapter 1 provides simple introduction of <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> <strong>system</strong><strong>for</strong> <strong>car</strong> <strong>plate</strong> <strong>recognition</strong>. It also includes the problem statement, objective and thescope of this project in this chapter.1.4.2 Chapter 2 ̶ Literature ReviewThis chapter discusses the development of the video surveillance that CarPlate Recognition System normally used in the market and also the technique of thevideo being captured and recorded by the <strong>system</strong>.1.4.3 Chapter 3 ̶ MethodologyThe algorithm and technique used to implement the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong><strong>system</strong> <strong>for</strong> <strong>car</strong> <strong>plate</strong> <strong>recognition</strong> are described in this chapter. This includes the way


5to boot up the Intel Desktop D525MW board and method to capture the frame fromlive video or offline video.1.4.4 Chapter 4 ̶ Result and DiscussionThis chapter shows the result of the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> <strong>system</strong> <strong>for</strong> <strong>car</strong><strong>plate</strong> <strong>recognition</strong>. The per<strong>for</strong>mance of the developed application on the framecaptured from live video is analysed and the effectiveness of the technique used inthe frame grabber is discussed.1.4.5 Chapter 5 ̶ Conclusion and RecommendationThe conclusion of the project implementation which is successfully done ispresented in this chapter. In addition, future recommendation <strong>for</strong> the <strong>real</strong>-<strong>time</strong> <strong>image</strong><strong>capturing</strong> <strong>system</strong> is also proposed in this chapter.


CHAPTER 2LITERATURE REVIEWCar Plate Recognition System is an important application of trafficmonitoring and <strong>car</strong> <strong>plate</strong> <strong>image</strong> detection [4]. Basically the <strong>system</strong> is built up fromfew parts; <strong>image</strong> <strong>capturing</strong> <strong>system</strong>, which is used to capture <strong>real</strong>-<strong>time</strong> <strong>image</strong> thatconsist of <strong>car</strong> <strong>plate</strong>, Optical Character Recognition (OCR) processing, it is about the<strong>image</strong> pre-processing, license <strong>plate</strong> localization, <strong>plate</strong> character extraction andcharacter <strong>recognition</strong> [5]. This project mainly concerns with the <strong>real</strong>-<strong>time</strong> <strong>image</strong><strong>capturing</strong> part of the Car Plate Recognition System.2.1 Development HistoryCar Plate Recognition System also known as Automatic Number PlateRecognition (ANPR) System was invented by the Police Scientific DevelopmentBranch in United Kingdom in the year of 1976. The first trial <strong>system</strong> was tested onthe A1 road and at the Dart<strong>for</strong>d Tunnel. The <strong>system</strong> successfully detected a case of astolen <strong>car</strong> through the video recorded in year of 1981 [6].


72.2 Video Surveillance Camera InstallationNowadays, the ANPR camera can be integrated into the law en<strong>for</strong>cementvehicles such as police <strong>car</strong>, traffic patrol <strong>car</strong> and others. It requires <strong>car</strong>efulconsideration of the juxtaposition of camera with the license <strong>car</strong> <strong>plate</strong> so that thepercentage of the camera to capture a high quality and clear <strong>image</strong> can be increased[6]. The figure below shows the vehicle with the mobile ANPR <strong>system</strong> in <strong>for</strong>eigncountry:-Figure 2.1 A Merseyside Police <strong>car</strong> equipped with mobile ANPR [6]Figure 2.2 Internal viewer of video capture via ANPR camera [6]For the law en<strong>for</strong>cement, the ANPR <strong>system</strong> requires a better camera andprocessor that must work fast enough to track the speed of the vehicle up to160km/h. For example, ANPR <strong>system</strong> in the highway needs a better per<strong>for</strong>mancecamera to detect speeding vehicles. Hence, the highway patrol requires <strong>for</strong>ward-


8looking camera so that it can capture the <strong>image</strong> of the license <strong>plate</strong> at very highspeed. On the other hand, the camera of the city patrol requires lower focal lengthand shorter range cameras <strong>for</strong> <strong>plate</strong> <strong>capturing</strong> on parked <strong>car</strong>s. In addition, the <strong>car</strong>parking lots camera must have a very short focal length if the <strong>car</strong> is parkingperpendicularly [6].Other than that, camera installation must be done <strong>car</strong>efully to avoid theblurring video capture to happen. To minimize the blurring effect, the camera musthave a shutter speed of 1/1000 per second. This is because when the <strong>car</strong> is moving,the lower shutter speed will result in a blurred <strong>image</strong>, which is very hard to read byusing OCR software, especially the camera which is located at the position higherthan the vehicle position. The shutter speed of the camera can be set to slow whencamera is at a lower level and the target vehicle is at an angle approaching camera.Normally shutter speeds of 1/250 per second can cope with traffic which moving upto 8km/h while shutter speed of 1/500 per second is suitable with traffic speed up to64km/h. Nowadays with the rapidity growth of technology, an ANPR cameraalready can record the <strong>real</strong>-<strong>time</strong> video and produce a usable <strong>image</strong> from vehiclestravelling at 190km/h speed [6].Besides shutter speed adjustment, installers will <strong>car</strong>efully consider theposition of camera relative to the target capture area in order to maximize thechances of effective license <strong>plate</strong> get capture. If the camera is installed at a positionwhere the threshold angle of incidence between camera lens and license <strong>plate</strong> exceed,the distortion of <strong>image</strong> quality will happen and it reduces the probability to obtainusable <strong>image</strong>. Manufacturers already developed a tool to eliminate error and solvethe physical installation of license <strong>plate</strong> capture camera problem [6].2.3 Type of Vehicle Detection CameraThe <strong>image</strong> of <strong>car</strong> <strong>plate</strong> is obtained from the <strong>real</strong>-<strong>time</strong> streaming video. In themarket, there are many multifunction cameras that can detect moving vehicles.Some cameras can detect vehicle license <strong>plate</strong> and then straight capture the <strong>image</strong>


9from the video while some cameras can capture the <strong>image</strong> continuously whether thevehicle exist in the video or not. There are three ways to detect the vehicle asmentioned in the following [7]:-2.3.1 Hardware TriggerThe hardware trigger equipment integrated in the camera module physicallycontrols a sensor directly installed in the lane. The camera will do the process ofcapture once a vehicle is present and detected by the sensor inside [7].2.3.2 Software TriggerThe software trigger camera has a sensor which is similar to the hardwaretrigger camera. But this type of camera will communicate with the client applicationwhich physically controls a sensor directly installed in the lane. Once the presenceof vehicle is detected by the sensor, the client application will communicate to thecamera module and begin the process of <strong>capturing</strong> [7].2.3.3 Free FlowFree flow does not need to receive signal from any external sensor, thecamera will take <strong>image</strong>s continuously and it also can detect the vehicle automatically[7].


102.4 Type of License Plate Capture CameraWhen the vehicle is detected, the camera will begin the <strong>image</strong> captureprocess. Difference types of cameras have a variety ways of <strong>image</strong> <strong>capturing</strong> method[7]:-2. 4. 1 Interlace CameraFigure 2.3 Procedure of <strong>image</strong> captured in interlace camera [7]Figure 2.3 shows procedure to capture <strong>image</strong> in interlace camera. This typeof camera is not recommended to be used in Car Plate Recognition System becausethe <strong>image</strong> of <strong>plate</strong> number will be defocused when vehicle is moving. However,many ANPR manufacturers still use this type of camera because its cost is lower thanother type [7].2.4.2 Progressive CameraProgressive scan camera captures <strong>image</strong> via progressive scanning technique.This is the opposite of the method use in interlace camera. Progressive scan cameradoes not split <strong>image</strong> into separate field, instead it will scan the entire picture line byline every sixteenth of a second [8]. It is used specifically <strong>for</strong> the moving object and


11able to capture a clear picture compared to interlace camera. The procedure of aprogressive camera captures an <strong>image</strong> as shown as Figure 2. 4: -Figure 2.4 Procedure of <strong>image</strong> captured in progressive camera [7]The use of this kind of camera is always recommended because the <strong>car</strong> <strong>plate</strong>number still is focused although the vehicle is moving. Hence, it produces betterquality of capture <strong>image</strong> compared to interlace camera [7].2.5 Video Surveillance via IP CameraBased on the tendency of video surveillance <strong>system</strong>, popularity of internetprotocol (IP) based solution is raising recently. In fact, IP camera is a progressivetype of digital video camera which is commonly used <strong>for</strong> video surveillance. Thistype of camera is able to send and receive data over computer network and internetcompared to analogue close-circuit television (CCTV) [9]. The physical view of anIP camera in the following:-Figure 2.5 Sample IP Camera [9]


12There are two types of IP camera available in the market as following:-2.5.1 Centralized IP CameraCentralized IP camera requires a central Network Video Recorder (NVR) torun the audio, video recording and even alarm management operation. NVR is asoftware program that record and store the video in digital <strong>for</strong>mat to the mass storagedevice like memory <strong>car</strong>d, Universal Serial Bus (USB) flash drive and other. Videocaptured will be encoded and processed at the IP camera, and then video input willbe streamed to the NVR <strong>for</strong> remote viewing or storage [10]. Figure 2.6 shows theconnection of centralized camera with NVR <strong>system</strong>:-Figure 2.6 Connection of centralized IP video surveillance <strong>system</strong> [10]


132.5.2 Decentralized IP CameraA decentralized IP camera does not require a NVR as the IP camera has thebuilt-in function of recording and the record can be directly save to mass storagedevice [9].2.6 Video Signal TransmissionFor the Car Plate Recognition System manufactured by Philex EnterpriseInc., it is using 1/3” progressive scan RGB CCD Axis camera. The camera has thelens with the following specifications: - varifocal 3.0-8.0mm, DC-iris, 1/25000s to 2sshutter speed. Besides that, the output video compression is MPEG-4 <strong>for</strong>mat and the<strong>image</strong> captured <strong>for</strong>mat is motion JPEG. The frame rate of MPEG-4 can be up to30fps (frame per second) at 640x480 resolutions [11].In <strong>real</strong>-<strong>time</strong> <strong>car</strong> <strong>plate</strong> <strong>recognition</strong> <strong>system</strong> application, the Axis IP camera<strong>car</strong>ry out the recording process at the standard sampling rate of 30 frames per second.It is enough to provide <strong>real</strong>-<strong>time</strong> flow of vehicle scenes. The camera is connected bynetwork cable into the server via IEEE 802.3x network port. Once the whole <strong>system</strong>is activated, the video <strong>image</strong>s can be viewed and <strong>image</strong> will be captured at theresolution of 640x480 pixels. When video <strong>capturing</strong> process was done at thetargeted area, the in<strong>for</strong>mation captured of the <strong>plate</strong> alphanumeric, lane identification,date-<strong>time</strong> or other extra in<strong>for</strong>mation will be transmitted to some computer server in<strong>for</strong>m of small data packet [11]. The purpose of using server computer is to allow theapplication to convert an analogue video to a compressed digital video. It providesaccess to the data packet via IP network [12]. The <strong>real</strong>-<strong>time</strong> video clips inside thedata packet will be examined by using License Plate Recognition (LPR) browserapplication. The clips can be viewed in <strong>real</strong> <strong>time</strong> or other speeds, the video can alsocan play <strong>for</strong>ward or backward, or step through the frames individually [11]. Figurebelow show the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> concept of Car Plate Recognition Systemmanufactured by Philex Enterprise Inc.:-


14a. IP camera is setup in the target region and <strong>real</strong>-<strong>time</strong> video is <strong>capturing</strong>b. A <strong>car</strong> is approaching and detect by sensorc. Image of the license <strong>car</strong> <strong>plate</strong> is taken by camera


15d. Real-<strong>time</strong> video signal and captured <strong>image</strong> is transmitted to a servere. Browser application is decoding the video signal and displays it on monitor screenFigure 2.7 Transmission of video signal from IP camera to monitor screen [11]After that, the data will be processed via optical characteristic <strong>recognition</strong><strong>system</strong> and <strong>car</strong> <strong>plate</strong> number will be extracted out to match with the existingdatabase. In this way the vehicle is identified and the owner can be tracked down[6].2.7 Streaming Video over the NetworkIn the <strong>real</strong>-<strong>time</strong> <strong>car</strong> <strong>plate</strong> <strong>recognition</strong> process, the video signal or captured<strong>image</strong> will be retrieved by the server computer. The data must be sent to the client


16computer over the IP network <strong>for</strong> further <strong>recognition</strong> processing. The <strong>system</strong> isdesigned by following the client-server model. The computer that consists of videoinput will act as the server while the client computer will receive the <strong>real</strong>-<strong>time</strong> videostreaming from server through the IP network. Server waits <strong>for</strong> a client to connectand it will stream the video once the connection has established [12]. Diagram of aclient-server model as following:-Figure 2.8 Streaming videos over the IP network [12]Figure 2.8 above shows server has connected with several clients and clientreceive the streaming video simultaneously. The received video is in the <strong>for</strong>mat ofgrayscale <strong>image</strong> and single channel frames [12].2.7.1 Implementation of the Server-sideThe server side is connected to the server computer that has received the <strong>real</strong><strong>time</strong>video streaming input from the IP camera. The server side consists of twoparts; it includes the one that reads the video input in a loop and another one thatsends the video frames once the connection between client-server has established. InFigure 2.9, there are two threads running on the server side, which are the FrameGrabber and the Stream Server. The input is taken from the IP camera [12].


17Figure 2.9 Diagram of stream server [12]Frame Grabber will grab a frame from IP camera and store it to a globalvariable called ‘img’. Now the stream server is pending and waiting <strong>for</strong> client toconnect. When the connection has been setup and established, stream server willsend the variable ‘img’ to client iteratively whenever a new version of variable ‘img’is available [12].2.7.2 Implementation of the Client-sideWhen the server has been setup and accepted the connection, the client willstart to receive the data and display the streaming video [12]. Figure 2.10 belowshows the stream client diagram:-Figure 2.10 Diagram of stream client [12]From Figure 2.10, there are two threads running on the client side, streamclient receives the frames from the server and save it to variable ‘img’, then the video


18player will read variable ‘img’ and display the <strong>image</strong> through a player window. TheIP address and port number of the server must be specified since the client receivesthe frames from an IP network. After that, the client computer will do further <strong>image</strong>processing to extract out the license <strong>plate</strong> number and track down the vehicle [12].2.8 Format of Capture Video and ImageThe most popular <strong>image</strong> <strong>for</strong>mat stored in <strong>image</strong> <strong>capturing</strong> <strong>system</strong> is JPEG.There are a lot of cameras that allow the retrieval of a single <strong>image</strong> by accessing aspecific uni<strong>for</strong>m resource locator (URL). However, there are many advantages anddisadvantages of using this kind of approach. The advantage is the monitoringapplication can easily control the maximum frame rate so that it will access the URLto obtain the next frame with any arbitrary speed. The disadvantage is this approachwill contribute to some speed loss because of the extra HTTP header data being sentor received as it requires sending a new HTTP request to retrieve next new <strong>image</strong>[13].Another popular video <strong>for</strong>mat is MJPEG, which is motion JPEG. This video<strong>for</strong>mat allows server to download more than one single JPEG <strong>image</strong>, or stream ofJPEGs. The MJPEG approach is much better because it requires sending an HTTPrequest only once and then it will receive JPEG from IP camera continuouslydelimited with a special delimiter. Although it can receive the stream of JPEG, theframe rate cannot be controlled easily. By accessing the MPEG URL, the camerawill automatically set up some sort of predefined frame rate. The extra parameterneed to be added into URL if user wants to change the frame rate. Besides JPEG andMJPEG <strong>for</strong>mat, many cameras support much more than that <strong>for</strong>mats, such as MPEG-2, MPEG-4, H. 264 and others [13].


192.9 Microsoft Visual C++The function of Microsoft Visual C++ is used to support the newest plat<strong>for</strong>mof Microsoft Windows plat<strong>for</strong>m and technologies. Microsoft Visual Studio is anintegrated development environment (IDE) which allow user to create and developconsole and graphic user interface applications. Visual Studio supports nearly anyprogramming languages. The built in language include C/C++ (via Visual C++), C#(via Visual C#) and others [14].With the aid of OpenCV library, this library makes Visual Studio per<strong>for</strong>m<strong>real</strong>-<strong>time</strong> computer vision function. OpenCV stand <strong>for</strong> Open Computer Vision. It isan open source computer vision library and the source can be obtained fromhttp://SourceForge.net/projects/opencvlibrary. This library is written using C/C++programming language and it can runs under Windows, Linux and Mac OS Xenvironment. OpenCV was designed by focus on <strong>real</strong>-<strong>time</strong> applications and itslibrary contains over 500 functions that span many area of vision. Nowadays,OpenCV is very common uses library in the programming in a lot of visual materialinclude instruments from the area of medical imaging, security, end-user productinspection, robotics and stereo vision [15].


CHAPTER 3METHODOLOGYIn this project, the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> <strong>system</strong> will be setup andimplemented at the main exit location of UTM. In the main exit location, the vehicleout-flow will be simulated and recorded. The camera will be installed and the <strong>real</strong><strong>time</strong>video will be taken as input. Due to the limitation of setup location, the IPcamera will be installed right in front of vehicle, which is 90° directly perpendicularto the IP camera view with ±20°offsets. The video will be recorded at the rate of 30frames per second under any condition whether rainy or sunny day. Its signal will betransmitted into mass storage of a desktop board. The processor of the desktop boardwill run the <strong>real</strong>-<strong>time</strong> video retrieving process in order to extract out the data packet.An application will be developed to show the <strong>real</strong>-<strong>time</strong> video and captured <strong>image</strong>then display it through a monitor. Figure 3.1 and Figure 3.2 shows the overallprocess involved in this project:-Basler IP CameraCS-mount LensAdapterRJ-45 NetworkPoE InjectorMonitorIntel Desktop Board D525MWDisplay ScreenVGA PortIntel AtomProcessor D52510/100/1000Network PortFigure 3.1 Hardware implementation part


21Real-Time VideoSignalWindowsEnvironmentMicrosoft Visual StudioLive MPEG-4 Video StreamApplicationFigure 3.2 Software implementation part3.1 Hardware Implementation PartThe hardware modelling involves three components; Basler IP camera, Inteldesktop board D525MW and a monitor. The entire <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> <strong>system</strong>requires hardware as the medium where all processes take part inside.3.1.1 Basler IP CameraBasler IP camera is progressive scan and decentralized type of camera thatused to capture the <strong>real</strong>-<strong>time</strong> video signal of vehicles out flow. It consists of CSmountlens adapter, RJ-45 network or PoE, PoE injector and others [16]. Thehardware overview of Basler IP camera as shown in Figure 3.3 and Figure 3.4:-


22Figure 3.3 Hardware overview of Basler IP camera [16]Figure 3.4 Connection between camera and PoE injector [16]CS-mount lens adapter provides a point to mount a CS-mount lens or a C-mount lens on camera (a 5mm extension tube is required with a C-mount lens). PJ-45 network/PoE provides a 10/100 Ethernet connection and it can also use to connectPower over Ethernet (IEEE 802.3af) to the camera. PoE injector is a medium thatallow the connection between IP camera and network switch in the Intel desktopboard [16].The installation step of Basler IP camera as following: Firstly, the camera andappropriate lens are taken to a clean environment. It is better if the environment asdust free as possible. The cap from the lens adapter on the front of the camera isremoved. CS-mount lens is screwed <strong>car</strong>efully into adapter. In order to turn on autoirisfunction, the cable on the lens is connected to DC-iris control connector on theside of camera. Then, the camera is connected to an Out-port of PoE injector. Thepower source on PoE injector is turned on in order to supply power to IP camera. An


23Ethernet patch cable is connected between In-port and the network switch of the Inteldesktop board [16].3.1.2 Intel Desktop Board D525MWFigure 3.5 Hardware overview of Intel desktop board D525MWFigure 3.5 shows Intel desktop board D525MW. It consists of Intel Atom TMprocessor D525 which supports the two chips layout. This chipset can reduce thepackage of power footprint by 70 percent, better heat flow and enabling easierrouting. The Ethernet patch cable is connected to integrated 10/100/1000 networkport. Through this network port, it allows the hardware accelerated video encodingand decoding. All the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> will be done in the Intel atomprocessor. Besides that, the desktop board is connected with Kingston 2GB randomaccess memory (RAM), hard disk, keyboard and also eSo-nic switching powersupply which can provide 500W with 50Hz frequency. The port of video graphi<strong>car</strong>ray (VGA) is connected with VGA connector to a monitor.


243.1.3 MonitorFigure 3.6 MonitorFigure 3.6 shows a monitor. It is connected to VGA port of Intel desktopboard through VGA connector. It is also connected with power supply to do thedisplay operation. User can see <strong>real</strong>-<strong>time</strong> video and captured <strong>image</strong>s in thedeveloped application via the monitor screen.3.2 Software Implementation PartThe software implementation can be categorized into few parts; <strong>real</strong>-<strong>time</strong>video signal, a window environment, Microsoft Visual Studio application,application and live MPEG-4 video stream. The Intel desktop board D525MW willbe boosted up by installing the motherboard driver and Window-7 Professional 32-bits operating <strong>system</strong> so that the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> can be per<strong>for</strong>med.Microsoft Visual Studio is an integrated development environment (IDE) fromMicrosoft that is used to develop application along with Window Forms application,web application and others supported by Microsoft Windows. The application willbe developed by using Microsoft Visual Studio 2010 Ultimate in order to show theoutput video signal and captured <strong>image</strong>. IP address of the Basler IP camera isdetermined by its own provider software, which is BIP finder in order to access videostreams and buffers.


25The instruction cycle on how the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> will be executedas following: <strong>real</strong>-<strong>time</strong> video of vehicle out flow at the UTM main exit location willbe recorded by Basler IP camera. The video signal will be transmitted in small datapacket to memory address in hard disk. The instruction from the developedapplication is fetched from memory address (under Program Counter) to InstructionRegister (IR) and store inside it. The instruction will be interpreted and gets decodedby decoder. The control unit will pass the decoded in<strong>for</strong>mation as sequence ofcontrol signal to relevant function unit of central processing unit (CPU) so that it canper<strong>for</strong>m the operation required by instruction. Hence, the video signal and captured<strong>image</strong> will go through a lot of transmission and processing, and finally display on thepop up windows via monitor screen.3.2.1 Application ArchitectureThe application is developed to obtain the <strong>real</strong>-<strong>time</strong> video streaming fromBasler IP camera and also to playback the offline video from existing source. Thevideo frame will be grabbed and then saved it as .JPG picture file <strong>for</strong>mat. Figure 3.7shows the flow chart of the developed application architecture:-


26Start1. Display welcome header2. Display instructionRead modeCASE (x)1 2 DefaultLive streamingvideo modeOffline videomodeDisplayprogram exitEndFigure 3.7 Flow chart of the developed application architectureIn order to develop the application, the instruction must be displayed to allowuser to choose the mode. The inserted user input will be read and stored into ‘x’variable. Under the CASE function, variable ‘x’ will be processed and it willdetermine the next operation mode. When the variable of x is matched with case 1,operation of live streaming video mode will be per<strong>for</strong>med; when variable of x ismatched with case 2, offline video mode is selected and activated. Otherwiseoperation will directly proceed to default case and the program exit notice will bedisplayed. Application will be terminated and exit after window console is closed bythe user.


273.2.2 Live Streaming Video ModeBe<strong>for</strong>e the program starts, the internal setting of Basler IP camera is adjustedby initializing the frame rate as 30 fps. When user inserts ‘1’ in the selection mode,case 1 will be selected. Under this case, window will enter live streaming videomode.After the instruction is displayed, availability of IP address of Basler IPcamera will be checked. Program will be exit if the IP camera is not available. If theIP address of the camera exists, the user is allowed to insert the capture rate inprecision of milliseconds. Once the input is not a valid character or not a validnumber, the user can key in the capture rate again. The program treat the input valueas string in number checking process, hence the string will be converted into numbermode and then stored into capture rate variable.After the capture rate is inserted by user, ‘cvGetTickCount ( )’ and‘cvGetTickFrequency ( )’ will obtain the number of tick and frequency from the CPUwith the aid of OpenCV library. The frame of the live video seen by IP camera willbe grabbed and stored into memory using <strong>image</strong> processing library function which is‘IplImage’ <strong>for</strong> live video display purpose. Timer and frame rate will be shown in thewindow console <strong>for</strong> data references. Real-<strong>time</strong> MPEG-4 <strong>for</strong>mat video will bestreamed through the IP address and displayed in new windows. After the frame iscaptured from live video, it will be shown in another window and then saved as .JPGpicture <strong>for</strong>mat. The process will keep repeating in the ‘while’ loop and delay <strong>for</strong>10ms in order to display video frame correctly. The outline of <strong>real</strong>-<strong>time</strong> videostreaming flow is shown in Figure 3.8.


28StartDisplay welcome to Live Streaming Video headerChecking availability of IP addressCamera=NULL?FTDisplay camerais not detectedDisplay camera is detectedDisplay insert capture rateRead inputFString=number?TConvert string into number modeDisplay press any key to show live videocvWaitkey (10)!=atoi(q)FEndTObtain tick frequency count from CPUGrab frame from live video into memory by using <strong>image</strong> processing library1. Display <strong>time</strong>r and frame rate2. Display live videoCapture frame1. Display captured frame2. Display captured frame notification in window consoleSave <strong>image</strong>Figure 3.8 Flow chart of live video streaming mode


293.2.3 Offline Video ModeFirst of all, when the IP camera is setup at the main exit location, the <strong>real</strong><strong>time</strong>video of the vehicle flow-out is recorded by BIP Viewer version 1.3.0.9 in .AVIvideo <strong>for</strong>mat. The video is converted from .AVI <strong>for</strong>mat into .MP4 <strong>for</strong>mat by usingTotal Video Converter Version 3.02 <strong>for</strong> the sizing purpose. After user inserts ‘2’ inthe mode selection, program will proceed to the case 2, which is the offline videomode.The existence of the offline video will be checked by the program. If thetargeted video is not available, the program will display an exit notification to user.Meanwhile if the video is available it will be loaded into a variable called ‘video’.Same as <strong>real</strong>-<strong>time</strong> video operation flow, the user can also insert a desired capture rateunder offline video mode. If the input is not a valid number, the program allows userto reinsert the capture rate. The capture rate will be converted into number mode andthen store into a variable.Then, frame from the offline video will be grabbed and stored into memoryby using <strong>image</strong> processing library <strong>for</strong> offline video display purpose. The offlinevideo will be shown in new windows. By using function of ‘cvGetTickCount ( )’ and‘cvGetTickFrequency ( )’ in OpenCV library, the <strong>time</strong>r is counted by retrieving thetick frequency count from CPU. Timer and frame rate of the offline video will bedisplayed in the window console. Once the new frame is grabbed from offline video,it will show out in new windows automatically and then save as .JPG picture <strong>for</strong>matalso. Operations above will keep on repeating in the ‘while’ loop and new <strong>image</strong>will be received continuously until the end of offline video. The outline of offlinevideo flow is shown in Figure 3.9.


30StartDisplay welcome to Offline Video headerChecking availability of offline video sourceTVideo=NULL?FDisplay camera is loadedDisplay video isnot loadedDisplay insert capture rateRead inputFString=number?TConvert string into number modeDisplay press any key to show offline videoWhile (1)FEndTGrab frame from offline video into memory by using <strong>image</strong> processing libraryDisplay offline videoObtain tick frequency count from CPUDisplay <strong>time</strong>r and frame rateCapture frame1. Display captured frame2. Display captured frame notification in window consoleSave <strong>image</strong>Figure 3.9 Flow chart of offline video mode


CHAPTER 4RESULT AND DISCUSSIONIn this chapter, the result obtained from the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> <strong>for</strong> <strong>car</strong><strong>plate</strong> <strong>recognition</strong> will be shown and discussed. The result obtained will be discussedin terms of developed application functionality and also <strong>car</strong> <strong>plate</strong> <strong>image</strong>s capturedfrom the <strong>real</strong>-<strong>time</strong> streaming video or offline video.4.1 Project SetupBasler IP camera is setup and integrated with the Intel Desktop BoardD525MW at the main exit location of Universiti Teknologi Malaysia. Figure 4.1 4.2,4.3 and 4.4 show the hardware implementation of this project.


32Figure 4.1 Overview of hardware implementationRJ-45 NetworkCS-mountLens AdapterFigure 4.2 Basler IP camera


33MonitorKeyboardMouseFigure 4.3 AccessoriesPoE InjectorPowersupplyIntel DesktopBoard D525MWEthernetpatch cableHard diskFigure 4.4 Intel desktop board connections


344.2 Application Functionality TestAfter hardware connection is setup and C++ source code of the application iswritten, it is built and compiled through Microsoft Visual Studio Solution Builder.The window console application is pop out when „Start Debugging‟ button ispressed. The welcome message of the application is as shown in Figure 4.5:-Figure 4.5 Welcome message of applicationUnder the welcome message, the instruction of the program is shown. Input„1‟ is corresponding to Basler IP Camera Live Streaming Mode while input „2‟ isregarding to Basler IP Camera Offline Video Mode. Figure 4.6 shows the programexit message if the input neither „1‟ nor „2‟ is inserted by user.


35Figure 4.6 Program exit screen shotterminate.If neither „1‟ nor „2‟ is inserted, the program will enter „default case‟ and then4.2.1 Basler IP Camera Live Streaming ModeWhen input „1‟ is detected, the program will proceed to case 1, which is thelive streaming mode. The availability of IP address of Basler IP camera is checked.If the inserted IP address is invalid or does not exist, the message stating camera isnot detected will be displayed. After that the program will end when any key ispressed. Figure 4.7 shows the display message when the Basler IP camera is notdetected by program:-


36Figure 4.7 Camera undetected screen shotIf the camera is detected by application, a message will appear in the windowconsole. This <strong>time</strong>, the user can insert the capture rate in precision of millisecond(ms). Figure 4.8 shows the screen shot of the window console when the Basler IPcamera is detected:-Figure 4.8 Camera detected screen shot


37When a wrong input is inserted by user, such as the input is not a validnumber, program will detect it and then allows the user to re-enter the capture ratevalue. Figure 4.9 shows that the process will keep repeating until program detects avalid capture rate number.Figure 4.9 Capture rate checking processOnce an appropriate capture rate is inserted by the user, a new window called“Live Video” will pop up to display the <strong>real</strong>-<strong>time</strong> streaming video. At the same <strong>time</strong>,a window console will display the <strong>time</strong>r and frame rate simultaneously. Imagecaptured from the live video frame will also be displayed in another new windowcalled “Image Captured” and it will be saved as .JPG picture <strong>for</strong>mat. The windowwill update the new captured <strong>image</strong> automatically when the new <strong>image</strong> is available.


38Figure 4.10 Live video <strong>time</strong>r and frame rate display on window consoleFigure 4.10 shows the <strong>real</strong>-<strong>time</strong> <strong>time</strong>r and frame rate in<strong>for</strong>mation and Figure4. 11 shows <strong>image</strong>s captured from the live video in certain period.


Figure 4.11(a) Images captured from live video in specific period (set 1)39


40Figure 4.11(b) Images captured from live video in specific period (set 2)4.2.2 Basler IP Camera Offline Video ModeAfter the user inserts „2‟ in the mode selection, program will enter into case 2,which is offline video mode. Program will check the existence file of the targetedoffline video. If the offline video is not available in specific location, a notificationwill appear in the window console to show that video is not loaded as shown inFigure 4.12.


41Figure 4.12 Video undetected screen shotWhen the offline video is detected by the application, a new message will bedisplayed to the user in window console. Figure 4.13 show the display messagewhen the video is detected:-Figure 4.13 Video detected screen shot


42Then, the user can insert capture rate to determine the period <strong>for</strong> the programto capture one <strong>image</strong> from the offline video frame. In this stage, the input value willbe verified by the program to ensure that it is a valid number; otherwise the user isrequired to key in new input again.Similar to the <strong>real</strong>-<strong>time</strong> video streaming mode; a new window called “OfflineVideo” will be created when the capture rate is inserted correctly.Figure 4.14 Offline video <strong>time</strong>r and frame rate display on window consoleTimer and frame rate of the offline video will be printed in window consoleas shown in Figure 4.14. New <strong>image</strong> is grabbed from offline video frame fromspecific period based on the capture rate user key inserted. The <strong>image</strong>s are capturedcontinuously from offline video as shown as Figure 4.15 below:-


Figure 4.15(a) Images captured from offline video in specific period (set 1)43


44Figure 4.15(b) Images captured from offline video in specific period (set 2)4.3 Per<strong>for</strong>mance AnalysisFrom the <strong>real</strong>-<strong>time</strong> streaming video display, the quality of the video is clearand smooth enough compared to that of using web browser to display. Other thanthat, <strong>for</strong> comparison in term of delay between developed application and webbrowser, <strong>real</strong>-<strong>time</strong> streaming video display through the developed application gave avery small delay <strong>time</strong> so it produced a very smooth display on the screen.


45The sample frame of the <strong>real</strong>-<strong>time</strong> video was taken from 4.08:28pm to4.09:00pm on 18 May 2012. Based on the results from the captured <strong>image</strong> on Figure4.11(a), the application captured 6 frames from live video which consisted of <strong>car</strong><strong>plate</strong> <strong>image</strong>s. However, <strong>car</strong> <strong>plate</strong> <strong>image</strong> does not exist in 3 out of 6 pictures in Figure4.11(b) because there is no <strong>car</strong> appears in the live video while the Basler IP camera isstill <strong>capturing</strong> the frame. This kind of picture will cause a lot of data redundancysince it is pointless <strong>for</strong> <strong>car</strong> <strong>plate</strong> <strong>recognition</strong> <strong>system</strong> extract the <strong>car</strong> <strong>plate</strong> characterfrom the picture that is without <strong>car</strong> <strong>plate</strong> <strong>image</strong> inside.The length of the offline video recorded by using BIP viewer is 3 minutes and31 second. The sample frame capture from offline video is starting at 1 minute and20 second until 1 minute and 38 second. By referring to 2 sets of picture in Figure4.15(a) and Figure 4.15(b), 10 out of 12 <strong>image</strong>s consisted of clear <strong>car</strong> <strong>plate</strong> <strong>image</strong>.The <strong>car</strong> <strong>plate</strong> <strong>image</strong> cannot be seeing clearly in the remaining 2 pictures. Thisphenomenon appears because of few reasons as stated below:-a. The license <strong>plate</strong> of the following <strong>car</strong> is blocked by the body of the <strong>car</strong>leading in front as shown in Figure 4.16:-Figure 4.16 Car <strong>plate</strong> is blocked by body of vehicle leading in front of it


46b. There is no license <strong>plate</strong> attached on vehicle as shown in Figure 4.17:-Figure 4.17 No license <strong>plate</strong> attached on the vehiclec. The license <strong>plate</strong> is blocked by the bumper installed at front of vehicle asshown in Figure 4.18:-Figure 4.18 Vehicle <strong>plate</strong> blocked by installed bumper


47According to the <strong>real</strong>-<strong>time</strong> video captured from 4.05:00pm to 4.22:32pm on18 May 2012, there are 358 <strong>image</strong>s saved at the capture rate of 3000 milliseconds.In the 358 <strong>image</strong>s, 145 <strong>car</strong>s are leaving the UTM main door. There were 110 out of145 <strong>car</strong> <strong>plate</strong>s were displayed clearly. The remaining of 35 <strong>car</strong> <strong>plate</strong> is either blurredor blocked by other vehicle. The efficiency of application to capture a clear license<strong>plate</strong> <strong>image</strong> at the specific period is 110145× 100% = 75. 86% .For the offline video with the length of 3 minutes and 31 seconds recorded on18 May 2012, application captured 121 <strong>image</strong>s at the capture rate of 2000milliseconds. Among 121 <strong>image</strong>s, 40 <strong>car</strong>s were detected leaving the UTM maindoor. There were 39 out of 40 <strong>car</strong> <strong>plate</strong>s displayed distinctly and 1 <strong>car</strong> <strong>plate</strong> wasblocked by the body of vehicle that leading in front of it. Hence, the efficiency of theapplication to obtain clear license <strong>plate</strong> <strong>image</strong> in offline video mode is 3940 × 100% =97. 50% .Based on the efficiency of <strong>capturing</strong> a clear license <strong>plate</strong> <strong>image</strong> above, it canbe increased further by shortening the capture rate value. When the capture ratevalue is decreased, more <strong>real</strong>-<strong>time</strong> or offline video frame will be grabbed within thespecific period. The more <strong>image</strong>s captured and saved in the application, the higher isthe chance to obtain a clear license <strong>plate</strong>. However, the method of decreasingcapture rate value is not an effective way. This is because the space of hard disk willbe occupied and saturated easily due to a large number of <strong>image</strong>s saved from <strong>time</strong> to<strong>time</strong>. Besides that, it will also slow down the <strong>capturing</strong> <strong>system</strong> because there will bea lot of data be processed simultaneously.


CHAPTER 5CONCLUSION AND RECOMMENDATION5.1 ConclusionThe <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> <strong>system</strong> <strong>for</strong> <strong>car</strong> <strong>plate</strong> <strong>recognition</strong> is successfullydone and implemented in the main exit location of Universiti Teknologi Malaysia.Basler IP camera BIP2-640c is integrated with Intel Desktop Board D525MWcompletely. The developed application can retrieve the <strong>real</strong>-<strong>time</strong> video signal fromthe Basler IP camera and display it through the board. Quality of the <strong>real</strong>-<strong>time</strong>streaming video display through developed application is better and smoothercompared to that of using web browser. The license <strong>plate</strong> frame is saved from the<strong>real</strong>-<strong>time</strong> streaming video and offline based on the capture rate user inserted. By<strong>capturing</strong> a clear <strong>image</strong> of license <strong>plate</strong>, it will increase the accuracy of Real-<strong>time</strong>Car Plate Recognition System to extract out the correct license <strong>plate</strong> character in theoptical character <strong>recognition</strong> process. In general, the objectives of this projectmentioned in chapter 1 have been achieved. Nevertheless, there are still rooms toimprove the project of <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> <strong>system</strong>.5.2 Future RecommendationWhen the developed application is running and starting to capture license<strong>plate</strong>, it will also capture <strong>image</strong> without existence of vehicle. This causes a lot ofdata redundancy that will slow down <strong>system</strong> per<strong>for</strong>mance in the character


49<strong>recognition</strong> process. In order to improve the <strong>system</strong>, there are few recommendationsare suggested so that the <strong>system</strong> can capture a clear <strong>car</strong> <strong>plate</strong> <strong>image</strong> when a vehicle isappear and approaching to the camera lens.First and <strong>for</strong>emost, a hardware triggering device such as sensor can be addedassociate with <strong>real</strong>-<strong>time</strong> video streaming from Basler IP camera. When there isvehicle approaching to the camera lens, a weight sensor can be used to activate thedeveloped application to start the <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong> process. As the result,the <strong>system</strong> will only start to capture license <strong>plate</strong> when a vehicle is approaching untilspecific distance from camera lens. So only the <strong>image</strong>s that consist of license <strong>plate</strong><strong>image</strong> will be saved during <strong>real</strong>-<strong>time</strong> <strong>image</strong> <strong>capturing</strong>. The <strong>system</strong> will terminate the<strong>image</strong> <strong>capturing</strong> process automatically when there is no vehicle detected by theweight sensor.Besides using the hardware sensor, it can also detect the existence of vehicleby modify C++ source code of the developed application. Detection of frame pixelchanging technique can be added into the source code to enhance the <strong>system</strong> in termof <strong>image</strong> <strong>capturing</strong> process. For example, when vehicles are appeared in the video,pixel of the frame will be changed and different with default pixel value of thebackground location. This changing will activate the <strong>image</strong> <strong>capturing</strong> process so thatthe <strong>system</strong> will start <strong>image</strong> <strong>capturing</strong> process when vehicles appear in the videoframe. Hence only clear <strong>image</strong>s that consist of license <strong>plate</strong> will be captured by the<strong>system</strong> at the targeted location.By applying the recommendations mentioned above, data redundancyproblem can be resolved easily and then improve efficiency of <strong>real</strong>-<strong>time</strong> <strong>image</strong><strong>capturing</strong> <strong>system</strong> <strong>for</strong> <strong>car</strong> <strong>plate</strong> <strong>recognition</strong> in the future project development.


50REFERENCES1. Toral, S.L., E.S. Ing., Univ. of Seville, Seville, Spain, Torres, M.R.M.,Barrero, F.J. and Arahal, M.R.. Current Paradigms in IntelligentTransportation Systems. IEEE. 2010.2. Siti Norul Huda Sheikh Abdullah, Marzuki Khalid and Rubiyah Yusof.Comparison of Feature Extractors in Licence Plate Recognition. IEEE. 2007.3. Dr Bob Banerjee. Video Compression <strong>for</strong> CCTV. New York: Bosch SecuritySystems Publisher. 1-10. 2010.4. Nor Amizam Jusoh and Jasni Mohamad Zain. Communications in Computerand In<strong>for</strong>mation Science. Journal of Software Engineering and ComputerSystems, Vol. 59, Part 10. 2011: Pages 581-5915. Manuel Vargas, Sergio L. Toral, Federico Barrero and Francisco Cortés.Lecture Notes in Computer Science, ICIAP–Image Analysis and ProcessingVol. 5716. 2009: Pages 317-3266. Wikipedia Article. Automatic Number Plate Recognition retrieved November,1, 2011 fromhttp://en.wikipedia.org/wiki/Automatic_number_<strong>plate</strong>_<strong>recognition</strong>#Imaging_Hardware7. Anpr-tutorial.com. The Automatic Number Plate Recognition Tutorialretrieved November, 4, 2011 from http://www.anpr-tutorial.com


518. Axis Communications. Progressive Scan vs. Interlaced Video retrievedNovember, 9, 2011 fromhttp://www.axis.com/products/video/camera/progressive_scan.htm9. Wikipedia Article. IP Camera retrieved November, 19, 2011 fromhttp://en.wikipedia.org/wiki/IP_camera10. Wikipedia Article. Network Video Recorder retrieved November, 30, 2011from http://en.wikipedia.org/wiki/Network_Video_Recorder11. ViSEC Surveillance Software. License Plate Recognition Module retrievedDecember, 11, 2011 from http://visecpro.com/lpr.htm12. Nashruddin.com. Streaming OpenCV Videos Over the Network retrievedDecember, 19, 2011 fromhttp://nashruddin.com/Streaming_OpenCV_Videos_Over_the_Network13. Code Project. Camera Vision - Video Surveillance on C# retrieved December,15, 2011 fromhttp://www.codeproject.com/KB/audio-video/cameraviewer.aspx14. Richard C. Leinecker, Tom Archer. Visual C++ 6 Bible. New York: IBGBooks Worldwide Publisher. 4-5; 1998.15. Gary Bradski and Adrian Kaehler. Learning OpenCV. United States: O’ReillyMedia Publisher. 1-2; 2008.16. Basler Vision Technologies. Installation Guide of Basler IP Fixed BoxCameras. Ahrensburg, Germany. Basler Vision Technologies Publisher. 4-6;2011.


52APPENDIX AProject Gantt ChartNoTask1 BriefingFind project2titleLiterature3reviewProposal4writingIP camera5studyIntel atom6board studySoftware7 implementationstudyIntel board8 plat<strong>for</strong>mtraining9 Presentation10 Report writingWeek2 3 4 5 6 7 8 9 10 11 12 13 14 15 16Table A.1 Gantt chart <strong>for</strong> 2011/2012 semester 1


53NoTaskWindow1 environmentinstallationMicrosoft2 Visual C++studyOpenCV3 libraryLearningProgramming<strong>for</strong> live video4streamingdisplayCaptured<strong>image</strong> from5 <strong>real</strong>-<strong>time</strong>streamingvideoCaptured6 <strong>image</strong> fromoffline videoMode7combination8 Project setup7 Presentation8 Thesis writingWeek1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17Table A.2 Gantt chart <strong>for</strong> 2011/2012 semester 2


54APPENDIX BSource Code of Developed Application#include "stdafx.h"#include #include "cv.h"#include "highgui.h"#include "conio.h"#include #include #include "iostream"using namespace std;int main(){int x;// declare selection mode variablestring y;// declare stringint z;// declare capture rate variableint counter=1; // declare counter <strong>for</strong> first <strong>image</strong> namestringstream stream; // declare function of stringstreamdouble t, ms = 0; // declare default value of <strong>time</strong>char buffer[1000]; // declare maximum of <strong>image</strong> capturecout


55// check existence of cameraif (camera == NULL){cout


56if (frame){imgColor = frame;// obtain tick count <strong>for</strong> <strong>time</strong>rt = (double)cvGetTickCount() - t;// obtain tick frequency from CPUms += t/((double)cvGetTickFrequency() * 1000.0);// autosave <strong>image</strong> every "z" secondsif (ceil(ms) >= z){// show <strong>image</strong> capturedcvShowImage("Image Captured", imgColor);// save <strong>image</strong> with different namesprintf(buffer,"C:/Users/UTMFKE/Desktop/Saved Images/Real Time/Image %u.jpg", counter);cout


57// pointer <strong>for</strong> re-insert capture ratestart2:cout > y;<strong>for</strong>(int i = 0; i < y.length(); i++){// check whether each string input is character or notif(y[i] < '0' || y[i] > '9'){cout z;cout


58// save <strong>image</strong>cvSaveImage(buffer, imgColor);counter++;ms = 0;}}}cvReleaseCapture(&video);}break;default:{cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!