IRONSOFTWAREHOME

How to Read License Plates in C# with IronOCR

Curtis Chau
Curtis Chau
Updated: August 2, 2026

IronOCR's ReadLicensePlate method automatically extracts license plate numbers from vehicle images using advanced OCR technology. This single method call can process license plates with high accuracy, returning both the plate text and confidence score for automated vehicle management systems.

When managing a large volume of vehicle images, manually reading license plates is time-consuming and prone to human error. Automating this process with a tool like IronOCR provides a more efficient, accurate solution. IronOCR's ReadLicensePlate method can programmatically extract the license plate numbers from images, saving considerable time while improving data accuracy.

In this guide, we'll demonstrate how to use IronOCR for license plate recognition, walking through examples and customizable configurations that make the process seamless. By leveraging these methods, developers can automate license plate reading, making tasks like parking management, toll collection, or security surveillance more efficient.

To use this function, you must also install the IronOcr.Extensions.AdvancedScan package.

Quickstart: Extract License Plate Number Instantly

With a single method call using IronOCR's ReadLicensePlate, you can programmatically extract the license plate text from any image. It's ready to use - just load an image, call the method, and get both the plate number and confidence right away.

  1. 1Install IronOCR with NuGet Package Manager

    PM > Install-Package IronOcr

  2. 2Copy and run this code snippet.

    var input = new OcrInput();
    input.LoadImage("plate.jpg");
    OcrLicensePlateResult result = new IronTesseract().ReadLicensePlate(input);
    C#
  3. 3Deploy to test on your live environment

    Start using IronOCR in your project today with a free trial
    arrow pointer

How Do I Read a License Plate in C#?

To read a license plate in IronOCR, we apply the following steps:

  • We utilize the ReadLicensePlate method, which takes an OcrInput as a parameter for the input. This method is more optimized for license plates than the library's standard Read counterpart.
  • Optionally, we can configure IronOCR to whitelist specific characters that can exist in a license plate, to speed up the license plate number processing.
Please note: - The method currently only works for English, Chinese, Japanese, Korean, and Latin alphabet scripts. - Using advanced scan on .NET Framework requires the project to run on x64 architecture.

What Does the Input License Plate Look Like?

California license plate showing '8TRS777' - example for license plate reading demonstration

How Do I Configure the OCR for License Plates?

using IronOcr;
using System;

var ocr = new IronTesseract();
ocr.Configuration.WhiteListCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_";

using var inputLicensePlate = new OcrInput();
inputLicensePlate.LoadImage("plate.jpeg");

// Read license plate
OcrLicensePlateResult result = ocr.ReadLicensePlate(inputLicensePlate);

// Retrieve license plate number and confidence value
string output = $"{result.Text}\nResult Confidence: {result.Confidence}";

Console.WriteLine(output);

What Results Should I Expect?

Debug console showing license plate OCR results: California state, plate 8TRS777, confidence 95.87%

The code demonstrates how to import an image as an OcrInput and use it with the ReadLicensePlate method to extract the text from the license plate. The output shows the extracted text that matches the license plate shown in the input image, along with a confidence level indicating the accuracy of the OCR.

Text: The extracted text from OCR Input.

Confidence: A double property that indicates the statistical accuracy confidence of an average of every character, with one being the highest and 0 being the lowest.

For more precise control over the OCR process, you can explore advanced configuration options to fine-tune character recognition settings.


How Can I Extract License Plates From Car Images?

The method also works well with images containing a car with a license plate. The code is the same as the one above, with the input image changed. You can also extract the pixel coordinates of the area where the license plate is situated in the image.

What Type of Car Images Work Best?

Dark gray Skoda car showing Maharashtra license plate MH 20 EE 7602 parked on brick pavement

For optimal results, ensure your car images have:

  • Clear visibility of the license plate
  • Good lighting conditions (avoid glare or shadows)
  • Minimal angle distortion
  • Adequate resolution (consider adjusting DPI settings for low-resolution images)

How Do I Get the License Plate Location Coordinates?

using IronOcr;
using IronSoftware.Drawing;
using System;

var ocr = new IronTesseract();
using var inputLicensePlate = new OcrInput();
inputLicensePlate.LoadImage("car_license.jpg");

// Read license plate
OcrLicensePlateResult result = ocr.ReadLicensePlate(inputLicensePlate);

// Retrieve license plate coordinates
RectangleF rectangle = result.Licenseplate;

// Write license plate value and coordinates in a string
string output = $"License Plate Number:\n{result.Text}\n\n"
              + $"License Plate Area_\n"
              + $"Starting X: {rectangle.X}\n"
              + $"Starting Y: {rectangle.Y}\n"
              + $"Width: {rectangle.Width}\n"
              + $"Height: {rectangle.Height}";

Console.WriteLine(output);

What Information Does the Result Include?

Visual Studio debug output showing detected license plate MH20EE7602 with bounding box coordinates and dimensions

The example shows how the ReadLicensePlate method can be applied to an image of a car. The method will also return the rectangle coordinates of where the license plate is situated in the image.

This method is optimized to find single license plates only and is capable of searching for them in stock images.

How Do I Process Multiple License Plates?

When dealing with multiple vehicle images, you can process them efficiently using batch operations:

using IronOcr;
using System.IO;
using System.Threading.Tasks;

public async Task ProcessMultipleLicensePlates(string[] imagePaths)
{
    var ocr = new IronTesseract();
    
    // Configure for optimal performance
    ocr.Configuration.WhiteListCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock;
    
    var tasks = imagePaths.Select(async path => 
    {
        using var input = new OcrInput();
        input.LoadImage(path);
        
        var result = await Task.Run(() => ocr.ReadLicensePlate(input));
        
        return new { 
            FilePath = path, 
            PlateNumber = result.Text, 
            Confidence = result.Confidence 
        };
    });
    
    var results = await Task.WhenAll(tasks);
    
    // Process results
    foreach (var result in results)
    {
        Console.WriteLine($"File: {result.FilePath}");
        Console.WriteLine($"Plate: {result.PlateNumber} (Confidence: {result.Confidence:P})");
    }
}

For large-scale processing, consider implementing multithreading capabilities to maximize performance.

How Can I Improve License Plate Recognition Accuracy?

To enhance the accuracy of license plate detection, consider these optimization techniques:

Apply Image Preprocessing Filters

using IronOcr;

var ocr = new IronTesseract();
using var input = new OcrInput();

// Load and preprocess the image
input.LoadImage("blurry_plate.jpg");
input.Deskew();  // Correct image rotation
input.DeNoise(); // Remove background noise
input.EnhanceResolution(225); // Upscale for better clarity
input.Sharpen(); // Enhance edge definition

var result = ocr.ReadLicensePlate(input);

Learn more about available image filters and image correction techniques to optimize your input images.

Handle Different Lighting Conditions

For challenging lighting scenarios, apply appropriate corrections:

using IronOcr;

var ocr = new IronTesseract();
using var input = new OcrInput();

input.LoadImage("dark_plate.jpg");
input.Contrast(1.5); // Increase contrast
input.Binarize(); // Convert to black and white for clarity

var result = ocr.ReadLicensePlate(input);
C#

How Do I Monitor OCR Performance?

When processing large batches of license plates, tracking progress helps manage system resources:

using IronOcr;

var ocr = new IronTesseract();

// Subscribe to progress events
ocr.OcrProgress += (sender, e) => 
{
    Console.WriteLine($"Processing: {e.ProgressPercent}% complete");
};

using var input = new OcrInput();
input.LoadImage("large_parking_lot.jpg");

var result = ocr.ReadLicensePlate(input);

For detailed performance monitoring, explore the progress tracking capabilities in IronOCR.

How Does This Compare to Other Document Reading?

IronOCR's specialized document reading capabilities extend beyond license plates. The same computer vision technology that powers license plate detection can be applied to:

What Are Common Use Cases?

License plate recognition with IronOCR enables various applications:

  • Parking Management: Automate entry/exit logging and payment processing
  • Toll Collection: Speed up vehicle identification at toll booths
  • Security Surveillance: Track vehicle movements in restricted areas
  • Fleet Management: Monitor company vehicles and logistics
  • Law Enforcement: Identify vehicles of interest quickly

Each use case benefits from IronOCR's high accuracy and the ability to process images in real-time, making it suitable for both batch processing and live applications.

Frequently Asked Questions

How can I read license plates using C#?

You can read license plates using C# by utilizing IronOCR's `ReadLicensePlate` method, which processes vehicle images with advanced OCR technology and provides both the plate text and a confidence score.

What is required to use IronOCR for license plate recognition?

To use IronOCR for license plate recognition, you need to install the IronOCR library and its `IronOcr.Extensions.AdvancedScan` package, then use the `ReadLicensePlate` method to extract license plate numbers from images.

What are the benefits of using IronOCR for license plate recognition?

Using IronOCR for license plate recognition is efficient and accurate, saving time compared to manual processing. It automates tasks like parking management and toll collection by providing high accuracy in text extraction.

How can I optimize IronOCR for better license plate recognition?

You can optimize IronOCR by configuring the character whitelist to match typical license plate characters and utilizing image preprocessing filters such as `Deskew`, `DeNoise`, and `EnhanceResolution` to improve input image quality.

What languages does IronOCR support for license plate recognition?

IronOCR's license plate recognition currently supports English, Chinese, Japanese, Korean, and Latin alphabet scripts.

Can IronOCR handle multiple license plate images in batch processing?

Yes, IronOCR can handle multiple vehicle images in batch processing by configuring the `ReadLicensePlate` method for optimal performance, enabling batch operations to process each image asynchronously.

How do I retrieve license plate location coordinates using IronOCR?

Using IronOCR, you can retrieve license plate location coordinates by accessing the `OcrLicensePlateResult`'s `Licenseplate` property, which provides pixel coordinates and dimensions of the plate area in the image.

What are common use cases for license plate recognition with IronOCR?

Common use cases include parking management, toll collection, security surveillance, fleet management, and law enforcement — all benefiting from IronOCR's high accuracy and real-time processing capabilities.

What type of images provide the best results for IronOCR?

Images with clear visibility of the license plate, good lighting conditions, minimal angle distortion, and adequate resolution provide the best results when using IronOCR for license plate recognition.

How can I monitor IronOCR's performance during license plate recognition?

You can monitor IronOCR's performance by subscribing to its `OcrProgress` event, which provides real-time progress information during the processing of large batches of license plate images.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 6,236,385Version:2026.9just released

Get your FREE

30-day Trial Key instantly.

bullet_checkedNo credit card or account creation required
bullet_testTest in production
without watermarks
bullet_calendar30 days fully
functional product
bullet_support24/5 technical
support during trial
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronOcr
nuget.org/packages/IronOcr/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronOCR"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronOCR to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronOCR.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required