:: AForge.NET Framework :: Articles :: Forums ::

License Plate Recognition and Perform OCR from video

The forum is to discuss topics related to different areas of image processing and computer vision.

License Plate Recognition and Perform OCR from video

Postby Husnain » Thu Jul 20, 2017 8:04 pm

I have to do License Plate Recognition and Perform OCR during video streaming... Please can anybody help me...
Posts: 1
Joined: Thu Jul 20, 2017 7:58 pm

Re: License Plate Recognition and Perform OCR from video

Postby jannoxi » Fri Aug 11, 2017 9:40 am

I am new at AForge but do some work with Pattern recognition.
if i need to solve it i would splitt up the Problem by
1. get the Picture of the Plate: for extract "Crob" an Image from the Plate i thing is hart to find. Plates got different Colors and can be placed everyware But most plades got an white Background so
FiltersSequence seq = new FiltersSequence();
seq.Add(new Threshold(???)); // maybe 210 ?

And than searching for an Blob of an Plate size. In Germany is quit simple because Plates got allmost the same size, US or Italy it's quit harder.
// create an instance of blob counter algorithm
BlobCounterBase bc = new BlobCounter( );
// set filtering options
bc.FilterBlobs = true;
bc.MinWidth = 5; // Plate min Width
bc.MinHeight = 5; // Plate min Height
//Shure there is also an Plate max Width and Height .........
// set ordering options
bc.ObjectsOrder = ObjectsOrder.Size;
// process binary image
bc.ProcessImage( image );
Blob[] blobs = bc.GetObjectsInformation( );
// extract the biggest blob
if ( blobs.Length > 0 )
bc.ExtractBlobsImage( image, blobs[0], true );

Now we got in best case just on Blob, now you need to go for Letter, hier is using Pattern a good idea.
ExhaustiveTemplateMatching tm = new ExhaustiveTemplateMatching(0);
TemplateMatch[] matchings = tm.ProcessImage(PlateImage, LetterPattern); // Important , both PlateImage AND LetterPattern must be with allmost the same Threshold
//It's important to restrict the Areas of the PlateImage to get the Lettern in the correct Sequence
//All Patterns shoult be compared and the best Match is the Hit, to get faster you can stop after an Match of 95% !?

This is my first idea, I know an Example of OpenVisionControl there is exactly this Szenario, maybe go for it an have an look of the algorithm to rebuild with AForge.

By Markus
Posts: 4
Joined: Wed Aug 09, 2017 2:31 pm
Location: Germany

Return to Image Processing and Computer Vision