IronOCR OCR 프로그램으로 C#에서 차량 번호판 이미지 텍스트 변환하는 방법
IronOCR의 ReadLicensePlate 메소드는 고급 이미지 텍스트 변환 기술을 사용하여 차량 이미지에서 자동으로 번호판 번호를 추출합니다. 이 단일 메서드 호출로 차량 번호판을 높은 정확도로 처리하여 자동 차량 관리 시스템에 번호판 텍스트와 신뢰도 점수를 모두 반환할 수 있습니다.
대량의 차량 이미지를 관리할 때, 수동으로 번호판을 읽는 것은 시간이 많이 걸리고 인적 오류가 발생하기 쉽습니다. IronOCR과 같은 도구를 사용하여 이 프로세스를 자동화하면 더욱 효율적이고 정확한 솔루션을 제공할 수 있습니다. IronOCR의 ReadLicensePlate 메소드는 이미지를 통해 프로그래밍 방식으로 번호판 번호를 추출할 수 있으며, 데이터 정확성을 높이는 동시에 상당한 시간을 절약할 수 있습니다.
이 가이드에서는 IronOCR을 사용하여 차량 번호판을 인식하는 방법을 예시와 사용자 지정 가능한 설정을 통해 단계별로 설명하여 원활한 프로세스를 구현하는 방법을 안내합니다. 이러한 방법을 활용하면 개발자는 차량 번호판 인식을 자동화하여 주차 관리, 통행료 징수 또는 보안 감시와 같은 작업을 더욱 효율적으로 수행할 수 있습니다.
이 기능을 사용하려면 IronOcr.Extension.AdvancedScan 패키지를 설치해야 합니다.
빠른 시작: 차량 번호판을 즉시 추출하세요
IronOCR의 ReadLicensePlate를 사용한 단일 메소드 호출로, 어떤 이미지에서든 프로그래밍 방식으로 번호판 텍스트를 추출할 수 있습니다. 바로 사용 가능합니다. 이미지를 불러오고 메서드를 호출하면 차량 번호와 신뢰도를 즉시 얻을 수 있습니다.
- 차량 번호판을 읽는 C# 라이브러리를 다운로드하세요.
- 처리할 차량 번호판 이미지를 가져옵니다.
- 문서에는 머리글이나 바닥글 없이 차량 번호판 이미지만 포함되어야 합니다.
- `ReadLicensePlate` 메서드를 사용하여 이미지에서 데이터를 추출합니다.
- **`OcrLicensePlateResult`** 속성에 접근하여 추출된 면허증 데이터를 보고 조작할 수 있습니다.
C#에서 차량 번호판을 어떻게 읽나요?
IronOCR에서 차량 번호판을 읽으려면 다음 단계를 수행합니다.
- 우리는 입력에 대한 매개변수로
OcrInput를 사용하는ReadLicensePlate메소드를 활용합니다. 이 메소드는 라이브러리의 표준Read와 비교해 번호판에 더 최적화되어 있습니다. - 선택적으로, IronOCR에서 차량 번호판에 포함될 수 있는 특정 문자를 허용 목록에 추가하여 차량 번호판 처리 속도를 높일 수 있습니다.
- 현재 이 방법은 영어, 중국어, 일본어, 한국어 및 라틴 알파벳 문자 체계에서만 작동합니다.
- .NET Framework에서 고급 검사를 사용하려면 프로젝트가 x64 아키텍처에서 실행되어야 합니다.
)}]
입력 차량 번호판은 어떻게 생겼나요?

차량 번호판 OCR 인식을 어떻게 설정하나요?
:path=/static-assets/ocr/content-code-examples/how-to/read-license-plate-read-license-plate.cs
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);
Imports Microsoft.VisualBasic
Imports IronOcr
Imports System
Private ocr = New IronTesseract()
ocr.Configuration.WhiteListCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"
Dim inputLicensePlate = New OcrInput()
inputLicensePlate.LoadImage("plate.jpeg")
' Read license plate
Dim result As OcrLicensePlateResult = ocr.ReadLicensePlate(inputLicensePlate)
' Retrieve license plate number and confidence value
Dim output As String = $"{result.Text}" & vbLf & "Result Confidence: {result.Confidence}"
Console.WriteLine(output)
어떤 결과를 기대해야 할까요?

코드는 이미지를 OcrInput로 가져와 ReadLicensePlate 메소드를 사용해 번호판에서 텍스트를 추출하는 방법을 보여줍니다. 출력 결과에는 입력 이미지에 표시된 차량 번호판과 일치하는 추출된 텍스트와 OCR의 정확도를 나타내는 신뢰도 수준이 표시됩니다.
텍스트 : OCR 입력에서 추출된 텍스트입니다.
신뢰도: 모든 문자 평균의 통계적 정확도 신뢰도를 나타내는 double 속성으로, 1이 가장 높고 0이 가장 낮습니다.
OCR 프로세스를 더욱 정밀하게 제어하려면 고급 구성 옵션을 살펴보고 문자 인식 설정을 세밀하게 조정할 수 있습니다.
자동차 이미지에서 번호판을 추출하는 방법은 무엇인가요?
이 방법은 차량 번호판이 있는 이미지에도 잘 작동합니다. 위 코드와 동일하지만 입력 이미지만 변경되었습니다. 이미지에서 번호판이 위치한 영역의 픽셀 좌표를 추출할 수도 있습니다.
어떤 유형의 자동차 이미지가 가장 효과적일까요?

최상의 결과를 얻으려면 차량 이미지에 다음 사항이 포함되어 있는지 확인하십시오.
- 차량 번호판이 선명하게 보임
- 적절한 조명 조건 (눈부심이나 그림자를 피하십시오)
- 최소한의 각도 왜곡
- 적절한 해상도 (저해상도 이미지의 경우 DPI 설정을 조정하는 것을 고려하세요)
차량 번호판 위치 좌표는 어떻게 얻을 수 있나요?
:path=/static-assets/ocr/content-code-examples/how-to/read-license-plate-read-from-car.cs
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);
Imports Microsoft.VisualBasic
Imports IronOcr
Imports IronSoftware.Drawing
Imports System
Private ocr = New IronTesseract()
Private inputLicensePlate = New OcrInput()
inputLicensePlate.LoadImage("car_license.jpg")
' Read license plate
Dim result As OcrLicensePlateResult = ocr.ReadLicensePlate(inputLicensePlate)
' Retrieve license plate coordinates
Dim rectangle As RectangleF = result.Licenseplate
' Write license plate value and coordinates in a string
Dim output As String = $"License Plate Number:" & vbLf & "{result.Text}" & vbLf & vbLf & $"License Plate Area_" & vbLf & $"Starting X: {rectangle.X}" & vbLf & $"Starting Y: {rectangle.Y}" & vbLf & $"Width: {rectangle.Width}" & vbLf & $"Height: {rectangle.Height}"
Console.WriteLine(output)
결과에는 어떤 정보가 포함되어 있나요?

예제는 ReadLicensePlate 메소드를 자동차 이미지에 적용하는 방법을 보여줍니다. 이 메서드는 이미지에서 번호판이 위치한 사각형 좌표도 반환합니다.
이 방법은 특정 차량 번호판 하나만 찾는 데 최적화되어 있으며, 스톡 이미지에서도 검색할 수 있습니다.
여러 개의 차량 번호판을 어떻게 처리하나요?
여러 대의 차량 이미지를 처리할 때는 일괄 처리 기능을 사용하여 효율적으로 처리할 수 있습니다.
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})");
}
}
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})");
}
}
Imports IronOcr
Imports System.IO
Imports System.Threading.Tasks
Public Async Function ProcessMultipleLicensePlates(imagePaths As String()) As Task
Dim ocr As New IronTesseract()
' Configure for optimal performance
ocr.Configuration.WhiteListCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock
Dim tasks = imagePaths.Select(Async Function(path)
Using input As New OcrInput()
input.LoadImage(path)
Dim result = Await Task.Run(Function() ocr.ReadLicensePlate(input))
Return New With {
.FilePath = path,
.PlateNumber = result.Text,
.Confidence = result.Confidence
}
End Using
End Function)
Dim results = Await Task.WhenAll(tasks)
' Process results
For Each result In results
Console.WriteLine($"File: {result.FilePath}")
Console.WriteLine($"Plate: {result.PlateNumber} (Confidence: {result.Confidence:P})")
Next
End Function
대규모 처리를 위해서는 성능을 극대화하기 위해 멀티스레딩 기능을 구현하는 것을 고려하십시오.
차량 번호판 인식 정확도를 높이려면 어떻게 해야 할까요?
차량 번호판 감지 정확도를 높이려면 다음과 같은 최적화 기법을 고려하십시오.
이미지 전처리 필터 적용
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);
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);
Imports IronOcr
Dim ocr As New IronTesseract()
Using input As 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
Dim result = ocr.ReadLicensePlate(input)
End Using
다양한 조명 조건에 대응하기
까다로운 조명 환경에서는 적절한 보정을 적용하십시오.
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadImage("dark_plate.jpg");
input.Contrast(1.5); // Increase contrast
input.Brightness(1.2); // Adjust brightness
input.Binarize(); // Convert to black and white for clarity
var result = ocr.ReadLicensePlate(input);
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadImage("dark_plate.jpg");
input.Contrast(1.5); // Increase contrast
input.Brightness(1.2); // Adjust brightness
input.Binarize(); // Convert to black and white for clarity
var result = ocr.ReadLicensePlate(input);
Imports IronOcr
Dim ocr As New IronTesseract()
Using input As New OcrInput()
input.LoadImage("dark_plate.jpg")
input.Contrast(1.5) ' Increase contrast
input.Brightness(1.2) ' Adjust brightness
input.Binarize() ' Convert to black and white for clarity
Dim result = ocr.ReadLicensePlate(input)
End Using
OCR 성능은 어떻게 모니터링하나요?
대량의 차량 번호판을 처리할 때 진행 상황을 추적하면 시스템 리소스를 관리하는 데 도움이 됩니다.
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);
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);
Imports IronOcr
Dim ocr As New IronTesseract()
' Subscribe to progress events
AddHandler ocr.OcrProgress, Sub(sender, e)
Console.WriteLine($"Processing: {e.ProgressPercent}% complete")
End Sub
Using input As New OcrInput()
input.LoadImage("large_parking_lot.jpg")
Dim result = ocr.ReadLicensePlate(input)
End Using
자세한 성능 모니터링을 위해서는 IronOCR의 진행 상황 추적 기능을 살펴보세요.
다른 문서 읽기 방식과 비교했을 때 어떤 차이가 있습니까?
IronOCR의 특수 문서 판독 기능은 차량 번호판을 넘어 다양한 분야에 적용됩니다. 차량 번호판 인식에 사용되는 것과 동일한 컴퓨터 비전 기술을 다음과 같은 분야에 적용할 수 있습니다.
- 여행 및 신분 확인을 위한 여권 판독
- 은행 업무용 MICR 수표 처리
- 디지털화 프로젝트를 위한 일반 문서 스캔
일반적인 사용 사례는 무엇인가요?
IronOCR을 이용한 차량 번호판 인식은 다양한 응용 분야에 활용될 수 있습니다.
- 주차 관리 : 출입 기록 및 결제 처리 자동화
- 통행료 징수 : 톨게이트에서 차량 식별 속도 향상
- 보안 감시 : 제한 구역 내 차량 이동 추적
- 차량 관리 : 회사 차량 및 물류를 모니터링합니다.
- 법 집행 기관 : 관심 차량을 신속하게 식별
IronOCR은 높은 정확도와 실시간 이미지 처리 기능을 통해 모든 사용 사례에 이점을 제공하므로 일괄 처리 및 실시간 애플리케이션 모두에 적합합니다.
자주 묻는 질문
C#에서 이미지로부터 차량 번호판을 어떻게 읽어낼 수 있나요?
IronOCR의 ReadLicensePlate 메서드를 사용하면 C#에서 차량 번호판을 읽을 수 있습니다. IronTesseract 인스턴스를 생성하고 번호판 이미지가 포함된 OcrInput을 사용하여 ReadLicensePlate 메서드를 호출하기만 하면 됩니다. 이 메서드는 추출된 번호판 텍스트와 신뢰도 점수를 포함하는 OcrLicensePlateResult를 반환합니다.
차량 번호판 인식을 위해 어떤 패키지를 설치해야 하나요?
IronOCR에서 차량 번호판 인식 기능을 사용하려면 NuGet에서 IronOCR 메인 패키지와 IronOcr.Extension.AdvancedScan 패키지를 모두 설치해야 합니다. AdvancedScan 확장 프로그램은 특수 ReadLicensePlate 메서드를 제공합니다.
코드 한 줄만으로 차량 번호판을 추출할 수 있나요?
네, IronOCR을 사용하면 단 한 줄의 코드로 차량 번호판 텍스트를 추출할 수 있습니다. `OcrLicensePlateResult result = new IronTesseract().ReadLicensePlate(new OcrInput("plate.jpg"));` 이 코드는 번호판 번호와 신뢰도 점수를 즉시 반환합니다.
차량 번호판 인식에 지원되는 언어는 무엇입니까?
IronOCR의 ReadLicensePlate 메서드는 현재 영어, 중국어, 일본어, 한국어 및 라틴 알파벳 문자로 된 차량 번호판을 지원합니다. 이 메서드는 이러한 문자 세트에 최적화되어 있습니다.
차량 번호판 인식 정확도를 높이려면 어떻게 해야 할까요?
IronOCR의 정확도를 높이려면 번호판에 나타나는 특정 문자를 화이트리스트에 추가하고, 이미지에 헤더나 푸터 없이 번호판만 포함되도록 하고, 고품질 이미지를 사용하십시오. ReadLicensePlate 메서드는 이미 번호판 인식에 최적화되어 있습니다.
.NET Framework에서 차량 번호판 인식을 위한 시스템 요구 사항은 무엇입니까?
.NET Framework에서 IronOCR의 고급 스캔 기능(예: ReadLicensePlate)을 사용하려면 프로젝트가 x64 아키텍처에서 실행되어야 합니다. 이 요구 사항은 차량 번호판 인식 기능의 최적 성능을 보장합니다.
차량 번호판 인식은 어떤 정보를 반환합니까?
IronOCR의 ReadLicensePlate 메서드는 추출된 차량 번호판 텍스트와 신뢰도 점수를 포함하는 OcrLicensePlateResult 객체를 반환합니다. 이를 통해 번호판을 검색하고 OCR 결과의 신뢰도를 평가할 수 있습니다.

