License Plate Recognition Engine

Posted on by

VIP03OCT2014_r2A_High-14.jpg' alt='License Plate Recognition Engine' title='License Plate Recognition Engine' />Simple Digit Recognition OCR in Open. CV Python. Well, I decided to workout myself on my question to solve above problem. What I wanted is to implement a simpl OCR using KNearest or SVM features in Open. CV. And below is what I did and how. KNearest for simple OCR purposes. My first question was about letterrecognition. We offer CARMENR the highest quality License Plate Recognition Software Engine with an SDK and comprehensive functions library for system integration companies who. Automatic License Plate Recognition products, software and hardware, and detailed general information about Automatic License Plate Recognition algorithms, technology. License Plate Recognition Engine' title='License Plate Recognition Engine' />Open. CV samples. I wanted to know what is inside that file. It contains a letter, along with 1. And this SOF helped me to find it. WfRfG0y3wbk/TwU0Ipq8yuI/AAAAAAAAAAA/rBnpeaF8P7Y/s1600/systemBlock.png' alt='License Plate Recognition Engine' title='License Plate Recognition Engine' />These 1. Letter Recognition Using Holland Style Adaptive Classifiers. Although I didnt understand some of the features at end2 Since I knew, without understanding all those features, it is difficult to do that method. I tried some other papers, but all were a little difficult for a beginner. So I just decided to take all the pixel values as my features. I was not worried about accuracy or performance, I just wanted it to work, at least with the least accuracyI took below image for my training data I know the amount of training data is less. But, since all letters are of same font and size, I decided to try on this. To prepare the data for training, I made a small code in Open. CV. It does following things A It loads the image. B Selects the digits obviously by contour finding and applying constraints on area and height of letters to avoid false detections. C Draws the bounding rectangle around one letter and wait for key press manually. Graphic Driver For Dell Inspiron 1545. This time we press the digit key ourselves corresponding to the letter in box. D Once corresponding digit key is pressed, it resizes this box to 1. E Then save both the arrays in separate txt files. License Plate Recognition Engine' title='License Plate Recognition Engine' />At the end of manual classification of digits, all the digits in the train data train. Below is the code I used for above purpose of course, not so clean import sys. Colorim,cv. 2. COLORBGR2. GRAY. blur cv. Gaussian. Blurgray,5,5,0. Thresholdblur,2. Now finding Contours . Contoursthresh,cv. RETRLIST,cv. 2. CHAINAPPROXSIMPLE. Areacnt 5. 0. Rectcnt. Key0. if key 2. Now we enter in to training and testing part. For testing part I used below image, which has same type of letters I used to train. For training we do as follows A Load the txt files we already saved earlier. B create a instance of classifier we are using here, it is KNearestC Then we use KNearest. For testing purposes, we do as follows A We load the image used for testing. B process the image as earlier and extract each digit using contour methods. C Draw bounding box for it, then resize to 1. D Then we use KNearest. If lucky, it recognises the correct digit. I included last two steps training and testing in single code below import cv. KNearest. model. Colorim,cv. COLORBGR2. GRAY. thresh cv. Thresholdgray,2. Contoursthresh,cv. RETRLIST,cv. 2. CHAINAPPROXSIMPLE. Areacnt 5. 0. Rectcnt. Textout,string,x,yh,0,1,0,2. And it worked, below is the result I got Here it worked with 1. I assume this is because all the digits are of same kind and same size. But any way, this is a good start to go for beginners I hope so.