አማርኛ OCR በ C#እና.NET
ሌሎች የዚህ ሰነድ ስሪቶች
IronOCR .NET ኮደሮች አማርኛን ጨምሮ በ 126 ቋንቋ ከምስሎች እና ከፒዲኤፍ ሰነዶች ላይ ጽሑፍን እንዲያነቡ የሚያስችል የ C#ሶፍትዌር አካል ነው ፡፡
ለ ‹NET ›ገንቢዎች ብቻ የተገነባ እና ከሌሎች የቴሴራክት ሞተሮችን በመደበኛነት በፍጥነት እና በትክክለኝነት የላቀ የ‹ ቴስራክት ›ሹካ ነው ፡፡
የ IronOcr.Languages ይዘት አማርኛ
ይህ ፓኬጅ ለ ‹NET ›46 OCR ቋንቋዎችን ይNል ፡፡
- አማርኛ
- አማራነት ምርጥ
- አማራነት
አውርድ
የአማርኛ ቋንቋ ጥቅል [አማርኛ]
* Download as ዚፕ
* Install with as https://www.nuget.org/packages/IronOcr.Languages.Amharic/'> ኑጌት
ጭነት
እኛ ማድረግ ያለብን የመጀመሪያ ነገር የእኛን የአማርኛ ኦ.ሲ.አር. ፓኬጅ በእርስዎ .NET ፕሮጀክት ላይ መጫን ነው ፡
PM> Install-Package IronOCR.Languages.Amharic
የኮድ ምሳሌ
ይህ የ C#ኮድ ምሳሌ የአማርኛ ጽሑፍን ከምስል ወይም ከፒዲኤፍ ሰነድ ያነባል ፡፡
// First, ensure that the IronOcr.Languages.Amharic package is installed.
// PM> Install-Package IronOcr.Languages.Amharic
using IronOcr;
// Create a new instance of IronTesseract for OCR operations.
var Ocr = new IronTesseract();
// Set the OCR language to Amharic.
Ocr.Language = OcrLanguage.Amharic;
// Load and process the input image.
using (var Input = new OcrInput(@"images\Amharic.png"))
{
// Perform OCR on the image and retrieve the result.
var Result = Ocr.Read(Input);
// Extract and store the recognized text.
var AllText = Result.Text;
}
// First, ensure that the IronOcr.Languages.Amharic package is installed.
// PM> Install-Package IronOcr.Languages.Amharic
using IronOcr;
// Create a new instance of IronTesseract for OCR operations.
var Ocr = new IronTesseract();
// Set the OCR language to Amharic.
Ocr.Language = OcrLanguage.Amharic;
// Load and process the input image.
using (var Input = new OcrInput(@"images\Amharic.png"))
{
// Perform OCR on the image and retrieve the result.
var Result = Ocr.Read(Input);
// Extract and store the recognized text.
var AllText = Result.Text;
}
' First, ensure that the IronOcr.Languages.Amharic package is installed.
' PM> Install-Package IronOcr.Languages.Amharic
Imports IronOcr
' Create a new instance of IronTesseract for OCR operations.
Private Ocr = New IronTesseract()
' Set the OCR language to Amharic.
Ocr.Language = OcrLanguage.Amharic
' Load and process the input image.
Using Input = New OcrInput("images\Amharic.png")
' Perform OCR on the image and retrieve the result.
Dim Result = Ocr.Read(Input)
' Extract and store the recognized text.
Dim AllText = Result.Text
End Using
IronOCR ን ለምን ይመርጣሉ?
ብረት OCR ለመጫን ቀላል ፣ የተሟላ እና በጥሩ ሁኔታ የተረጋገጠ የ NET ሶፍትዌር ቤተ-መጽሐፍት ነው።
ምንም የውጭ የድር አገልግሎቶችን ሳይጠቀሙ ፣ ቀጣይ ክፍያዎችን ወይም ምስጢራዊ ሰነዶችን በኢንተርኔት ሳይልኩ 99.8% + OCR ትክክለኛነትን ለማሳካት
IronOCR ን ይምረጡ።
Ch ገንቢዎች ከቫኒላ Tesseract በላይ IronOCR ን ለምን ይመርጣሉ
- እንደ ነጠላ DLL ወይም NuGet ይጫኑ
- ለሳሴራክት 5 ፣ 4 እና 3 ሞተሮችን ከሳጥኑ ውስጥ ያካትታል። ትክክለኝነት 99.8% ከመደበኛ ቴስራክት ጉልህ በሆነ መልኩ ይበልጣል ፡፡
- የሚነድ ፍጥነት እና ባለብዙ ንባብ
- MVC ፣ WebApp ፣ ዴስክቶፕ ፣ ኮንሶል & amp; የአገልጋይ መተግበሪያ ተኳሃኝ ከ ጋር ለመስራት ምንም Exes ወይም C ++ ኮድ
- ሙሉ ፒዲኤፍ OCR ድጋፍ OCR ን ከሞላ ጎደል ማንኛውንም የምስል ፋይል ወይም ፒዲኤፍ ለማከናወንሙሉ። የተጣራ ኮር ፣ መደበኛ እና FrameWork ድጋፍበዊንዶውስ ፣ ማክ ፣ ሊኑክስ ፣ አዙሬ ፣ ዶከር ፣ ላምብዳ ፣ ኤኤስኤስ ላይ ማሰማራት
- የአሞሌ ኮዶች እና የ QR ኮዶችን ያንብቡ OCR ን ወደ XHTML ይላኩለመፈለግ የፒ.ዲ.ኤፍ. ሰነዶች ኦ.ሲ.አር.ን ይላኩየብዙ ማነበብ ድጋፍ
- 126 ዓለም አቀፍ ቋንቋዎች ሁሉ በኑጂ ወይም በኦክራዳታ ፋይሎች በኩል ይተዳደራሉ
- ምስሎችን ፣ መጋጠሚያዎችን ፣ ስታቲስቲክሶችን እና ቅርጸ-ቁምፊዎችን ያውጡ። ጽሑፍ ብቻ አይደለም።
- በ ‹የንግድ› ውስጥ የ “Tesseract OCR” ን እንደገና ለማሰራጨት ሊያገለግል ይችላል & amp ;; የባለቤትነት ማመልከቻዎች
ከእውነተኛው የዓለም ምስሎች እና እንደ ፎቶግራፎች ካሉ ፍፁም ያልሆኑ ሰነዶች ወይም ዲጂታል ጫጫታ ወይም ጉድለቶች ሊኖሩ ከሚችሉ ዝቅተኛ ጥራት ያላቸው ቅኝቶች ጋር ሲሰራ የብረት ኦ.ሲ.አር. ሌሎች እንደዚህ በደንብ በእነዚህ በእውነተኛው ዓለም አጠቃቀም ጉዳዮች ላይ።
OCR ከሴሴክራክት 5 ጋር - በ C & num; Code ውስጥ ኮድ መስጠት ይጀምሩ
ከዚህ በታች ያለው የኮድ ናሙና C#ወይም VB .NET ን በመጠቀም ከምስል ጽሑፍ ለማንበብ ምን ያህል ቀላል እንደሆነ ያሳያል ፡፡
OneLiner
using IronOcr;
// Use IronTesseract to easily perform OCR in one line.
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
using IronOcr;
// Use IronTesseract to easily perform OCR in one line.
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
Imports IronOcr
' Use IronTesseract to easily perform OCR in one line.
Private Text As String = (New IronTesseract()).Read("img\Screenshot.png").Text
ሊዋቀር የሚችል ሰላም ዓለም
// PM> Install-Package IronOCR.Languages.Amharic
using IronOcr;
// Create a new instance of IronTesseract for OCR operations.
var Ocr = new IronTesseract();
// Set the OCR language to Amharric.
Ocr.Language = OcrLanguage.Amharic;
// Create OCR input.
using (var Input = new OcrInput())
{
// Add images to the OCR input.
Input.AddImage("images/sample.jpeg");
// Perform OCR on the input and retrieve the result.
var Result = Ocr.Read(Input);
// Output the recognized text to the console.
Console.WriteLine(Result.Text);
}
// PM> Install-Package IronOCR.Languages.Amharic
using IronOcr;
// Create a new instance of IronTesseract for OCR operations.
var Ocr = new IronTesseract();
// Set the OCR language to Amharric.
Ocr.Language = OcrLanguage.Amharic;
// Create OCR input.
using (var Input = new OcrInput())
{
// Add images to the OCR input.
Input.AddImage("images/sample.jpeg");
// Perform OCR on the input and retrieve the result.
var Result = Ocr.Read(Input);
// Output the recognized text to the console.
Console.WriteLine(Result.Text);
}
' PM> Install-Package IronOCR.Languages.Amharic
Imports IronOcr
' Create a new instance of IronTesseract for OCR operations.
Private Ocr = New IronTesseract()
' Set the OCR language to Amharric.
Ocr.Language = OcrLanguage.Amharic
' Create OCR input.
Using Input = New OcrInput()
' Add images to the OCR input.
Input.AddImage("images/sample.jpeg")
' Perform OCR on the input and retrieve the result.
Dim Result = Ocr.Read(Input)
' Output the recognized text to the console.
Console.WriteLine(Result.Text)
End Using
ሐ # ፒዲኤፍ OCR
ተመሳሳይ አቀራረብ በተመሳሳይ መንገድ ከማንኛውም የፒዲኤፍ ሰነድ ጽሑፍ ለማውጣት ሊያገለግል ይችላል።
using IronOcr;
// Initialize the OCR engine and set the language to Amharic.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load a PDF and extract text.
using (var input = new OcrInput())
{
input.AddPdf("example.pdf", "password");
// Optionally choose specific PDF page numbers for OCR if needed.
// Perform OCR and get results.
var Result = Ocr.Read(input);
// Output the recognized text and the page count to the console.
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count()} Pages");
}
using IronOcr;
// Initialize the OCR engine and set the language to Amharic.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load a PDF and extract text.
using (var input = new OcrInput())
{
input.AddPdf("example.pdf", "password");
// Optionally choose specific PDF page numbers for OCR if needed.
// Perform OCR and get results.
var Result = Ocr.Read(input);
// Output the recognized text and the page count to the console.
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count()} Pages");
}
Imports IronOcr
' Initialize the OCR engine and set the language to Amharic.
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
' Load a PDF and extract text.
Using input = New OcrInput()
input.AddPdf("example.pdf", "password")
' Optionally choose specific PDF page numbers for OCR if needed.
' Perform OCR and get results.
Dim Result = Ocr.Read(input)
' Output the recognized text and the page count to the console.
Console.WriteLine(Result.Text)
Console.WriteLine($"{Result.Pages.Count()} Pages")
End Using
OCR ለ ‹MultiPage TIFFs›
ብዙ ገጽ ሰነዶችን ጨምሮ የ OCR ንባብ TIFF ፋይል ቅርጸት። እንዲሁም TIFF ከሚፈለግ ጽሑፍ ጋር በቀጥታ ወደ ፒዲኤፍ ፋይል ሊቀየር ይችላል።
using IronOcr;
// Create an IronTesseract instance and set the language.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load the multi-page TIFF file.
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("multi-frame.tiff");
// Process and read the input.
var Result = Ocr.Read(Input);
// Print the recognized text.
Console.WriteLine(Result.Text);
}
using IronOcr;
// Create an IronTesseract instance and set the language.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load the multi-page TIFF file.
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("multi-frame.tiff");
// Process and read the input.
var Result = Ocr.Read(Input);
// Print the recognized text.
Console.WriteLine(Result.Text);
}
Imports IronOcr
' Create an IronTesseract instance and set the language.
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
' Load the multi-page TIFF file.
Using Input = New OcrInput()
Input.AddMultiFrameTiff("multi-frame.tiff")
' Process and read the input.
Dim Result = Ocr.Read(Input)
' Print the recognized text.
Console.WriteLine(Result.Text)
End Using
ባርኮዶች እና QR
የብረት OCR ልዩ ገጽታ ጽሑፍን በሚቃኝበት ጊዜ የአሞሌ ኮዶች እና የ QR ኮዶችን ከሰነዶች ማንበብ ይችላል፡፡
using IronOcr;
// Create an IronTesseract instance.
var Ocr = new IronTesseract();
// Enable barcode reading in the configuration.
Ocr.Configuration.ReadBarCodes = true;
// Load the image containing barcodes.
using (var input = new OcrInput())
{
input.AddImage("img/Barcode.png");
// Perform OCR to read both text and barcodes.
var Result = Ocr.Read(input);
// Loop through found barcodes and output their values.
foreach (var Barcode in Result.Barcodes)
{
Console.WriteLine(Barcode.Value);
// Additional properties such as type and location are also available.
}
}
using IronOcr;
// Create an IronTesseract instance.
var Ocr = new IronTesseract();
// Enable barcode reading in the configuration.
Ocr.Configuration.ReadBarCodes = true;
// Load the image containing barcodes.
using (var input = new OcrInput())
{
input.AddImage("img/Barcode.png");
// Perform OCR to read both text and barcodes.
var Result = Ocr.Read(input);
// Loop through found barcodes and output their values.
foreach (var Barcode in Result.Barcodes)
{
Console.WriteLine(Barcode.Value);
// Additional properties such as type and location are also available.
}
}
Imports IronOcr
' Create an IronTesseract instance.
Private Ocr = New IronTesseract()
' Enable barcode reading in the configuration.
Ocr.Configuration.ReadBarCodes = True
' Load the image containing barcodes.
Using input = New OcrInput()
input.AddImage("img/Barcode.png")
' Perform OCR to read both text and barcodes.
Dim Result = Ocr.Read(input)
' Loop through found barcodes and output their values.
For Each Barcode In Result.Barcodes
Console.WriteLine(Barcode.Value)
' Additional properties such as type and location are also available.
Next Barcode
End Using
በተወሰኑ ምስሎች ምስሎች ላይ OCR
ሁሉም የብረት OCR ን የመቃኘት እና የማንበብ ዘዴዎች ጽሑፍን ለማንበብ እንደፈለግን የትኛውን ገጽ ወይም ገጾች በትክክል ለማንበብ ችሎታን ይሰጣሉ።
using IronOcr;
// Create an IronTesseract instance for reading specific page areas.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
using (var Input = new OcrInput())
{
// Define the area of interest on the image.
var ContentArea = new System.Drawing.Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// These values are in pixels.
// Add the area of interest to the OCR input.
Input.Add("document.png", ContentArea);
// Perform OCR and extract text within the given area.
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
using IronOcr;
// Create an IronTesseract instance for reading specific page areas.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
using (var Input = new OcrInput())
{
// Define the area of interest on the image.
var ContentArea = new System.Drawing.Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// These values are in pixels.
// Add the area of interest to the OCR input.
Input.Add("document.png", ContentArea);
// Perform OCR and extract text within the given area.
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
Imports IronOcr
' Create an IronTesseract instance for reading specific page areas.
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
Using Input = New OcrInput()
' Define the area of interest on the image.
Dim ContentArea = New System.Drawing.Rectangle() With {
.X = 215,
.Y = 1250,
.Height = 280,
.Width = 1335
}
' These values are in pixels.
' Add the area of interest to the OCR input.
Input.Add("document.png", ContentArea)
' Perform OCR and extract text within the given area.
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
OCR ለዝቅተኛ ጥራት ቅኝቶች
የብረት OCR OcrInput
ክፍል መደበኛ ቴሴራክት ሊያነበው የማይችላቸውን ቅኝቶች ማስተካከል ይችላል።
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load the low-quality image for OCR.
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
// Apply image processing to enhance OCR results.
Input.DeNoise(); // Corrects pixel-level noise.
Input.Deskew(); // Aligns the image to fix slanting.
var Result = Ocr.Read(Input);
// Output the extracted text.
Console.WriteLine(Result.Text);
}
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load the low-quality image for OCR.
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
// Apply image processing to enhance OCR results.
Input.DeNoise(); // Corrects pixel-level noise.
Input.Deskew(); // Aligns the image to fix slanting.
var Result = Ocr.Read(Input);
// Output the extracted text.
Console.WriteLine(Result.Text);
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
' Load the low-quality image for OCR.
Using Input = New OcrInput("img\Potter.LowQuality.tiff")
' Apply image processing to enhance OCR results.
Input.DeNoise() ' Corrects pixel-level noise.
Input.Deskew() ' Aligns the image to fix slanting.
Dim Result = Ocr.Read(Input)
' Output the extracted text.
Console.WriteLine(Result.Text)
End Using
እንደ ፍለጋ ፒዲኤፍ የ OCR ውጤቶችን ይላኩ
ከሚታተሙ የጽሑፍ ሕብረቁምፊዎች ጋር ወደ ፒዲኤፍ ምስል። በፍለጋ ሞተሮች እና በመረጃ ቋቶች መረጃ ጠቋሚ ማድረግ ይቻላል።
using IronOcr;
// Create an instance of IronTesseract for OCR processing.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Prepare images and set OCR metadata.
using (var Input = new OcrInput())
{
input.Title = "Quarterly Report";
input.AddImage("image1.jpeg");
input.AddImage("image2.png");
input.AddImage("image3.gif");
// Perform OCR and save the recognized content as a searchable PDF.
var Result = Ocr.Read(input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
using IronOcr;
// Create an instance of IronTesseract for OCR processing.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Prepare images and set OCR metadata.
using (var Input = new OcrInput())
{
input.Title = "Quarterly Report";
input.AddImage("image1.jpeg");
input.AddImage("image2.png");
input.AddImage("image3.gif");
// Perform OCR and save the recognized content as a searchable PDF.
var Result = Ocr.Read(input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
Imports IronOcr
' Create an instance of IronTesseract for OCR processing.
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
' Prepare images and set OCR metadata.
Using Input = New OcrInput()
input.Title = "Quarterly Report"
input.AddImage("image1.jpeg")
input.AddImage("image2.png")
input.AddImage("image3.gif")
' Perform OCR and save the recognized content as a searchable PDF.
Dim Result = Ocr.Read(input)
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
ሊፈለግ ወደ ፒዲኤፍ ልወጣ TIFF
በኢንተርኔት ፣ በድር ጣቢያ እና በ google የፍለጋ ሞተሮች ሊመዘገብ በሚችል ሊፈለግ ወደሚችል ፒዲኤፍ በቀጥታ የ TIFF ሰነድ (ወይም ማንኛውንም የምስል ፋይሎች ቡድን) አይመልሱ ፡፡
using IronOcr;
// Create and configure an instance of IronTesseract for OCR.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load a multi-frame TIFF file.
using (var Input = new OcrInput())
{
input.AddMultiFrameTiff("example.tiff");
// Read and convert the TIFF to a searchable PDF.
var Result = Ocr.Read(input).SaveAsSearchablePdf("searchable.pdf");
}
using IronOcr;
// Create and configure an instance of IronTesseract for OCR.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load a multi-frame TIFF file.
using (var Input = new OcrInput())
{
input.AddMultiFrameTiff("example.tiff");
// Read and convert the TIFF to a searchable PDF.
var Result = Ocr.Read(input).SaveAsSearchablePdf("searchable.pdf");
}
Imports IronOcr
' Create and configure an instance of IronTesseract for OCR.
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
' Load a multi-frame TIFF file.
Using Input = New OcrInput()
input.AddMultiFrameTiff("example.tiff")
' Read and convert the TIFF to a searchable PDF.
Dim Result = Ocr.Read(input).SaveAsSearchablePdf("searchable.pdf")
End Using
የኦ.ሲ.አር.ሲ ውጤቶችን እንደ ኤችቲኤምኤል ይላኩ
OCR ምስል ወደ XHTML ልወጣ።
using IronOcr;
// Create an IronTesseract instance and set the language to Amharic.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Initialize the OCR input and set properties.
using (var Input = new OcrInput())
{
input.Title = "Html Title";
input.AddImage("image1.jpeg");
// Perform OCR and save the result as an HTML file.
var Result = Ocr.Read(input);
Result.SaveAsHocrFile("results.html");
}
using IronOcr;
// Create an IronTesseract instance and set the language to Amharic.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Initialize the OCR input and set properties.
using (var Input = new OcrInput())
{
input.Title = "Html Title";
input.AddImage("image1.jpeg");
// Perform OCR and save the result as an HTML file.
var Result = Ocr.Read(input);
Result.SaveAsHocrFile("results.html");
}
Imports IronOcr
' Create an IronTesseract instance and set the language to Amharic.
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
' Initialize the OCR input and set properties.
Using Input = New OcrInput()
input.Title = "Html Title"
input.AddImage("image1.jpeg")
' Perform OCR and save the result as an HTML file.
Dim Result = Ocr.Read(input)
Result.SaveAsHocrFile("results.html")
End Using
የ OCR ምስል ማሻሻያ ማጣሪያዎች
የኦ.ሲ.አር.ሲ አፈፃፀም ለማሻሻል OcrInput
ለ OcrInput
ዕቃዎች ልዩ ማጣሪያዎችን ይሰጣል ፡
የምስል ማሻሻያ ኮድ ምሳሌ
የተሻሉ እና ፈጣን የኦ.ሲ.አር. ውጤቶችን ለማምረት የ OCR ግቤት ምስሎችን ከፍ ያለ ጥራት እንዲኖራቸው ያደርጋል ፡፡
using IronOcr;
// Initialize IronTesseract for OCR operations.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load a low-quality image for OCR.
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Optimize the image for better OCR results.
Input.DeNoise(); // Remove digital noise.
Input.Deskew(); // Corrects image orientation.
var Result = Ocr.Read(Input);
// Print the extracted text.
Console.WriteLine(Result.Text);
}
using IronOcr;
// Initialize IronTesseract for OCR operations.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
// Load a low-quality image for OCR.
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Optimize the image for better OCR results.
Input.DeNoise(); // Remove digital noise.
Input.Deskew(); // Corrects image orientation.
var Result = Ocr.Read(Input);
// Print the extracted text.
Console.WriteLine(Result.Text);
}
Imports IronOcr
' Initialize IronTesseract for OCR operations.
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
' Load a low-quality image for OCR.
Using Input = New OcrInput("LowQuality.jpeg")
' Optimize the image for better OCR results.
Input.DeNoise() ' Remove digital noise.
Input.Deskew() ' Corrects image orientation.
Dim Result = Ocr.Read(Input)
' Print the extracted text.
Console.WriteLine(Result.Text)
End Using
የ OCR ምስል ማጣሪያዎች ዝርዝር
በ IronOCR ውስጥ የተገነቡትን የ OCR አፈፃፀም ለማሳደግ የግብዓት ማጣሪያዎች የሚከተሉትን ያካትታሉ
- OcrInput.Rotate (ድርብ ዲግሪዎች) - ምስሎችን በሰዓት አቅጣጫ በበርካታ ዲግሪዎች ያሽከረክራል ። ለፀረ-ሰዓት አቅጣጫ ፣ አሉታዊ ቁጥሮችን ይጠቀሙ።
- OcrInput.Binarize () - ይህ የምስል ማጣሪያ እያንዳንዱን ፒክሰል ጥቁር ወይም ነጭን ያለ መካከለኛ መሬት ይለውጣል ፡ ከጽሑፍ እና ከበስተጀርባ በጣም ዝቅተኛ የንፅፅር OCR አፈፃፀም ጉዳዮችን ሊያሻሽል ይችላል ፡፡
- OcrInput.ToGrayScale () - ይህ የምስል ማጣሪያ እያንዳንዱን ፒክሰል ወደ ግራጫማ ጥላ ይቀይረዋል ። የ OCR ትክክለኝነትን ለማሻሻል የማይመስል ነገር ግን ፍጥነትን ሊያሻሽል ይችላል
- OcrInput.Contrast () - ንፅፅርን በራስ-ሰር ይጨምራል። ይህ ማጣሪያ ብዙውን ጊዜ በዝቅተኛ ንፅፅር ቅኝቶች ውስጥ የ OCR ፍጥነት እና ትክክለኝነትን ያሻሽላል።
- OcrInput.DeNoise () - ዲጂታል ጫጫታ ያስወግዳል። ይህ ማጣሪያ ጫጫታ በሚጠበቅበት ቦታ ብቻ ጥቅም ላይ መዋል አለበት ፡፡
- OcrInput.Invert () - እያንዳንዱን ቀለም ይገለብጣል ፡ Eg White ጥቁር ይሆናል ጥቁር ነጭ ይሆናል ፡፡
- OcrInput.Dilate () - የላቀ ሥነ- መለኮት ። መፍረስ በምስል ውስጥ ባሉ ነገሮች ድንበር ላይ ፒክስሎችን ይጨምራል ፡ የኢሮድ ተቃራኒ
- OcrInput.Erode () - የላቀ ሥነ- መለኮት ። መሸርሸር በእቃ ድንበሮች ላይ ፒክሴሎችን ያስወግዳል የዲላቴ ተቃራኒ
- OcrInput.Deskew () - ምስልን ያሽከረክራል ስለሆነም ትክክለኛው መንገድ ወደ ላይ እና orthogonal ነው። ይህ ለ “OCR” በጣም ጠቃሚ ነው ፣ ምክንያቱም ለተሰነጣጠሉ ቅኝቶች Tesseract መቻቻል እስከ 5 ዲግሪዎች ዝቅተኛ ሊሆን ይችላል።
- OcrInput.DeepCleanBackgroundNoise () - ከባድ የጀርባ ጫጫታ ማስወገድ። እጅግ በጣም የሰነድ ዳራ ጫጫታ ቢታወቅ ይህንን ማጣሪያ ብቻ ይጠቀሙ ፣ ምክንያቱም ይህ ማጣሪያ የ OCR ንፁህ ሰነዶችን ትክክለኛነት የመቀነስ አደጋም አለው ፣ እና በጣም ሲፒዩ ውድ ነው።
- OcrInput.EnhanceResolution - አነስተኛ ጥራት ያላቸውን ምስሎች ጥራት ያሻሽላል ፡ ይህ ማጣሪያ ብዙውን ጊዜ አያስፈልገውም ምክንያቱም OcrInput.MinimumDPI እና OcrInput.TargetDPI ዝቅተኛ ጥራት ያላቸው ግብዓቶችን በራስ-ሰር ይይዝና ይፈታል ፡
CleanBackgroundNoise. ይህ በተወሰነ ጊዜ የሚወስድ ቅንብር ነው; ሆኖም ቤተ-መፃህፍት በዲጂታል ምስል ውስጥ የዲጂታል ጫጫታ ፣ የወረቀት ብስባሽ እና ሌሎች ጉድለቶችን በራስ-ሰር እንዲያጸዱ ያስችላቸውል ፣ ርርም በጋር የትክክለኛ ና ፣ ይህም በሌሎች የኦ.ሲ.አር.-ቤተ-መጽሐፍት የማንበብ አቅም የለውም ፡፡
EnhanceContrast ብረት OCR በራስ-ሰር ከምስል ጀርባ ጋር የፅሁፍ ንፅፅርን እንዲጨምር የሚያደርግ ፣ የኦ.ሲ.አር.ን ትክክለኛነት በመጨመር እና በአጠቃላይ አፈፃፀምን እና የኦ.ሲ.አር.
EnhanceResolution በዝቅተኛ ጥራት ያላቸውን ምስሎች (ከ 275 ዲፒአይ በታች የሆኑ) በራስ-ሰር ፈልጎ የሚያገኝ እና ምስሉን በራስ-ሰር ከፍ የሚያደርግ እና ከዚያም በኦ.ሲ.አር. ቤተመፃህፍት በትክክል ሊነበብ የሚችል ጽሑፍን ሁሉ አፅንዖት ይሰጣል ፡ ምንም እንኳን ይህ ክዋኔ በራሱ ጊዜ የሚወስድ ቢሆንም ፣ በአጠቃላይ በምስል ላይ ለ “OCR” ሥራ አጠቃላይ ጊዜን ይቀንሰዋል ፡፡
የቋንቋ ብረት ኦ.ሲ.አር. 22 ዓለም አቀፍ የቋንቋ ጥቅሎችን ይደግፋል ፣ እና የቋንቋ ቅንብር ለኦ.ሲ.አር. ኦፕሬሽን የሚተገበሩ አንድ ወይም ከዚያ በላይ ቋንቋዎችን ለመምረጥ ሊያገለግል ይችላል ፡
ስትራቴጂ ብረት ብረት ኦ.ሲ.አር. ሁለት ስልቶችን ይደግፋል ፡ እኛ ለፈጣን እና ለትክክለኛው የሰነድ ፍተሻ ለመሄድ ማጠናኸማባት የትክክለኛ ጽሑፍና ምርኰኞች ትክክላዊ ነው ፤ ሲበልጥ ምርኰኞች ዘርፏ ወይም ይህንን መግረመስ እና በአረፍላት ውጤቱ ውስጥ ከሚሆን.
ColorSpace በግራጫ ወይም በቀለም ወደ OCR መምረጥ የምንችልበት ቅንብር ነው ፡ በአጠቃላይ ፣ ግራጫው ምርጥ አማራጭ ነው ፡፡ ሆኖም ፣ አንዳንድ ጊዜ ተመሳሳይ ቀለም ያላቸው ግን በጣም የተለያየ ቀለም ያላቸው ጽሑፎች ወይም ዳራዎች ሲኖሩ ባለሙሉ ቀለም ቀለም ቦታ የተሻለ ውጤት ያስገኛል ፡፡
WhiteTextOnDarkBackgrounds ን ይፈልጉ። በአጠቃላይ ሁሉም የ OCR ቤተመፃህፍት በነጭ ዳራዎች ላይ ጥቁር ጽሑፍን ለማየት ይጠብቃሉ ፡፡ ይህ ቅንብር የብረት ኦ.ሲ.አር. (ኦ.ሲ.አር.) አሉታዊ ነገሮችን በራስ-ሰር ወይም በነጭ ጽሑፍ ጨለማ ገጾችን ፈልጎ እንዲያነብ ያስችላቸዋል ፡፡
የግብዓት ምስል ዓይነት. ይህ ቅንብር ገንቢው የ OCR ቤተ መፃህፍትን እንደ ሙሉ ቅጽበታዊ ገጽ እይታ ሙሉ ሰነድን ወይም ቅንጥቦችን እየተመለከተ ስለመሆኑ እንዲመራው ያስችለዋል።
RotateAndStraighten ብረት OCR የሚሽከረክሩ ብቻ ሳይሆን ምናልባትም እንደ የጽሑፍ ሰነዶች ፎቶግራፎች ያሉ አመለካከቶችን የያዙ ሰነዶችን የማንበብ ልዩ ችሎታን የሚፈቅድ የላቀ ቅንብር ነው ፡
አንብብ ባርኮዶች ትልቅ ተጨማሪ የጊዜ ጭነት ሳይጨምሩ ብረት ኦ.ሲ.አር. (OCR) እንዲሁ ጽሑፍን በሚያነብበት ጊዜ የአሞሌ ኮዶች እና የ QR ኮዶችን በራስ-ሰር እንዲያነብ የሚያስችል ጠቃሚ ባህሪ ነው ፡
ColorDepth ይህ ቅንብር የአንድ ቀለም ጥልቀት ለማወቅ የ OCR ቤተመፃህፍት በፒክሰል ምን ያህል ቢት እንደሚጠቀሙ ይወስናል ፡፡ ከፍ ያለ የቀለም ጥልቀት የ OCR ጥራትን ሊጨምር ይችላል ፣ ግን ለ OCR ሥራው ለማጠናቀቅ የሚያስፈልገውን ጊዜም ይጨምራል።
126 የቋንቋ ጥቅሎች
ብረት ኦ.ሲ.አር. (አር.ሲ.አር.) 126 ዓለም አቀፍ ቋንቋዎችን እንደ DLLs በተሰራጩ የቋንቋ ጥቅሎች በኩል ይደግፋል ፣ ከዚህ ድር ጣቢያ ማውረድ ይችላል ፣ እንዲሁም ከ NuGet ጥቅል ሥራ አስኪያጅ ፡
ቋንቋዎች ጀርመንኛ ፣ ፈረንሳይኛ ፣ እንግሊዝኛ ፣ ቻይንኛ ፣ ጃፓኖች እና ሌሎችንም ያካትታሉ ፡፡ የልዩ ባለሙያ ቋንቋ ጥቅሎች ለፓስፖርት MRZ ፣ ለ MICR ቼኮች ፣ ለፋይናንስ መረጃዎች ፣ ለፈቃድ ሰሌዳዎች እና ለሌሎችም ብዙ ናቸው ፡፡ እንዲሁም ማንኛውንም “tesseract” .traineddata ”ፋይልን መጠቀም ይችላሉ - እርስዎ እራስዎ የሚፈጥሯቸውን ጨምሮ።
የቋንቋ ምሳሌ
ሌሎች የኦ.ሲ.አር.ር. ቋንቋዎችን በመጠቀም ፡፡
// using IronOcr;
// PM> Install IronOcr.Languages.Arabic
// Create an IronTesseract instance and configure it to read Arabic.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Arabic;
// Load images and apply OCR preprocessing if necessary.
using (var input = new OcrInput())
{
input.AddImage("img/arabic.gif");
// Apply additional image processing filters if needed.
// IronTesseract can read images even with low quality.
// Perform OCR and get the result.
var Result = Ocr.Read(input);
// Save the recognized text as Arabic can be problematic on certain Windows consoles.
Result.SaveAsTextFile("arabic.txt");
}
// using IronOcr;
// PM> Install IronOcr.Languages.Arabic
// Create an IronTesseract instance and configure it to read Arabic.
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Arabic;
// Load images and apply OCR preprocessing if necessary.
using (var input = new OcrInput())
{
input.AddImage("img/arabic.gif");
// Apply additional image processing filters if needed.
// IronTesseract can read images even with low quality.
// Perform OCR and get the result.
var Result = Ocr.Read(input);
// Save the recognized text as Arabic can be problematic on certain Windows consoles.
Result.SaveAsTextFile("arabic.txt");
}
' using IronOcr;
' PM> Install IronOcr.Languages.Arabic
' Create an IronTesseract instance and configure it to read Arabic.
Dim Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Arabic
' Load images and apply OCR preprocessing if necessary.
Using input = New OcrInput()
input.AddImage("img/arabic.gif")
' Apply additional image processing filters if needed.
' IronTesseract can read images even with low quality.
' Perform OCR and get the result.
Dim Result = Ocr.Read(input)
' Save the recognized text as Arabic can be problematic on certain Windows consoles.
Result.SaveAsTextFile("arabic.txt")
End Using
የብዙ ቋንቋ ምሳሌ
Multiple languages recognization can be done using IronOCR, helpful for handling documents with mixed languages, such as English, HTML in documents, etc.
// using IronOcr;
// PM> Install IronOcr.Languages.ChineseSimplified
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.ChineseSimplified;
Ocr.AddSecondaryLanguage(OcrLanguage.Amharic);
// You can add any number of secondary languages for mixed content OCR.
using (var input = new OcrInput())
{
input.Add("multi-language.pdf");
var Result = Ocr.Read(input);
Result.SaveAsTextFile("results.txt");
}
// using IronOcr;
// PM> Install IronOcr.Languages.ChineseSimplified
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.ChineseSimplified;
Ocr.AddSecondaryLanguage(OcrLanguage.Amharic);
// You can add any number of secondary languages for mixed content OCR.
using (var input = new OcrInput())
{
input.Add("multi-language.pdf");
var Result = Ocr.Read(input);
Result.SaveAsTextFile("results.txt");
}
' using IronOcr;
' PM> Install IronOcr.Languages.ChineseSimplified
Dim Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.ChineseSimplified
Ocr.AddSecondaryLanguage(OcrLanguage.Amharic)
' You can add any number of secondary languages for mixed content OCR.
Using input = New OcrInput()
input.Add("multi-language.pdf")
Dim Result = Ocr.Read(input)
Result.SaveAsTextFile("results.txt")
End Using
ዝርዝር ዝርዝር የ “OCR” ውጤቶች ነገሮች
Iron OCR returns a detailed object model for every OCR result output, valuable for developers who want to understand or incorporate text recognized from images in their software products.
using IronOcr;
using System.Drawing; // Make sure to include the Assembly
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
Ocr.Configuration.ReadBarCodes = true; // Set to true to read barcodes.
using (var Input = new OcrInput(@"images\sample.tiff"))
{
OcrResult Result = Ocr.Read(Input);
var Pages = Result.Pages;
var Words = Pages[0].Words;
var Barcodes = Result.Barcodes;
// A comprehensive API for retrieving text, blocks, paragraphs, lines, words, chars
// as well as detailed input-output statistics and meta can be accessed here.
}
using IronOcr;
using System.Drawing; // Make sure to include the Assembly
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Amharic;
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
Ocr.Configuration.ReadBarCodes = true; // Set to true to read barcodes.
using (var Input = new OcrInput(@"images\sample.tiff"))
{
OcrResult Result = Ocr.Read(Input);
var Pages = Result.Pages;
var Words = Pages[0].Words;
var Barcodes = Result.Barcodes;
// A comprehensive API for retrieving text, blocks, paragraphs, lines, words, chars
// as well as detailed input-output statistics and meta can be accessed here.
}
Imports IronOcr
Imports System.Drawing ' Make sure to include the Assembly
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Amharic
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm
Ocr.Configuration.ReadBarCodes = True ' Set to true to read barcodes.
Using Input = New OcrInput("images\sample.tiff")
Dim Result As OcrResult = Ocr.Read(Input)
Dim Pages = Result.Pages
Dim Words = Pages(0).Words
Dim Barcodes = Result.Barcodes
' A comprehensive API for retrieving text, blocks, paragraphs, lines, words, chars
' as well as detailed input-output statistics and meta can be accessed here.
End Using
አፈፃፀም
IronOCR operates efficiently and does not require pre-processing images outside the Iron package, boasting performance consistent with new hardware optimizations.
The speed is significantly improved with IronOcr.2020, providing faster recognition and a significantly improved accuracy compared to earlier build versions.
የበለጠ ለመረዳት
To gain further insights on using OCR in C#, VB, F#, or any .NET language, explore our community tutorials showcasing real-world examples and best practices for utilizing IronOCR.
A full API object model reference for .NET developers is also available.