Ön işleme
Düşük kaliteli tarama ve fotoğraflardan gelen girdileri geliştirin. Maksimum OCR doğruluğu için zor görüntüleri temizlemek, düzleştirmek ve geliştirmek için ön işleme filtrelerimizi kullanın.
Renk Düzeltme Filtreleri Girişi
İkili
IronOCR içinde doğrudan girişinizi kolayca ikilileştirin, görüntüleri keskin siyah-beyaz versiyonlara dönüştürün. Bu filtre, metni karmaşık arka planlardan etkili bir şekilde ayırır, gürültüyü azaltır ve metin çıkarımını daha kolay ve güvenilir hale getirir.
Nasıl yapılır öğrenin:.NET C#'de Okuma için Görüntü Renklerini Düzeltusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply binarize affect
imageInput.Binarize();
// Export the modified image
imageInput.SaveAsImages("binarize.jpg");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("sample.jpg")
' Apply binarize affect
imageInput.Binarize()
' Export the modified image
imageInput.SaveAsImages("binarize.jpg")
End UsingGri tonlama
Renkli bir görüntüyü gri tonlamaya dönüştürün - daha gelişmiş ön işleme filtreleri için görüntüleri hazırlamada önemli bir adım.
Nasıl yapılır öğrenin:.NET C#'de Okuma için Görüntü Renklerini Düzeltusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply grayscale affect
imageInput.ToGrayScale();
// Export the modified image
imageInput.SaveAsImages("grayscale.jpg");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("sample.jpg")
' Apply grayscale affect
imageInput.ToGrayScale()
' Export the modified image
imageInput.SaveAsImages("grayscale.jpg")
End UsingPiksel renklerini değiştir
Görüntüdeki belirli renk aralıklarını değiştirin, OCR'dan önce filigranları, renkli arka planları veya diğer dikkat dağıtıcı unsurları kaldırmanıza olanak tanır.
Nasıl yapılır öğrenin:.NET C#'de Okuma için Görüntü Renklerini Düzeltusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
IronSoftware.Drawing.Color currentColor = new IronSoftware.Drawing.Color("#DB645C");
IronSoftware.Drawing.Color newColor = IronSoftware.Drawing.Color.DarkCyan;
// Replace color
imageInput.ReplaceColor(currentColor, newColor, 80);
// Export the modified image
imageInput.SaveAsImages("replaceColor");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("sample.jpg")
Dim currentColor As New IronSoftware.Drawing.Color("#DB645C")
Dim newColor As IronSoftware.Drawing.Color = IronSoftware.Drawing.Color.DarkCyan
' Replace color
imageInput.ReplaceColor(currentColor, newColor, 80)
' Export the modified image
imageInput.SaveAsImages("replaceColor")
End Using
Giriş Morfolojik İşlemleri
Dilate
Metindeki kırık çizgileri bağlamaya ve soluk veya ince yazıların tanısırımını iyileştirmeye yardımcı olabilecek şekilde görüntüdeki karakterlerin kalınlaştırılması.
Nasıl yapılır öğrenin:Okuma için Filtreleri Kullanarak Görüntüyü Düzeltmeusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply Dilate filter
imageInput.Dilate();
// Export filtered image
imageInput.SaveAsImages("dilate.jpg");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("sample.jpg")
' Apply Dilate filter
imageInput.Dilate()
' Export filtered image
imageInput.SaveAsImages("dilate.jpg")
End UsingErozyon
Görüntüdeki karakterleri inceltir, dokunan veya birleşen karakterleri ayırmak için kullanışlıdır.
Nasıl yapılır öğrenin:Okuma için Filtreleri Kullanarak Görüntüyü Düzeltmeusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply Erode filter
imageInput.Erode();
// Export filtered image
imageInput.SaveAsImages("erode.jpg");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("sample.jpg")
' Apply Erode filter
imageInput.Erode()
' Export filtered image
imageInput.SaveAsImages("erode.jpg")
End UsingPiksel renklerini değiştir
Görüntüdeki belirli renk aralıklarını değiştirin, OCR'dan önce filigranları, renkli arka planları veya diğer dikkat dağıtıcı unsurları kaldırmanıza olanak tanır.
Nasıl yapılır öğrenin:.NET C#'de Okuma için Görüntü Renklerini Düzeltusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
IronSoftware.Drawing.Color currentColor = new IronSoftware.Drawing.Color("#DB645C");
IronSoftware.Drawing.Color newColor = IronSoftware.Drawing.Color.DarkCyan;
// Replace color
imageInput.ReplaceColor(currentColor, newColor, 80);
// Export the modified image
imageInput.SaveAsImages("replaceColor");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("sample.jpg")
Dim currentColor As New IronSoftware.Drawing.Color("#DB645C")
Dim newColor As IronSoftware.Drawing.Color = IronSoftware.Drawing.Color.DarkCyan
' Replace color
imageInput.ReplaceColor(currentColor, newColor, 80)
' Export the modified image
imageInput.SaveAsImages("replaceColor")
End Using
Giriş Yön Manipülasyonu
Düzelt
Eğiklik veya eğimli görüntüleri otomatik olarak tespit edip düzleştirin, kusurlu taramalarda OCR doğruluğunu önemli ölçüde artırın.
Nasıl yapılır öğrenin:.NET C#'de Okuma için Görüntü Yönünü Düzeltusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("paragraph_skewed.png");
// Apply Deskew filter
imageInput.Deskew();Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("paragraph_skewed.png")
' Apply Deskew filter
imageInput.Deskew()
End UsingDöndür
Metnin OCR motoru için doğru bir şekilde hizalanması için görüntüleri programatik olarak herhangi bir derece ile döndürün.
Nasıl yapılır öğrenin:.NET C#'de Okuma için Görüntü Yönünü Düzeltusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("paragraph_skewed.png");
// Rotate the image 180 degrees clockwise
imageInput.Rotate(180);
// Export the modified image
imageInput.SaveAsImages("rotate");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput = New OcrImageInput("paragraph_skewed.png")
' Rotate the image 180 degrees clockwise
imageInput.Rotate(180)
' Export the modified image
imageInput.SaveAsImages("rotate")
End UsingYön Tespiti
Sayfa yönünü otomatik olarak belirleyin (0, 90, 180, 270 derece), OCR öncesi yön düzeltme için faydalıdır. Belgeler baş aşağı tarandığında bile yüksek doğruluğu sağlar.
Nasıl yapılır öğrenin:Sayfa Dönmesini Tespit Etusing IronOcr;
using var input = new OcrInput();
// Load PDF document
input.LoadPdf("Clockwise90.pdf");
// Detect page rotation
var results = input.DetectPageOrientation();
// Ouput result
foreach(var result in results)
{
Console.WriteLine(result.PageNumber);
Console.WriteLine(result.HighConfidence);
Console.WriteLine(result.RotationAngle);
}Imports IronOcr
Dim Input As New OcrInput()
' Load PDF document
Input.LoadPdf("Clockwise90.pdf")
' Detect page rotation
Dim Results = Input.DetectPageOrientation()
' Output result
For Each Result In Results
Console.WriteLine(Result.PageNumber)
Console.WriteLine(Result.HighConfidence)
Console.WriteLine(Result.RotationAngle)
Next
Giriş Çözünürlük Kontrolü
Ölçek
Görüntüyü OCR için optimize edilmiş bir çözünürlüğe yeniden boyutlandırın, düşük çözünürlüklü kaynak dosyalarda doğruluğu önemli ölçüde artırır.
Nasıl yapılır öğrenin:.NET C#'de Okuma için Görüntü Yönünü Düzeltusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("paragraph_skewed.png");
// Apply scale
imageInput.Scale(70);
// Export the modified image
imageInput.SaveAsImages("rotate");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("paragraph_skewed.png")
' Apply scale
imageInput.Scale(70)
' Export the modified image
imageInput.SaveAsImages("rotate")
End UsingDPI ayarı
Düşük çözünürlüklü görüntüler veya meta verilerin eksik olduğu taramalarda, inç başına nokta (DPI) değerini manuel olarak ayarlayın. DPI değeri sağlanarak OCR motoru yönlendirilir ve tanıma kalitesi önemli ölçüde artırılır.
Nasıl yapılır öğrenin:C# Tesseract Görüntü DPIusing IronOcr;
using System;
var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.TargetDPI = 300;
ocrInput.LoadImage(@"images\image.png");
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);Imports IronOcr
Imports System
Dim ocrTesseract = New IronTesseract()
Using ocrInput = New OcrInput()
ocrInput.TargetDPI = 300
ocrInput.LoadImage("images\image.png")
Dim ocrResult = ocrTesseract.Read(ocrInput)
Console.WriteLine(ocrResult.Text)
End UsingGelişmiş Çözünürlük
Düşük çözünürlüklü görüntülerin keskinliğini ve netliğini algoritmik olarak iyileştirin, bulanık veya pikselli girdilerden metni kurtarın.
Nasıl yapılır öğrenin:Okuma için Filtreleri Kullanarak Görüntüyü Düzeltmeusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply enhance resolution filter
imageInput.EnhanceResolution();
// Export filtered image
imageInput.SaveAsImages("sharpen.jpg");Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput As New OcrImageInput("sample.jpg")
' Apply enhance resolution filter
imageInput.EnhanceResolution()
' Export filtered image
imageInput.SaveAsImages("sharpen.jpg")
End UsingFiltre Sihirbazı
Tek, akıllı bir yöntem kullanarak ön işleme filtre zincirini uygulayın. Filtre Sihirbazı, giriş görüntüsünü otomatik olarak analiz eder ve en iyi OCR sonuçlarını elde etmek için optimal bir düzeltme dizisi uygular.
Nasıl yapılır öğrenin:Filtre Sihirbazıusing IronOcr;
var ocrTesseract = new IronTesseract();
// WIZARD - If you are unsure which filters to use,
// use the debug-wizard to test all combinations:
string codeToRun = OcrInputFilterWizard.Run(@"images\image.png", out double confidence, ocrTesseract);
Console.WriteLine($"Confidence: {confidence}");
Console.WriteLine(codeToRun);Imports IronOcr
Dim ocrTesseract = New IronTesseract()
' WIZARD - If you are unsure which filters to use,
' use the debug-wizard to test all combinations:
Dim confidence As Double
Dim codeToRun As String = OcrInputFilterWizard.Run("images\image.png", confidence, ocrTesseract)
Console.WriteLine($"Confidence: {confidence}")
Console.WriteLine(codeToRun)Bir görüntüde bir bölgeyi OCR yapma
Metin içeren sadece belirli bir görüntü alanını hedefleyerek işlem süresini kaydedin. Formlardan, tablolardan veya kalabalık arka planlardan metin izole etmek ve çıkarmak için basitçe dikdörtgen bir alan tanımlayın.
Nasıl yapılır öğrenin:C#'de Tesseract OCR Belirli Bir Görüntü Alanıusing IronOcr;
using IronSoftware.Drawing;
var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
var ContentArea = new Rectangle(x: 215, y: 1250, width: 1335, height: 280);
ocrInput.LoadImage("img/example.png", ContentArea);
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);Imports IronOcr
Imports IronSoftware.Drawing
Dim ocrTesseract = New IronTesseract()
Using ocrInput = New OcrInput()
Dim ContentArea = New Rectangle(x:=215, y:=1250, width:=1335, height:=280)
ocrInput.LoadImage("img/example.png", ContentArea)
Dim ocrResult = ocrTesseract.Read(ocrInput)
Console.WriteLine(ocrResult.Text)
End UsingBaşlamaya Hazır mısınız?
Nuget Downloads 6,236,385|Sürüm:2026.9yeni yayınlandı