Computer Vision. License Plate Recognition Klaas Dijkstra - Jaap van de Loosdrecht



Similar documents
Computer Vision. Color image processing. 25 August 2014

Computer Vision. Image math. Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

Computer Vision: Machine Vision Filters. Computer Vision. Optical Filters. 25 August 2014

T O B C A T C A S E G E O V I S A T DETECTIE E N B L U R R I N G V A N P E R S O N E N IN P A N O R A MISCHE BEELDEN

E27 SPRING 2013 ZUCKER PROJECT 2 PROJECT 2 AUGMENTED REALITY GAMING SYSTEM

ROBOTRACKER A SYSTEM FOR TRACKING MULTIPLE ROBOTS IN REAL TIME. by Alex Sirota, alex@elbrus.com

Using MATLAB to Measure the Diameter of an Object within an Image

Using the Java Vision Sample Program

Computer Vision. VisionLab development environment. 1 July 2009

Computer vision. 3D Stereo camera Bumblebee. 25 August 2014

INTERNAL USE ONLY (Set it to white if you do not need it)

PREPARING PHOTOS for PRINTING

AngioSys 2.0 Image Analysis Software Manual

Mouse Control using a Web Camera based on Colour Detection

Analecta Vol. 8, No. 2 ISSN

OPERATION MANUAL. MV-410RGB Layout Editor. Version 2.1- higher

Android and OpenCV Tutorial

How To Train A Face Recognition In Python And Opencv

A Tutorial on dynamic networks. By Clement Levallois, Erasmus University Rotterdam

User Management Resource Administrator. UMRA Example Projects. Service Management

VEHICLE LOCALISATION AND CLASSIFICATION IN URBAN CCTV STREAMS

Windows PowerShell Essentials

Neural Network based Vehicle Classification for Intelligent Traffic Control

Nursery Phone App Tutorial

A pixlogic White Paper 4984 El Camino Real Suite 205 Los Altos, CA T

Programming Exercise 3: Multi-class Classification and Neural Networks

Affdex SDK for Windows!

Business Mobile Deposit User Guide. 1.0 Registration

First Bytes Programming Lab 2

Turnitin Blackboard 9.0 Integration Instructor User Manual

Speed Performance Improvement of Vehicle Blob Tracking System

Simplified Machine Learning for CUDA. Umar

Corsair Link v2.4 Manual. Initial Set-up. Placing devices within the chassis

FIRST Robotics Competition (FRC) Application Programming Interface (API) Specification For Machine Vision

Computer Vision. VisionLab development environment. 25 August 2014

Easy Manage Helpdesk Guide version 5.4

Visual Structure Analysis of Flow Charts in Patent Images

Implementation of OCR Based on Template Matching and Integrating it in Android Application

Performance Measures for Machine Learning

Forest Stewardship Council

Automatic License Plate Recognition using Python and OpenCV

Adjusting Digitial Camera Resolution

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game

COMMON CUSTOMIZATIONS

MetaMorph Software Basic Analysis Guide The use of measurements and journals

Netigate User Guide. Setup Introduction Questions Text box Text area Radio buttons Radio buttons Weighted...

INTRODUCTION IMAGE PROCESSING >INTRODUCTION & HUMAN VISION UTRECHT UNIVERSITY RONALD POPPE

Rapid Application Development for Machine Vision A New Approach

Make and Model Recognition of Cars

Contents. A July 2008 i

SOLAROX RGB-Master Pro LAN. RGB-Master Pro LAN. Network-compatible RGBW Controller -

Lesson 10: Video-Out Interface

Top 10 Things to Know about WRDS

Portal Connector Fields and Widgets Technical Documentation

Part 1 Foundations of object orientation

Fast Paced Strategy Mobile Game

Computer Vision. Image acquisition. 25 August Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

Face detection is a process of localizing and extracting the face region from the

Machine Learning Approach for Estimating Sensor Deployment Regions on Satellite Images

OPINION MINING IN PRODUCT REVIEW SYSTEM USING BIG DATA TECHNOLOGY HADOOP

EdX Learner s Guide. Release

REAL TIME TRAFFIC LIGHT CONTROL USING IMAGE PROCESSING

Data Mining Algorithms Part 1. Dejan Sarka

Develop a Hello World project in Android Studio Capture, process, store, and display an image. Other sensors on Android phones

ADVANCES IN AUTOMATIC OPTICAL INSPECTION: GRAY SCALE CORRELATION vs. VECTORAL IMAGING

Optical Character Recognition. Joerg Schulenburg, LinuxTag 2005 GOCR

App Building Guidelines

Installation and Operating Instructions for the FluidX IntelliCode software Rev 1, release date: July 2014

Rapid Android Development

TaskitPro. Task and Job Management. User Manual Version 1

19th International Conference on Mechatronics and Machine Vision in Practice (M2VIP12), 28-30th Nov 2012, Auckland, New-Zealand

Avigilon Control Center Web Client User Guide

Excel Database Management

User Tutorial on Changing Frame Size, Window Size, and Screen Resolution for The Original Version of The Cancer-Rates.Info/NJ Application

1. Classification problems

How To Change Your Site On Drupal Cloud On A Pcode On A Microsoft Powerstone On A Macbook Or Ipad (For Free) On A Freebie (For A Free Download) On An Ipad Or Ipa (For

Flood Warning System Implementation Manual

Laser Gesture Recognition for Human Machine Interaction

Handwritten Character Recognition from Bank Cheque

Converting an AutoCAD Drawing into PDF File

Learn about OCR: Optical Character Recognition Track, Trace & Control Solutions

Project 2: Bejeweled

SIF Validation Tool. Wages Protection System Qatar Central Bank& Ministry of Labour And Social Affairs. End User Guide

#include <Gamer.h> Gamer gamer; void setup() { gamer.begin(); } void loop() {

The Darwin Game 2.0 Programming Guide

Poker Vision: Playing Cards and Chips Identification based on Image Processing

Form Design Guidelines Part of the Best-Practices Handbook. Form Design Guidelines

CS1112 Spring 2014 Project 4. Objectives. 3 Pixelation for Identity Protection. due Thursday, 3/27, at 11pm

Automatic Detection of PCB Defects

FSI Machine Vision Training Programs

PANTONE Solid to Process

Understanding Megapixel Camera Technology for Network Video Surveillance Systems. Glenn Adair

Chapter I Model801, Model802 Functions and Features

Video Surveillance System for Security Applications

CREATING YOUR OWN PROFESSIONAL WEBSITE

CS231M Project Report - Automated Real-Time Face Tracking and Blending

Lazy OpenCV installation and use with Visual Studio

Designing a Graphical User Interface

Creating tables in Microsoft Access 2007

Designing for Mobile. Jonathan Wallace

Transcription:

Computer Vision License Plate Recognition Klaas Dijkstra - Jaap van de Loosdrecht 25 August 2014 Copyright 2001 2014 by NHL University of Applied Sciences and Van de Loosdrecht Machine Vision BV All rights reserved j.van.de.loosdrecht@tech.nhl.nl, k.dijkstra@tech.nhl.nl, jaap@vdlmv.nl High demand for software engineers with computer vision experience Quality control and quality insurance become more important Efficient and effective Recall actions Availability of low cost vision solutions PC + camera Intelligent camera Cellphone Using libraries (No development from scratch) Structured testing Evaluation of large datasets Applications Industry Gaming Surveillence Augmented reality 26-8-2014 License plate recognition 2 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 1

Demo Framework Find License Plate Find Characters Match Plate Lexicon 26-8-2014 License plate recognition 3 Licenseplate recognition competition Goal Planning Example Rules Matching Not using a lexicon Using a lexicon Rejecting classification results Framework VisionLab Components Finding the license plate Finding the characters Reading the licenseplate C# Application User interface UML() Overview Appendix Generating the pattern matcher file 26-8-2014 License plate recognition 4 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 2

Goal Next week (homework): Take 50 photo s of license plates (each student) Taken with sensible white balance and exposure Different Angles / Lighting conditions All Dutch rectangular car license plates (yellow) One licenseplate per image (fully visible) File format: XXXXXX.jpg example: RVLG20.jpg, FBCG13.jpg, FBCG13-2.jpg, FBCG13-3.jpg etc. Before the end of the course (Deliverables) 1) C# software for reading license plates 2) Report, with focus on the creativity of your solution 26-8-2014 License plate recognition 5 Homework: Week 1 4 Week 5 Week 6 Week 7 Planning : Theory and assignments : Finish LicensePlateMatcher.FindPlate() in C# or Finish find_plate.jls in VisionLab : Finish LicensePlateMatcher.FindCharacters() in C# or Finish find_characters.jls in VisionLab : Fully functional Extra - Questions - Receive final set - Receive minimum score Midterm week - Final competition - Report - No tweaking possible! 26-8-2014 License plate recognition 6 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 3

Examples 26-8-2014 License plate recognition 7 Not using the lexicon! Rules Scoring: 1 point for each correctly matched licenseplate 0 points for each unrecognized licenseplate 10 penalty points for each incorrectly recognized licenseplate Grading: 1) Based on competencies of the course 2) Result of the competition on a selection of the photos 3) Minimum number of points will be determined after the selection of photos has been made 4) +1 for 1 st and 2 nd place (For the whole group) 26-8-2014 License plate recognition 8 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 4

Matching 26-8-2014 License plate recognition 9 No Lexicon Approach 1. Match every character 2. Take character with the lowest error 3. Calculate confidence Applications: Toll roads Speed camera s 26-8-2014 License plate recognition 10 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 5

No Lexicon 1st 2nd 3nd 0 0.07 3 0.10 M 0.21 Z 0.08 H 0.58 Z 0.10 O 0.18 5 0.22 H 0.22 2 0.16 N 0.20 2 0.16 D 0.20 S 0.24 N 0.28 E 0.23 M 0.27 1 0.24 Green = Correct Blue = Not matched Red = Incorrect Gray = Error Confidence: 0.61 0.61 0.18 0.59 0.75 0.44 03MZHZ is incorrect! 26-8-2014 License plate recognition 11 Lexicon Approach 1. Match every character 2. Match license plate to all possible license plates 3. Take plate with the lowest error for a whole word 4. Calculate confidence Applications: Limited entry Camp sites Car parks 26-8-2014 License plate recognition 12 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 6

Lexicon 1st 2nd 3nd 0 0.07 3 0.10 M 0.21 Z 0.08 H 0.58 Z 0.10 O 0.18 5 0.22 H 0.22 2 0.16 N 0.20 2 0.16 D 0.20 S 0.24 N 0.28 E 0.23 M 0.27 1 0.24 Confidence: 0.44 Green = Correct Blue = Not matched Red = Incorrect Gray = Error 03MZHZ is not a word in the lexicon 03HZHZ is chosen instead, which is correct! 26-8-2014 License plate recognition 13 Rejection 1. Reject confidences below a certain value to detect mismatches. 2. Check ground-truth agains the match result 3. Count instances for each category (TP, FP, FN, TN) 4. Score = True Positives - (10 * False Positives) Confusion matrix Match result Accept Reject Check with ground-truth Correct True Positive False Negative Incorrect False Positive True Negative Confidence threshold Confidence threshold is a tunable parameter: Decreasing will move False Negatives to True Positives which is good Decreasing will move True Negatives to False Positives which is bad The opposite is true for increasing When trying to improve the overall performance (True Positives and True Negatives) the vision method or parameters have te be improved 26-8-2014 License plate recognition 14 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 7

Framework 26-8-2014 License plate recognition 15 VisionLab VisionLab is used for image processing (www.vdlmv.nl): Image processing algorithms Pattern matching Neural networks Genetic algorithms Algorithms written in ANSI C++ OpenMP OpenCL Portable software: Windows, Linux and Android x86, x64, ARM and PowerPC 26-8-2014 License plate recognition 16 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 8

Components frmmain.cs GUI, Initialization, main loop and administration LicensePlate.cs License plate datastructures LicensePlateMatcher.cs LicensePlateMatcherScript.cs Functions for the actual licenseplate recognition VisionLabEx.cs C# C++ compatibility functions for VisionLab VisionLab class Computer Vision library 26-8-2014 License plate recognition 17 LicensePlate.cs public class LicenseCharacter { public LicenseCharacter(string character, double error, double confidence) public string character() public double error() public double confidence() public new string ToString() } public class LicensePlate { public LicensePlate() public double confidence public List<LicenseCharacter> characters public string getlicenseplateerrorsstring() public string getlicenseplatestring() public new string ToString() } 26-8-2014 License plate recognition 18 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 9

LicensePlateMatcher.cs Functions for finding and reading license plate using VisionLab C# library public class LicensePlateMatcher { public static bool FindPlate( RGB888Image plateimage, ref Int32Image binaryplateimage) public static bool FindCharacters( RGB888Image plateimage, Int32Image binaryplateimage, ref Int32Image labeledrectifiedplateimage) } public static bool MatchPlate( Int32Image binaryrectifiedplateimage, BlobMatcher_Int32 matcher, ClassLexicon lexicon, ref LicensePlate result, ref LicensePlate lexiconresult) 26-8-2014 License plate recognition 19 LicensePlateMatcherScript.cs Functions for finding and reading license plate using VisionLab.JL scripts public class LicensePlateMatcher { public static bool Init() // Read scripts and pattern matcher // initialize command interpreter public static bool FindPlate( RGB888Image plateimage, ref Int32Image binaryplateimage) public static bool FindCharacters( RGB888Image plateimage, Int32Image binaryplateimage, ref Int32Image labeledrectifiedplateimage) } public static bool MatchPlate( Int32Image binaryrectifiedplateimage ref LicensePlate result) 26-8-2014 License plate recognition 20 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 10

Production phase license recognition FindPlate () FindCharacters () MatchPlate () 14DHJJ Lexicon result 0.7 Lexicon confidence 140HJJ Match result 0.6 Error char 1 0.7 Error char 2 0.3 Error char 3 0.8 Error char 4 0.7 Error char 5 0.8 Error char 6 26-8-2014 License plate recognition 21 Finding the license plate 26-8-2014 License plate recognition 22 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 11

public static bool FindPlate () Description: Find the largest license plate in the image 1. Segment using ThresholdHSVchannels 2. Remove blobs which are not license plates Input: //Original image RGB888Image plateimage Output: //Segmented license plate ref Int32Image binaryplateimage Return: //License plate found? bool 26-8-2014 License plate recognition 23 $ServerScript = IsServerScript if $ServerScript === false //Copy script selected image (F6) copy %currentimage OriginalImage else //Copy first image passed by C# copy %p1 OriginalImage endif IsServerScript if $ServerScript === false display LicensePlateBin else //Copy result image back to C# copy LicensePlateBin %p2 endif If IsServerScript returns true, the script is being executed from C#. If IsServerScript returns false, the script is being executed from the VisionLab Client. This can be used to autodetect if images are passed by C# or if selected images in VisionLab should be used. This is convenient for debugging scripts. 26-8-2014 License plate recognition 24 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 12

find_plate.jls $ServerScript = IsServerScript if $ServerScript === false //Copy script selected image (F6) copy %currentimage OriginalImage else //Copy first image passed by C# copy %p1 OriginalImage endif //Convert from RGB888Image to HSV888Image FastRGBToHSV OriginalImage OriginalImage //***********************************// //*** Exercise: Find license plate **// //***********************************// //Threshold HSV ThresholdHSVchannels OriginalImage LicensePlateBin Int32Image 21 50 100 255 100 255 //Remove small blobs RemoveBlobs LicensePlateBin EightConnected Area 1 5000 UseX //Fill up characters FillHoles LicensePlateBin FourConnected if $ServerScript === false display LicensePlateBin else //Copy result image back to C# copy LicensePlateBin %p2 Endif //Return true, if pixels found $sum = SumIntPixels LicensePlateBin if $sum > 0 then return true else return false endif 26-8-2014 License plate recognition 25 public static bool FindPlate( RGB888Image plateimage, ref Int32Image binaryplateimage ){ const int c_threshold_h_min = 21; const int c_threshold_h_max = 50; const int c_threshold_s_min = 100; const int c_threshold_s_max = 255; const int c_threshold_v_min = 100; const int c_threshold_v_max = 255; const int c_remove_blobs_min = 1; const int c_remove_blobs_max = 5000; HSV888Image plateimagehsv = new HSV888Image(); //Convert to RGB to HSV VisionLab.Convert(plateImage, plateimagehsv); //*******************************// //** Exercise: **// //** adjust licenseplate **// //** segmentation **// //*******************************// LicensePlateMatcher.FindPlate() //Threshold HSV image VisionLab.Threshold3Channels( plateimagehsv, binaryplateimage, c_threshold_h_min, c_threshold_h_max, c_threshold_s_min, c_threshold_s_max, c_threshold_v_min, c_threshold_v_max //Remove blobs with small areas VisionLab.RemoveBlobs( binaryplateimage, Connected.EightConnected, BlobAnalyse.BA_Area, c_remove_blobs_min, c_remove_blobs_max); //Fill up characters VisionLab.FillHoles(binaryPlateImage, Connected.FourConnected); } plateimagehsv.dispose(); //Return true, if pixels found return (VisionLab.SumIntPixels(binaryPlateImage) > 0); 26-8-2014 License plate recognition 26 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 13

LicensePlateMatcherScript.FindPlate() public static bool FindPlate( RGB888Image plateimage, ref Int32Image binaryplateimage ){ //Upload image to VisionLab command interpreter VisionLab.SetRGB888Image(cmdInt, "plateimage", plateimage); //Execute scrip using the icall command String result = StripTime( cmdint.execrequest("icall FindPlate plateimage, binaryplateimage") ); //Download result image from VisionLab command interpreter VisionLab.GetInt32Image(cmdInt, "binaryplateimage", binaryplateimage); } //Return if the script returned true or false return (result == "true"); 26-8-2014 License plate recognition 27 Solutions brainstorm for finding the license plate 1. Tune ThresholdHSVChannels Find darkest and brightest yellow license plates Analyse HSV values, apply values, test values 2. Tune RemoveBlobs Find smallest and largest licensplate Analyse Area, apply criteria, test criteria 3. Add additional criteria Add RemoveBlobs line using LengthBreadthRatio as a feature Add RemoveBlobs using additional features 4. Add additional segmentation functions Use a different alternativethreshold values 5. Etcetera This will score points 26-8-2014 License plate recognition 28 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 14

Finding the characters 26-8-2014 License plate recognition 29 public static bool FindCharacters () Description: Locates the characters of the license plate - Warp image (Rectify) - Segment characters - Remove blobs which are to small (Lines between characters) Input: //Original image RGB888Image plateimage //Segmented license plate Int32Image binaryplateimage Output: //Image containing binary six characters ref Int32Image binarycharacterimage Return: //Function executed successfully bool 26-8-2014 License plate recognition 30 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 15

find_characters.jls $ServerScript = IsServerScript if $ServerScript === false //copy script selected image (F6) and second selected image (F5) copy %currentimage OriginalImage copy %secondimage LicensePlateBin else //Copy first and second image passed by C# copy %p1 OriginalImage copy %p2 LicensePlateBin Endif //Find corner points of the license plate $found = FindCornersRectangle LicensePlateBin EightConnected 0.5 Landscape &$tab if $found then //Warp (rectify) licenseplate Warp OriginalImage binarycharacterimage ForwardT $tab[0] $tab[1] $tab[2] $tab[3] 100 470 0 NearestPixelInterpolation //**********************************************// //*** Exercise: Find license plate characters **// //**********************************************// Convert binarycharacterimage binarycharacterimage Int32Image //Automatic threshold finds black letters ThresholdIsodata binarycharacterimage DarkObject //Remove all blobs connected to the border RemoveborderBlobs binarycharacterimage EightConnected AllBorders //Remove all blobs with an area less than 400 RemoveBlobs binarycharacterimage EightConnected Area 1 400 UseX if $ServerScript === false display BinaryCharacterImage else //Copy result image back to C# copy BinaryCharacterImage %p3 endif return true else return false endif26-8-2014 License plate recognition 31 Solutions brainstorm for finding characters 1. Try FindCornersRectangeSq operator/function Instead of FindCornersRectangle 2. Tune RemoveBlobs Find smallest and largest licenseplate Analyse Area, apply criteria, test criteria 3. Add additional criteria Add RemoveBlobs using additional features 4. Add additional segmentation functions Use a few different Threshold values and methods (manual vs. automatic) 5. Use a background correction Subtract the background 6. Use a different color space Use HSV 7. Use binary morphological filters to dilate or erode blobs Try making the blobs more like the characters in the.pm file 8. Etcetera This will score points 26-8-2014 License plate recognition 32 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 16

Reading the license plate 26-8-2014 License plate recognition 33 public static bool MatchPlate () Description: Read the license plate Input: //Rectified license plate image containing six characters Int32Image labeledrectifiedplateimage BlobMatcher_Int32 matcher //initialized blobmatcher ClassLexicon lexicon //initialized lexicon Output: //Result by the blob matcher ref LicensePlate result //Result by the lexicon ref LicensePlate lexiconresult Return: //six characters found? bool 03HZHZ 0.61 03MZHZ 0.67 0.61 0.18 0.59 26-8-2014 License plate recognition 34 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 17

match_plate.jls (Part I) $ServerScript = IsServerScript if $ServerScript === false //Copy third selected image (Operator->Select 3rd) copy %thirdimage LicensePlateRectifiedBin $lpwd = lpwd cwd $lpwd PM_ReadFromFile PatternMatcher../VL/lic_fonts.pm //Read pattern matcher file else copy %p1 LicensePlateRectifiedBin Endif //Analyse blobs locations copy LicensePlateRectifiedBin LicensePlateRectifiedLabel labelblobs LicensePlateRectifiedLabel EightConnected $maxblobindex = BlobAnalysisArray LicensePlateRectifiedLabel &$tab SortDown TopLeft UseX Height TopLeft Width if $maxblobindex!== 5 then //Check if 5 characters were found return false Endif 26-8-2014 License plate recognition 35 match_plate.jls (Part II) //Begin matching in a for loop SetSizeArray &$errors 0 $matches = "" $confidence = 1000 for $i = 0 to $maxblobindex do VarToArray &$tab[$i] &$elm $label = $elm[0] $h = $elm[1] $tl = $elm[2] $w = $elm[3] $x = getnthfromvector 1 $tl $y = getnthfromvector 2 $tl ROI LicensePlateRectifiedBin LicensePlateRectifiedBinROI $x $y $h $w $bestmatch = PM_BestMatch LicensePlateRectifiedBinROI PatternMatcher -0.5 0.5 //Match $patternid = GetNthWord 1 $bestmatch //Get pattern ID $conf = GetNthWord 2 $bestmatch //Get confidence $error = GetNthWord 3 $bestmatch //Get error $patternname = PM_PatternName PatternMatcher $patternid //Convert pattern ID to confidence if $conf < $confidence //Keep lowest character confidence as license plate confidence $confidence = $conf endif $errors[$i] = $error $matches = $matches. $patternname endfor //Return results ArrayToVar &$errors &$errors $result = concat $matches $confidence $errors return 26-8-2014 $result License plate recognition 36 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 18

Solutions brainstorm for reading the license plate 1. Adapt pattern matcher (.pm file) Analyze which characters occur in real license plates Use a different font in the.pm file 2. Check or correct license plate grammar D3-HF-BR is not very likely to be a license plate, while 03-HF-BR is 3. Use separate matchers for numbers and letters Use two.pm files 4. Etcetera This will score points 03HZHZ 0.61 03MZHZ 0.67 0.61 0.18 0.59 26-8-2014 License plate recognition 37 Framework 26-8-2014 License plate recognition 38 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 19

1. Images to be processed 4 2 1 2. Current score 3. Begin processing 4. Output images from LicensePlateMatcher (Script) 5 3 5. Reject below this confidence divided by 10 6. Match result from current licenseplate 6 7. Functions return values for these licenseplates 8. True Positive (Correct match and high confidence) 9. Reject (Confidence is too low) 8 7 9 10 10. False Positive (Confidence is high, but match is wrong) 26-8-2014 License plate recognition 39 26-8-2014 License plate recognition 40 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 20

Appendices 26-8-2014 License plate recognition 41 public void frmmain.displayblobs () Description: Display features of the blob to the debugging output of C# Input: //Binary image containing the blobs Image binaryimage Effect: //Blob features to the output * Note: only works in debug mode 26-8-2014 License plate recognition 42 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 21

public void DisplayBlobs(Image binaryimage) { vector_blobanalyse ba = new vector_blobanalyse(); vector_blob blobs = new vector_blob(); ba.add(blobanalyse.ba_area); ba.add(blobanalyse.ba_eccentricity); ba.add(blobanalyse.ba_lengthbreadthratio); VisionLabEx.GetBlobsInfo(binaryImage, ba, ref blobs); System.Diagnostics.Debug.WriteLine("Blob Info: "); foreach (Blob b in blobs) { System.Diagnostics.Debug.WriteLine( " Area: " + b.area().tostring() + " Eccentricity: " + b.eccentricity().tostring() + " LengthBreadthRatio: " + b.lengthbreadthratio().tostring()); } ba.dispose(); blobs.dispose(); } 26-8-2014 License plate recognition 43 gen_lic_pm.jls (VisionLab) Idea: Generate the license plate pattern matcher Input: lic_fonts.jl => Image contaning the characters Return: lic_fonts.pm => Pattern matcher containing the characters Lic_fonts.jl Lic_fonts.pm 26-8-2014 License plate recognition 44 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 22

PM_CreateBlobMatcher pm Int16Image 60 1 20 0 $names = 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z VarToArray &$names &$nametab lread allpats lic_fonts.jl copy allpats allpatsb ThresholdIsodata allpatsb DarkObject $nrnums = LabelBlobs allpatsb EightConnected $maxblob = BlobAnalysisArray allpatsb &$tab SortDown TopLeft UseX Height TopLeft Width for $i = 0 to $maxblob do VarToArray &$tab[$i] &$elm $label = $elm[0] $h = $elm[1] $tl = $elm[2] $w = $elm[3] $x = getnthfromvector 1 $tl $y = getnthfromvector 2 $tl ROI allpats roi $x $y $h $w copy roi roib Threshold roib 0 100 PM_AddPattern roib pm $nametab[$i] endfor PM_WriteToFile pm lic_fonts.pm PM_Delete pm 26-8-2014 License plate recognition 45 Klaas Dijkstra, Jaap van de Loosdrecht, NHL, vdlmv 23