דער ערשטער זאך וואס מיר דארפן צו טאן איז צו ינסטאלירן אונדזעריידיש OCR פעקל צו דיין .NET פרויעקט.
PM> Install-Package IronOcr.Languages.Yiddish
קאדעקס עקסאמפלע
דעם ביישפיל פון C# קאד לייענט יידיש טעקסט פון א בילד אדער PDF דאקומענט.
// PM> Install-Package IronOcr.Languages.Yiddishusing IronOcr;varOcr = new IronTesseract();// Set the language to YiddishOcr.Language = OcrLanguage.Yiddish;// Create an OCR input for the imageusing (varInput = new OcrInput(@"images\Yiddish.png")){ // Perform OCR on the input image varResult = Ocr.Read(Input); // Extract the text from the OCR result varAllText = Result.Text;}
// PM> Install-Package IronOcr.Languages.Yiddish
using IronOcr;
var Ocr = new IronTesseract();
// Set the language to Yiddish
Ocr.Language = OcrLanguage.Yiddish;
// Create an OCR input for the image
using (var Input = new OcrInput(@"images\Yiddish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract the text from the OCR result
var AllText = Result.Text;
}
' PM> Install-Package IronOcr.Languages.YiddishImportsIronOcrPrivateOcr = New IronTesseract()' Set the language to YiddishOcr.Language = OcrLanguage.Yiddish' Create an OCR input for the imageUsingInput = New OcrInput("images\Yiddish.png") ' Perform OCR on the input image DimResult = Ocr.Read(Input) ' Extract the text from the OCR result DimAllText = Result.TextEndUsing
' PM> Install-Package IronOcr.Languages.Yiddish
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the language to Yiddish
Ocr.Language = OcrLanguage.Yiddish
' Create an OCR input for the image
Using Input = New OcrInput("images\Yiddish.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract the text from the OCR result
Dim AllText = Result.Text
End Using
די קאד מוסטער אונטן ווייזט ווי גרינג עס איז צו לייענען טעקסט פון א בילד ניצן C# אדער VB .NET.
אנעלינער
// Reads text from image using a single linestringText = new IronTesseract().Read(@"img\Screenshot.png").Text;
// Reads text from image using a single line
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
' Reads text from image using a single lineDimTextAsString = (New IronTesseract()).Read("img\Screenshot.png").Text
' Reads text from image using a single line
Dim Text As String = (New IronTesseract()).Read("img\Screenshot.png").Text
קאנפיגוראבלע העלא וועלט
// PM> Install-Package IronOcr.Languages.Yiddishusing IronOcr;varOcr = new IronTesseract();// Setting the OCR language to YiddishOcr.Language = OcrLanguage.Yiddish;// Create a new OCR input and add imagesusing (varInput = new OcrInput()){Input.AddImage("images/sample.jpeg"); //... איר קענען לייגן קיין נומער פון בילדער varResult = Ocr.Read(Input); // Print the OCR result text to the consoleConsole.WriteLine(Result.Text);}
// PM> Install-Package IronOcr.Languages.Yiddish
using IronOcr;
var Ocr = new IronTesseract();
// Setting the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish;
// Create a new OCR input and add images
using (var Input = new OcrInput())
{
Input.AddImage("images/sample.jpeg");
//... איר קענען לייגן קיין נומער פון בילדער
var Result = Ocr.Read(Input);
// Print the OCR result text to the console
Console.WriteLine(Result.Text);
}
ImportsIronOcrDimOcr = New IronTesseract()' Setting the OCR language to YiddishOcr.Language = OcrLanguage.Yiddish' Create a new OCR input and add imagesUsingInput = New OcrInput()Input.AddImage("images/sample.jpeg") '... איר קענען לייגן קיין נומער פון בילדער DimResult = Ocr.Read(Input) ' Print the OCR result text to the consoleConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
Dim Ocr = New IronTesseract()
' Setting the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish
' Create a new OCR input and add images
Using Input = New OcrInput()
Input.AddImage("images/sample.jpeg")
'... איר קענען לייגן קיין נומער פון בילדער
Dim Result = Ocr.Read(Input)
' Print the OCR result text to the console
Console.WriteLine(Result.Text)
End Using
C# פדף אקר
דער זעלביקער צוגאנג קענען זיין סימילארלי געניצט צו עקסטראקט טעקסט פון קיין PDF דאקומענט.
varOcr = new IronTesseract();// Set language for OCROcr.Language = OcrLanguage.Yiddish;// Create a new OCR input for PDFusing (var input = new OcrInput()){ // Add PDF and specify password if needed input.AddPdf("example.pdf", "password"); // Perform OCR on the PDF document varResult = Ocr.Read(input); // Print extracted text and page countConsole.WriteLine(Result.Text);Console.WriteLine($"{Result.Pages.Count()} Pages"); // 1 בלאט פאר יעדער בלאט פון דעם PDF}
var Ocr = new IronTesseract();
// Set language for OCR
Ocr.Language = OcrLanguage.Yiddish;
// Create a new OCR input for PDF
using (var input = new OcrInput())
{
// Add PDF and specify password if needed
input.AddPdf("example.pdf", "password");
// Perform OCR on the PDF document
var Result = Ocr.Read(input);
// Print extracted text and page count
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count()} Pages");
// 1 בלאט פאר יעדער בלאט פון דעם PDF
}
DimOcr = New IronTesseract()' Set language for OCROcr.Language = OcrLanguage.Yiddish' Create a new OCR input for PDFUsing input = New OcrInput() ' Add PDF and specify password if needed input.AddPdf("example.pdf", "password") ' Perform OCR on the PDF document DimResult = Ocr.Read(input) ' Print extracted text and page countConsole.WriteLine(Result.Text)Console.WriteLine($"{Result.Pages.Count()} Pages") ' 1 בלאט פאר יעדער בלאט פון דעם PDFEndUsing
Dim Ocr = New IronTesseract()
' Set language for OCR
Ocr.Language = OcrLanguage.Yiddish
' Create a new OCR input for PDF
Using input = New OcrInput()
' Add PDF and specify password if needed
input.AddPdf("example.pdf", "password")
' Perform OCR on the PDF document
Dim Result = Ocr.Read(input)
' Print extracted text and page count
Console.WriteLine(Result.Text)
Console.WriteLine($"{Result.Pages.Count()} Pages")
' 1 בלאט פאר יעדער בלאט פון דעם PDF
End Using
using IronOcr;varOcr = new IronTesseract();// Set the language to YiddishOcr.Language = OcrLanguage.Yiddish;// Create a new OCR input for the TIFF imageusing (varInput = new OcrInput()){Input.AddMultiFrameTiff("multi-frame.tiff"); varResult = Ocr.Read(Input); // Output the OCR resultConsole.WriteLine(Result.Text);}
using IronOcr;
var Ocr = new IronTesseract();
// Set the language to Yiddish
Ocr.Language = OcrLanguage.Yiddish;
// Create a new OCR input for the TIFF image
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("multi-frame.tiff");
var Result = Ocr.Read(Input);
// Output the OCR result
Console.WriteLine(Result.Text);
}
ImportsIronOcrPrivateOcr = New IronTesseract()' Set the language to YiddishOcr.Language = OcrLanguage.Yiddish' Create a new OCR input for the TIFF imageUsingInput = New OcrInput()Input.AddMultiFrameTiff("multi-frame.tiff") DimResult = Ocr.Read(Input) ' Output the OCR resultConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the language to Yiddish
Ocr.Language = OcrLanguage.Yiddish
' Create a new OCR input for the TIFF image
Using Input = New OcrInput()
Input.AddMultiFrameTiff("multi-frame.tiff")
Dim Result = Ocr.Read(Input)
' Output the OCR result
Console.WriteLine(Result.Text)
End Using
בארקאדעס און QR
א יינציק שטריך פון IronOCR איז אז עס קענען לייענען בארקאדעס און QR קאודז פון דאקומענטן בשעת עס סקאנינג פאר טעקסט. ינסטאנסיז פון די OcrResult.OcrBarcode קלאס געבן די דעוועלאפער דיטיילד אינפארמאציע וועגן יעדער סקאנד בארקאדע.
// using IronOcr;varOcr = new IronTesseract();Ocr.Configuration.ReadBarCodes = true; // Enable barcode readingusing (var input = new OcrInput()){ input.AddImage("img/Barcode.png"); varResult = Ocr.Read(input); foreach (varBarcodeinResult.Barcodes) { // Print each barcode valueConsole.WriteLine(Barcode.Value); // טיפ און ארט פראפערטיעס אויך יקספאוזד }}
// using IronOcr;
var Ocr = new IronTesseract();
Ocr.Configuration.ReadBarCodes = true; // Enable barcode reading
using (var input = new OcrInput())
{
input.AddImage("img/Barcode.png");
var Result = Ocr.Read(input);
foreach (var Barcode in Result.Barcodes)
{
// Print each barcode value
Console.WriteLine(Barcode.Value);
// טיפ און ארט פראפערטיעס אויך יקספאוזד
}
}
' using IronOcr;DimOcr = New IronTesseract()Ocr.Configuration.ReadBarCodes = True ' Enable barcode readingUsing input = New OcrInput() input.AddImage("img/Barcode.png") DimResult = Ocr.Read(input) For EachBarcodeInResult.Barcodes ' Print each barcode valueConsole.WriteLine(Barcode.Value) ' טיפ און ארט פראפערטיעס אויך יקספאוזד NextBarcodeEndUsing
' using IronOcr;
Dim Ocr = New IronTesseract()
Ocr.Configuration.ReadBarCodes = True ' Enable barcode reading
Using input = New OcrInput()
input.AddImage("img/Barcode.png")
Dim Result = Ocr.Read(input)
For Each Barcode In Result.Barcodes
' Print each barcode value
Console.WriteLine(Barcode.Value)
' טיפ און ארט פראפערטיעס אויך יקספאוזד
Next Barcode
End Using
OCR אויף ספעציפיש ארעאס פון בילדער
אלע סקאנינג און לייענען מעטהאדס פון IronOCR צושטעלן די פיייקייט פונקט פון וואס טייל פון א בלאט אדער בלעטער מיר ווילן צו לייענען טעקסט. דאס איז זייער נוציק ווען מיר קוקן אין סטאנדערדייזד פארמען און קענען שפארן שרעקלעך צייט און פארבעסערן עפעקטיווקייט.
צו נוצן גערעטעניש געגנטן, מיר דארפן צו לייגן א סיסטעם באווייזן צו System.Drawing אזוי אז מיר קענען נוצן די System.Drawing.Rectangle כייפעץ.
using IronOcr;using System.Drawing; // Required for RectanglevarOcr = new IronTesseract();// Set language for OCROcr.Language = OcrLanguage.Yiddish;using (varInput = new OcrInput()){ // Define the specific area to scan within the image varContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 }; // Add image with defined content areaInput.Add("document.png", ContentArea); // Perform OCR and output the result varResult = Ocr.Read(Input);Console.WriteLine(Result.Text);}
using IronOcr;
using System.Drawing; // Required for Rectangle
var Ocr = new IronTesseract();
// Set language for OCR
Ocr.Language = OcrLanguage.Yiddish;
using (var Input = new OcrInput())
{
// Define the specific area to scan within the image
var ContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// Add image with defined content area
Input.Add("document.png", ContentArea);
// Perform OCR and output the result
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
ImportsIronOcrImportsSystem.Drawing' Required for RectanglePrivateOcr = New IronTesseract()' Set language for OCROcr.Language = OcrLanguage.YiddishUsingInput = New OcrInput() ' Define the specific area to scan within the image DimContentArea = New Rectangle() With { .X = 215, .Y = 1250, .Height = 280, .Width = 1335 } ' Add image with defined content areaInput.Add("document.png", ContentArea) ' Perform OCR and output the result DimResult = Ocr.Read(Input)Console.WriteLine(Result.Text)EndUsing
Imports IronOcr
Imports System.Drawing ' Required for Rectangle
Private Ocr = New IronTesseract()
' Set language for OCR
Ocr.Language = OcrLanguage.Yiddish
Using Input = New OcrInput()
' Define the specific area to scan within the image
Dim ContentArea = New Rectangle() With {
.X = 215,
.Y = 1250,
.Height = 280,
.Width = 1335
}
' Add image with defined content area
Input.Add("document.png", ContentArea)
' Perform OCR and output the result
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
using IronOcr;varOcr = new IronTesseract();// Set language for OCROcr.Language = OcrLanguage.Yiddish;// Create OCR input for the low-quality scanusing (varInput = new OcrInput(@"img\Potter.LowQuality.tiff")){Input.DeNoise(); // Fixes digital noise and scan qualityInput.Deskew(); // Fixes rotation and perspective // Perform OCR and print the result text varResult = Ocr.Read(Input);Console.WriteLine(Result.Text);}
using IronOcr;
var Ocr = new IronTesseract();
// Set language for OCR
Ocr.Language = OcrLanguage.Yiddish;
// Create OCR input for the low-quality scan
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
Input.DeNoise(); // Fixes digital noise and scan quality
Input.Deskew(); // Fixes rotation and perspective
// Perform OCR and print the result text
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
ImportsIronOcrPrivateOcr = New IronTesseract()' Set language for OCROcr.Language = OcrLanguage.Yiddish' Create OCR input for the low-quality scanUsingInput = New OcrInput("img\Potter.LowQuality.tiff")Input.DeNoise() ' Fixes digital noise and scan qualityInput.Deskew() ' Fixes rotation and perspective ' Perform OCR and print the result text DimResult = Ocr.Read(Input)Console.WriteLine(Result.Text)EndUsing
Imports IronOcr
Private Ocr = New IronTesseract()
' Set language for OCR
Ocr.Language = OcrLanguage.Yiddish
' Create OCR input for the low-quality scan
Using Input = New OcrInput("img\Potter.LowQuality.tiff")
Input.DeNoise() ' Fixes digital noise and scan quality
Input.Deskew() ' Fixes rotation and perspective
' Perform OCR and print the result text
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
using IronOcr;varOcr = new IronTesseract();// Set the OCR language to YiddishOcr.Language = OcrLanguage.Yiddish;using (varInput = new OcrInput()){ // Set the title for the PDFInput.Title = "Quarterly Report"; // Add images to OCR inputInput.AddImage("image1.jpeg");Input.AddImage("image2.png");Input.AddImage("image3.gif"); // Read the input and save as a searchable PDF varResult = Ocr.Read(Input);Result.SaveAsSearchablePdf("searchable.pdf");}
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish;
using (var Input = new OcrInput())
{
// Set the title for the PDF
Input.Title = "Quarterly Report";
// Add images to OCR input
Input.AddImage("image1.jpeg");
Input.AddImage("image2.png");
Input.AddImage("image3.gif");
// Read the input and save as a searchable PDF
var Result = Ocr.Read(Input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
ImportsIronOcrPrivateOcr = New IronTesseract()' Set the OCR language to YiddishOcr.Language = OcrLanguage.YiddishUsingInput = New OcrInput() ' Set the title for the PDFInput.Title = "Quarterly Report" ' Add images to OCR inputInput.AddImage("image1.jpeg")Input.AddImage("image2.png")Input.AddImage("image3.gif") ' Read the input and save as a searchable PDF DimResult = Ocr.Read(Input)Result.SaveAsSearchablePdf("searchable.pdf")EndUsing
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish
Using Input = New OcrInput()
' Set the title for the PDF
Input.Title = "Quarterly Report"
' Add images to OCR input
Input.AddImage("image1.jpeg")
Input.AddImage("image2.png")
Input.AddImage("image3.gif")
' Read the input and save as a searchable PDF
Dim Result = Ocr.Read(Input)
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
TIFF צו סעארטשאבלע PDF קאנווערסיאן
קאנווערט א TIFF דאקומענט (אדער קיין גרופע פון בילד טעקעס) גלייך צו א סעארטשאבלע PDF וואס קענען זיין ינדעקסט דורך ינטראנעט, וועבזייטל און Google זוך ענדזשאנז.
using IronOcr;varOcr = new IronTesseract();// Set the OCR language to YiddishOcr.Language = OcrLanguage.Yiddish;using (varInput = new OcrInput()){ // Add multi-frame TIFF to inputInput.AddMultiFrameTiff("example.tiff"); // Read the input and save as a searchable PDF varResult = Ocr.Read(Input).SaveAsSearchablePdf("searchable.pdf");}
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish;
using (var Input = new OcrInput())
{
// Add multi-frame TIFF to input
Input.AddMultiFrameTiff("example.tiff");
// Read the input and save as a searchable PDF
var Result = Ocr.Read(Input).SaveAsSearchablePdf("searchable.pdf");
}
ImportsIronOcrPrivateOcr = New IronTesseract()' Set the OCR language to YiddishOcr.Language = OcrLanguage.YiddishUsingInput = New OcrInput() ' Add multi-frame TIFF to inputInput.AddMultiFrameTiff("example.tiff") ' Read the input and save as a searchable PDF DimResult = Ocr.Read(Input).SaveAsSearchablePdf("searchable.pdf")EndUsing
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish
Using Input = New OcrInput()
' Add multi-frame TIFF to input
Input.AddMultiFrameTiff("example.tiff")
' Read the input and save as a searchable PDF
Dim Result = Ocr.Read(Input).SaveAsSearchablePdf("searchable.pdf")
End Using
ארויספירן OCR רעזולטאטן ווי HTML
OCR בילד צו XHTML קאנווערזשאן.
using IronOcr;varOcr = new IronTesseract();// Set the OCR language to YiddishOcr.Language = OcrLanguage.Yiddish;using (varInput = new OcrInput()){ // Set the title for the HTML resultInput.Title = "Html Title"; // Add images to be OCR'dInput.AddImage("image1.jpeg"); // Perform OCR on the input and save as HTML varResult = Ocr.Read(Input);Result.SaveAsHocrFile("results.html");}
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish;
using (var Input = new OcrInput())
{
// Set the title for the HTML result
Input.Title = "Html Title";
// Add images to be OCR'd
Input.AddImage("image1.jpeg");
// Perform OCR on the input and save as HTML
var Result = Ocr.Read(Input);
Result.SaveAsHocrFile("results.html");
}
ImportsIronOcrPrivateOcr = New IronTesseract()' Set the OCR language to YiddishOcr.Language = OcrLanguage.YiddishUsingInput = New OcrInput() ' Set the title for the HTML resultInput.Title = "Html Title" ' Add images to be OCR'dInput.AddImage("image1.jpeg") ' Perform OCR on the input and save as HTML DimResult = Ocr.Read(Input)Result.SaveAsHocrFile("results.html")EndUsing
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish
Using Input = New OcrInput()
' Set the title for the HTML result
Input.Title = "Html Title"
' Add images to be OCR'd
Input.AddImage("image1.jpeg")
' Perform OCR on the input and save as HTML
Dim Result = Ocr.Read(Input)
Result.SaveAsHocrFile("results.html")
End Using
using IronOcr;varOcr = new IronTesseract();// Set the OCR language to YiddishOcr.Language = OcrLanguage.Yiddish;using (varInput = new OcrInput(@"LowQuality.jpeg")){ // Apply filters to improve OCRInput.DeNoise(); // Fixes digital noise and poor scanningInput.Deskew(); // Fixes rotation and perspective // Perform OCR and print the result varResult = Ocr.Read(Input);Console.WriteLine(Result.Text);}
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish;
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Apply filters to improve OCR
Input.DeNoise(); // Fixes digital noise and poor scanning
Input.Deskew(); // Fixes rotation and perspective
// Perform OCR and print the result
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
ImportsIronOcrPrivateOcr = New IronTesseract()' Set the OCR language to YiddishOcr.Language = OcrLanguage.YiddishUsingInput = New OcrInput("LowQuality.jpeg") ' Apply filters to improve OCRInput.DeNoise() ' Fixes digital noise and poor scanningInput.Deskew() ' Fixes rotation and perspective ' Perform OCR and print the result DimResult = Ocr.Read(Input)Console.WriteLine(Result.Text)EndUsing
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish
Using Input = New OcrInput("LowQuality.jpeg")
' Apply filters to improve OCR
Input.DeNoise() ' Fixes digital noise and poor scanning
Input.Deskew() ' Fixes rotation and perspective
' Perform OCR and print the result
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
רשימה פון אקר בילד פילטערס
ינפוט פילטערס צו פארבעסערן די OCR פארשטעלונג וואס זענען געבויט אין IronOCR:
EnhanceContrast איז א באשטעטיקן געפירט צו די יראן OCR צו אויטאמאטיש פארגרעסערן די קאנטראסט פון טעקסט קעגן דעם הינטערגרונט פון א בילד, ינקריסינג די אקיעראסי פון OCR און בכלל פארגרעסערן די פארשטעלונג און די OCR גיכקייט.
ענהאנסעסאלוטיאן איז א באשטעטיקן וואס אויטאמאטיש דיטעקט בילדער מיט נידעריק האכלאטע (אונטער 275 דפי) און אויטאמאטיש אפסקייל די בילד און שארפן אלע טעקסט אזוי אז עס קען זיין לייענען בישליימעס דורך אן OCR ביבליאטעק. כאטש די אפעראציע איז אין זיך צייט-קאנסומינג, אבער עס בכלל ראדוסאז די קוילעלדיק צייט פאר א OCR אפעראציע אויף א בילד.
Language IronOCR שטיצט 22 אינטערנאציאנאלע שפראך פאקס, און די שפראך באשטעטיקן קענען ווערן גענוצט צו סעלעקטירן איין אדער מער קייפל שפראכן צו זיין געווענדט פאר א OCR אפעראציע.
סטראטעגיע יראן אקר שטיצט צוויי סטראטעגיעס. מיר קענען קלייבן צו נעמען א שנעל און ווייניקער פינטלעך יבערקוקן פון א דאקומענט, אדער נוצן א אוואנסירטע סטראטעגיע וואס ניצט עטלעכע קינסטלעך סייכל מאדעלס צו אויטאמאטיש פארבעסערן די אקיעראסי פון די OCR טעקסט דורך די סטאטיסטיש שייכות פון ווערטער צו יעדער אנדערער אין א זאץ.
// using IronOcr;// PM> Install IronOcr.Languages.ArabicvarOcr = new IronTesseract();// Set the OCR language to ArabicOcr.Language = OcrLanguage.Arabic;using (var input = new OcrInput()){ input.AddImage("img/arabic.gif"); // Apply image filters if needed // IronTesseract can read what conventional Tesseract cannot varResult = Ocr.Read(input); // Console cannot print Arabic on Windows, so save to disk insteadResult.SaveAsTextFile("arabic.txt");}
// using IronOcr;
// PM> Install IronOcr.Languages.Arabic
var Ocr = new IronTesseract();
// Set the OCR language to Arabic
Ocr.Language = OcrLanguage.Arabic;
using (var input = new OcrInput())
{
input.AddImage("img/arabic.gif");
// Apply image filters if needed
// IronTesseract can read what conventional Tesseract cannot
var Result = Ocr.Read(input);
// Console cannot print Arabic on Windows, so save to disk instead
Result.SaveAsTextFile("arabic.txt");
}
' using IronOcr;' PM> Install IronOcr.Languages.ArabicDimOcr = New IronTesseract()' Set the OCR language to ArabicOcr.Language = OcrLanguage.ArabicUsing input = New OcrInput() input.AddImage("img/arabic.gif") ' Apply image filters if needed ' IronTesseract can read what conventional Tesseract cannot DimResult = Ocr.Read(input) ' Console cannot print Arabic on Windows, so save to disk insteadResult.SaveAsTextFile("arabic.txt")EndUsing
' using IronOcr;
' PM> Install IronOcr.Languages.Arabic
Dim Ocr = New IronTesseract()
' Set the OCR language to Arabic
Ocr.Language = OcrLanguage.Arabic
Using input = New OcrInput()
input.AddImage("img/arabic.gif")
' Apply image filters if needed
' IronTesseract can read what conventional Tesseract cannot
Dim Result = Ocr.Read(input)
' Console cannot print Arabic on Windows, so save to disk instead
Result.SaveAsTextFile("arabic.txt")
End Using
קייפל שפראך ביישפיל
עס איז אויך מעגלעך צו OCR ניצן קייפל שפראכן אין דער זעלביקער צייט. דאס קען טאקע העלפן צו באקומען מעטאדאטא און URL ס אין ענגליש שפראך אין אוניקאד דאקומענטן.
// using IronOcr;// PM> Install IronOcr.Languages.ChineseSimplifiedvarOcr = new IronTesseract();// Set primary OCR language to Chinese SimplifiedOcr.Language = OcrLanguage.ChineseSimplified;// Add secondary languageOcr.AddSecondaryLanguage(OcrLanguage.Yiddish);// Add as many languages as neededusing (var input = new OcrInput()){ input.Add("multi-language.pdf"); varResult = Ocr.Read(input); // Save OCR results to a text fileResult.SaveAsTextFile("results.txt");}
// using IronOcr;
// PM> Install IronOcr.Languages.ChineseSimplified
var Ocr = new IronTesseract();
// Set primary OCR language to Chinese Simplified
Ocr.Language = OcrLanguage.ChineseSimplified;
// Add secondary language
Ocr.AddSecondaryLanguage(OcrLanguage.Yiddish);
// Add as many languages as needed
using (var input = new OcrInput())
{
input.Add("multi-language.pdf");
var Result = Ocr.Read(input);
// Save OCR results to a text file
Result.SaveAsTextFile("results.txt");
}
' using IronOcr;' PM> Install IronOcr.Languages.ChineseSimplifiedDimOcr = New IronTesseract()' Set primary OCR language to Chinese SimplifiedOcr.Language = OcrLanguage.ChineseSimplified' Add secondary languageOcr.AddSecondaryLanguage(OcrLanguage.Yiddish)' Add as many languages as neededUsing input = New OcrInput() input.Add("multi-language.pdf") DimResult = Ocr.Read(input) ' Save OCR results to a text fileResult.SaveAsTextFile("results.txt")EndUsing
' using IronOcr;
' PM> Install IronOcr.Languages.ChineseSimplified
Dim Ocr = New IronTesseract()
' Set primary OCR language to Chinese Simplified
Ocr.Language = OcrLanguage.ChineseSimplified
' Add secondary language
Ocr.AddSecondaryLanguage(OcrLanguage.Yiddish)
' Add as many languages as needed
Using input = New OcrInput()
input.Add("multi-language.pdf")
Dim Result = Ocr.Read(input)
' Save OCR results to a text file
Result.SaveAsTextFile("results.txt")
End Using
דיטיילד אקר רעזולטאטן אבדזשעקץ
יראן אקר קערט אן אקר רעזולטאט כייפעץ פאר יעדער אקר אפעראציע. בכלל, דעוועלאפערס נוצן בלויז די טעקסט פארמויג פון דעם כייפעץ צו באקומען די טעקסט סקאנד פון דעם בילד. אבער, די OCR רעזולטאטן DOM איז פיל מער אוואנסירטע ווי דאס.
using IronOcr;using System.Drawing; // include System.Drawing namespace to work with RectanglevarOcr = new IronTesseract();// Set the OCR language to YiddishOcr.Language = OcrLanguage.Yiddish;// Set OCR engine modeOcr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;// Enable barcode readingOcr.Configuration.ReadBarCodes = true;using (varInput = new OcrInput(@"images\sample.tiff")){ OcrResultResult = Ocr.Read(Input); varPages = Result.Pages; // get all pages varWords = Pages[0].Words; // get words from the first page varBarcodes = Result.Barcodes; // get all scanned barcodes // Explore to find a massive, detailed API: // - Pages, Blocks, Paragraphs, Lines, Words, Chars // - Image Export, Fonts Coordinates, Statistical Data}
using IronOcr;
using System.Drawing; // include System.Drawing namespace to work with Rectangle
var Ocr = new IronTesseract();
// Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish;
// Set OCR engine mode
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
// Enable barcode reading
Ocr.Configuration.ReadBarCodes = true;
using (var Input = new OcrInput(@"images\sample.tiff"))
{
OcrResult Result = Ocr.Read(Input);
var Pages = Result.Pages; // get all pages
var Words = Pages[0].Words; // get words from the first page
var Barcodes = Result.Barcodes; // get all scanned barcodes
// Explore to find a massive, detailed API:
// - Pages, Blocks, Paragraphs, Lines, Words, Chars
// - Image Export, Fonts Coordinates, Statistical Data
}
ImportsIronOcrImportsSystem.Drawing' include System.Drawing namespace to work with RectanglePrivateOcr = New IronTesseract()' Set the OCR language to YiddishOcr.Language = OcrLanguage.Yiddish' Set OCR engine modeOcr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm' Enable barcode readingOcr.Configuration.ReadBarCodes = TrueUsingInput = New OcrInput("images\sample.tiff") DimResultAsOcrResult = Ocr.Read(Input) DimPages = Result.Pages' get all pages DimWords = Pages(0).Words' get words from the first page DimBarcodes = Result.Barcodes' get all scanned barcodes ' Explore to find a massive, detailed API: ' - Pages, Blocks, Paragraphs, Lines, Words, Chars ' - Image Export, Fonts Coordinates, Statistical DataEndUsing
Imports IronOcr
Imports System.Drawing ' include System.Drawing namespace to work with Rectangle
Private Ocr = New IronTesseract()
' Set the OCR language to Yiddish
Ocr.Language = OcrLanguage.Yiddish
' Set OCR engine mode
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm
' Enable barcode reading
Ocr.Configuration.ReadBarCodes = True
Using Input = New OcrInput("images\sample.tiff")
Dim Result As OcrResult = Ocr.Read(Input)
Dim Pages = Result.Pages ' get all pages
Dim Words = Pages(0).Words ' get words from the first page
Dim Barcodes = Result.Barcodes ' get all scanned barcodes
' Explore to find a massive, detailed API:
' - Pages, Blocks, Paragraphs, Lines, Words, Chars
' - Image Export, Fonts Coordinates, Statistical Data
End Using
פארשטעלונג
יראנאקר ארבעט אויס פון די קעסטל אן פארשטעלונג ניגן אדער שווער מאדיפיצירן אריינשרייב בילדער.
Speed is Blazing: IronOCR.2020 + איז ארויף צו 10 מאל פאסטער און מאכט איבער 250% ווייניקער עררארס ווי פריערדיקע בילדער.
לערן מער
צו לערנען מער וועגן OCR אין C#, VB, F# אדער קיין אנדערע .NET שפראך, ביטע לייענען אונדזער קאמיוניטי טוטאריאלז, וואס געבן פאקטיש ביישפילן פון ביישפיל ווי אייזן OCR קענען ווערן גענוצט און קען ווייזן די נואנסיז ווי איר באקומען די בעסטער פון דעם ביבליאטעק.