{"id":1088,"date":"2019-10-17T09:25:42","date_gmt":"2019-10-17T09:25:42","guid":{"rendered":"https:\/\/muthu.co\/?p=1088"},"modified":"2021-05-24T02:48:54","modified_gmt":"2021-05-24T02:48:54","slug":"algorithm-for-detecting-and-extracting-number-plates-from-images-of-cars","status":"publish","type":"post","link":"http:\/\/write.muthu.co\/algorithm-for-detecting-and-extracting-number-plates-from-images-of-cars\/","title":{"rendered":"Algorithm for detecting and extracting number plates from images of cars"},"content":{"rendered":"\n
This article presents a method for automatic detection and extraction of number plates from the images of cars<\/span>. There are usually three steps in an Automatic Number Plate Recognition (ANPR) system. The first one is to binarize the image and separate the background from the foreground. The Foreground contains the numbers of the number plate usually with strong edges. The second step is to identify the number plate in the foreground pixels. The last step is the OCR of the identified number images. Each step has its own set of algorithms. <\/span><\/p>\n\n\n\n In this article, I will be focussing on the second step, the extraction of the number plate from the car. I am assuming a good algorithm for thresholding already in place. I will explain good thresholding algorithms in my future posts.<\/p>\n\n\n\n The key idea is to first run a connected component labeling on the thresholded image. Then identify the components with numbers based on the fact that the numbers usually lie in a straight line. The numbers also have similar heights and widths. Even when the number plate is not parallel to the horizontal plane, it still is in a straight line with each other.<\/p>\n\n\n\n License plate recognition (LPR), or automatic number plate recognition (ANPR), is the use of video captured images from traffic surveillance cameras for the automatic identi\ufb01cation of a vehicle through its license plate. LPR attempts to make the reading automatic by processing sets of images captured by cameras, often setup at \ufb01xed locations on roads and at parking lot entrances. ANPR was invented in 1976 at the Police Scientific Development Branch in Britain and since then this had been an actively researched field with many papers published with a goal to make the ANPR systems faster and more accurate in their recognitions.There are seven primary algorithms that the software requires for identifying a license plate as described here in this wikipedia article [4] :<\/p>\n\n\n\n I will threshold the image using Otsu’s method to separate the foreground containing numbers from the background. Then apply the connected component analysis on a car image. The identified labels also contain individual letters on the license plate. One interesting fact about these numbers is that they usually fall in the same line even if the image taken by the camera is skewed. I will use this collinearity property of numbers to isolate them from other connected components in the image.<\/p>\n\n\n\n Take a look at the below images of licence plates.<\/p>\n\n\n\nIntroduction<\/h2>\n\n\n\n
Algorithm<\/h2>\n\n\n\n