C#र .NET मा नेपाली OCR
यस कागजातको अन्य संस्करणहरू:
IronOCR एक C# सफ्टवेयर घटक हो। .NET कोडरहरूलाई छवि सहित १२ PDF भाषामा पीडीएफ कागजातहरू पाठ पढ्न मद्दत पुर्याउँछ।
यो Tesseract को उन्नत फोर्क हो, विशेष गरी .NET विकासकर्ताहरूको लागि निर्मित हो र वेग र सटीकता दुबै अन्य टेस्क्रैट इन्जिनहरूलाई नियमित रूपमा प्रदर्शन गर्दछ।
IronOcr.Languages.Nepali का सामग्रीहरू
यस प्याकेजमा .NET को लागी 43 OCR भाषाहरू छन्।
- नेपाली
- नेपाली बेस्ट
- नेपाली फास्ट
डाउनलोड गर्नुहोस्
नेपाली भाषा प्याक [नेपाली]
* Download as Zip
* Install via NuGet from https://www.nuget.org/packages/IronOcr.Languages.Nepali/
स्थापना
हामीले गर्नुपर्ने पहिलो कुरा तपाईको नेपाली नेट OCR प्याकेज तपाईको .NET प्रोजेक्टमा स्थापना गर्नु हो।
PM> Install-Package IronOCR.Languages.Nepali
कोड उदाहरण
यो C#कोड उदाहरणले छवि वा PDF कागजातबाट नेपाली पाठ पढ्छ।
// PM> Install-Package IronOCR.Languages.Nepali
using IronOcr;
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Nepali for OCR
Ocr.Language = OcrLanguage.Nepali;
// Using a statement to properly dispose of resources
using (var Input = new OcrInput(@"images\Nepali.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Get the recognized text from the OCR result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
// PM> Install-Package IronOCR.Languages.Nepali
using IronOcr;
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Nepali for OCR
Ocr.Language = OcrLanguage.Nepali;
// Using a statement to properly dispose of resources
using (var Input = new OcrInput(@"images\Nepali.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Get the recognized text from the OCR result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
' PM> Install-Package IronOCR.Languages.Nepali
Imports IronOcr
' Create an instance of the IronTesseract OCR engine
Private Ocr = New IronTesseract()
' Set the language to Nepali for OCR
Ocr.Language = OcrLanguage.Nepali
' Using a statement to properly dispose of resources
Using Input = New OcrInput("images\Nepali.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Get the recognized text from the OCR result
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
IronOCR किन छनौट गर्नुहुन्छ?
Iron OCR एक स्थापना गर्न सजिलो, पूर्ण र राम्रो दस्तावेज .NET सफ्टवेयर लाइब्रेरी हो।
कुनै बाह्य वेब सेवाहरू प्रयोग नगरी, 99.8% OCR शुद्धता प्राप्त गर्न IronOCR छनौट गर्नुहोस्, चलिरहेको फीस वा इन्टरनेटमा गोप्य कागजातहरू पठाउँदैन।
किन C# विकासकर्ताहरूले भेनिला Tesseract मा IronOCR छनौट गर्छन्:
- एकल DLL वा नूगेटको रूपमा स्थापना गर्नुहोस्
- Tesseract for, and Eng ईन्जिनहरूका लागि बक्स बाहिर।
- शुद्धता 99.8% ले नियमित टेस्क्रैक्टलाई आउटपर्मर्स गर्दछ।
- ब्लेजिंग स्पीड र मल्टि थ्रेडिंग।
- MVC, वेब अनुप्रयोग, डेस्कटप, कन्सोल र सर्भर अनुप्रयोग संगत
- काम गर्न Exes वा C++ कोड छैन
- पूर्ण PDF OCR समर्थन
- लगभग कुनै पनि छवि फाइल वा PDF मा OCR प्रदर्शन गर्न
- पूर्ण .NET कोर, मानक र फ्रेमवर्क समर्थन
- विन्डोज, म्याक, लिनक्स, Azure, डकर, Lambda, AWS मा डिप्लोय गर्नुहोस्
- बारकोड र QR कोडहरू पढ्नुहोस्
- XCR को रूपमा OCR निर्यात गर्नुहोस्
- खोजी गर्न योग्य पीडीएफ कागजातहरूमा ओसीआर निर्यात गर्नुहोस्
- मल्टिथ्रेडिंग समर्थन
- 126 अन्तर्राष्ट्रिय भाषाहरू सबै नूगेट वा OCR डेटा फाइलहरू मार्फत प्रबन्धित गरियो
- छविहरू, निर्देशांकहरू, तथ्या .्कहरू र फन्टहरू निकाल्नुहोस्। केवल पाठ मात्र होईन।
- वाणिज्यिक र स्वामित्व अनुप्रयोगहरू भित्र Tesseract OCR पुनः वितरित गर्न प्रयोग गर्न सकिन्छ।
लौह OCR चम्किन्छ जब वास्तविक विश्व छविहरू र त्रुटिपूर्ण कागजातहरू जस्तै फोटोग्राफहरू, वा कम रिजोलुसनको स्क्यानमा जुन डिजिटल आवाज वा अपूर्णताहरूको साथ काम गर्दछ।
.NET प्लेटफर्मको लागि अन्य नि: शुल्क ओसीआर पुस्तकालयहरू त्यस्ता अन्य .NET Tesseract एपीआईहरू र वेब सेवाहरूले यी वास्तविक विश्व प्रयोगको केसहरूमा यति राम्रो प्रदर्शन गर्दैनन्।
Tesseract 5 को साथ OCR - C#मा कोडिंग सुरु गर्नुहोस्
तलको कोड नमूनाले C# वा VB .NET प्रयोग गरेर छविबाट पाठ पढ्न कति सजिलो छ भनेर देखाउँदछ।
OneLiner
using IronOcr;
// Perform OCR in a single line of code
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
using IronOcr;
// Perform OCR in a single line of code
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
Imports IronOcr
' Perform OCR in a single line of code
Private Text As String = (New IronTesseract()).Read("img\Screenshot.png").Text
हेलो वर्ल्ड विन्यास योग्य
// PM> Install-Package IronOCR.Languages.Nepali
using IronOcr;
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Nepali for OCR
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Add images to the OCR input
Input.AddImage("images/sample.jpeg");
//... तपाईं छविहरूको कुनै संख्या थप्न सक्नुहुन्छ
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
// PM> Install-Package IronOCR.Languages.Nepali
using IronOcr;
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Nepali for OCR
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Add images to the OCR input
Input.AddImage("images/sample.jpeg");
//... तपाईं छविहरूको कुनै संख्या थप्न सक्नुहुन्छ
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
' PM> Install-Package IronOCR.Languages.Nepali
Imports IronOcr
' Create an instance of the IronTesseract OCR engine
Private Ocr = New IronTesseract()
' Set the language to Nepali for OCR
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using Input = New OcrInput()
' Add images to the OCR input
Input.AddImage("images/sample.jpeg")
'... तपाईं छविहरूको कुनै संख्या थप्न सक्नुहुन्छ
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Output the recognized text to the console
Console.WriteLine(Result.Text)
End Using
C# PDF OCR
समान दृष्टिकोण कुनै पनि पीडीएफ कागजातबाट पाठ निकाल्न समान रूपमा प्रयोग गर्न सकिन्छ।
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var input = new OcrInput())
{
// Add PDF to the OCR input with optional password
input.AddPdf("example.pdf", "password");
// हामी विशिष्ट पीडीएफ पृष्ठ नम्बरहरू OCR मा चयन गर्न सक्दछौं
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count} Pages");
}
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var input = new OcrInput())
{
// Add PDF to the OCR input with optional password
input.AddPdf("example.pdf", "password");
// हामी विशिष्ट पीडीएफ पृष्ठ नम्बरहरू OCR मा चयन गर्न सक्दछौं
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count} Pages");
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using input = New OcrInput()
' Add PDF to the OCR input with optional password
input.AddPdf("example.pdf", "password")
' हामी विशिष्ट पीडीएफ पृष्ठ नम्बरहरू OCR मा चयन गर्न सक्दछौं
' Perform OCR and get the result
Dim Result = Ocr.Read(input)
' Output the recognized text to the console
Console.WriteLine(Result.Text)
Console.WriteLine($"{Result.Pages.Count} Pages")
End Using
मल्टीपेज TIFF का लागि OCR
OCR पढाई TIFF फाईल ढाँचा बहु पृष्ठ कागजात सहित। TIFF खोज्न योग्य पाठको साथ सिधा पीडीएफ फाइलमा पनि रूपान्तरण गर्न सकिन्छ।
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Add a multi-frame TIFF image to the OCR input
input.AddMultiFrameTiff("multi-frame.tiff");
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Add a multi-frame TIFF image to the OCR input
input.AddMultiFrameTiff("multi-frame.tiff");
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using Input = New OcrInput()
' Add a multi-frame TIFF image to the OCR input
input.AddMultiFrameTiff("multi-frame.tiff")
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Output the recognized text to the console
Console.WriteLine(Result.Text)
End Using
बारकोड र QR
आइरन ओसीआरको एक विशिष्ट विशेषता यो हो कि यसले कागजातहरूबाट बारकोडहरू र क्यूआर कोडहरू पढ्न सक्दछ जब यो पाठको लागि स्क्यान हुँदैछ। OcrResult.OcrBarcode
कक्षा को उदाहरणहरु हरेक स्क्यान गरिएको बारकोडको बारेमा विस्तृत जानकारी विकासकर्तालाई दिन्छ।
using IronOcr;
var Ocr = new IronTesseract();
// Enable barcode reading configuration
Ocr.Configuration.ReadBarCodes = true;
// Using block for input handling
using (var input = new OcrInput())
{
// Add an image containing barcodes
input.AddImage("img/Barcode.png");
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Iterate over each scanned barcode
foreach (var Barcode in Result.Barcodes)
{
// Output the barcode value to the console
Console.WriteLine(Barcode.Value);
// प्रकार र स्थान गुणहरू पनि उजागर गरियो
}
}
using IronOcr;
var Ocr = new IronTesseract();
// Enable barcode reading configuration
Ocr.Configuration.ReadBarCodes = true;
// Using block for input handling
using (var input = new OcrInput())
{
// Add an image containing barcodes
input.AddImage("img/Barcode.png");
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Iterate over each scanned barcode
foreach (var Barcode in Result.Barcodes)
{
// Output the barcode value to the console
Console.WriteLine(Barcode.Value);
// प्रकार र स्थान गुणहरू पनि उजागर गरियो
}
}
Imports IronOcr
Private Ocr = New IronTesseract()
' Enable barcode reading configuration
Ocr.Configuration.ReadBarCodes = True
' Using block for input handling
Using input = New OcrInput()
' Add an image containing barcodes
input.AddImage("img/Barcode.png")
' Perform OCR and get the result
Dim Result = Ocr.Read(input)
' Iterate over each scanned barcode
For Each Barcode In Result.Barcodes
' Output the barcode value to the console
Console.WriteLine(Barcode.Value)
' प्रकार र स्थान गुणहरू पनि उजागर गरियो
Next Barcode
End Using
छविहरूको विशिष्ट क्षेत्रहरूमा OCR
सबै आइरन ओसीआरको स्क्यानि and र पढ्ने विधिहरूले पृष्ठ वा कुन पृष्ठबाट हामी पाठ पढ्न चाहन्छौं भन्ने ठ्याक्कै निर्दिष्ट गर्ने क्षमता प्रदान गर्दछ। यो धेरै उपयोगी छ जब हामी मानकीकृत फारमहरू हेर्दैछौं र धेरै समय बचत गर्न र दक्षता सुधार गर्न सक्दछौं।
क्रप क्षेत्रहरू प्रयोग गर्न, हामीले प्रणाली सन्दर्भमा प्रणाली सन्दर्भ थप्नु पर्छ। System.Drawing
ताकि हामी System.Drawing.Rectangle
वस्तु प्रयोग गर्न सक्दछौं।
using IronOcr;
using System.Drawing;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Define a specific content area to be read
var ContentArea = new System.Drawing.Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// आयाम px मा छन्
// Add a specific region of the image for OCR
Input.Add("document.png", ContentArea);
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
using IronOcr;
using System.Drawing;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Define a specific content area to be read
var ContentArea = new System.Drawing.Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// आयाम px मा छन्
// Add a specific region of the image for OCR
Input.Add("document.png", ContentArea);
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
Imports IronOcr
Imports System.Drawing
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using Input = New OcrInput()
' Define a specific content area to be read
Dim ContentArea = New System.Drawing.Rectangle() With {
.X = 215,
.Y = 1250,
.Height = 280,
.Width = 1335
}
' आयाम px मा छन्
' Add a specific region of the image for OCR
Input.Add("document.png", ContentArea)
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Output the recognized text to the console
Console.WriteLine(Result.Text)
End Using
OCR कम गुणवत्ता स्क्यानका लागि
IronOCR OcrInput
वर्गले सामान्य Tesseract पढ्न नसक्ने स्क्यानहरू फिक्स गर्न सक्दछ।
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
// Apply image enhancements for low-quality scans
Input.DeNoise(); // डिजिटल ध्वनि र गरीब स्क्यानिंग फिक्स गर्दछ
Input.Deskew(); // रोटेशन र परिप्रेक्ष्य फिक्स गर्दछ
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
// Apply image enhancements for low-quality scans
Input.DeNoise(); // डिजिटल ध्वनि र गरीब स्क्यानिंग फिक्स गर्दछ
Input.Deskew(); // रोटेशन र परिप्रेक्ष्य फिक्स गर्दछ
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using Input = New OcrInput("img\Potter.LowQuality.tiff")
' Apply image enhancements for low-quality scans
Input.DeNoise() ' डिजिटल ध्वनि र गरीब स्क्यानिंग फिक्स गर्दछ
Input.Deskew() ' रोटेशन र परिप्रेक्ष्य फिक्स गर्दछ
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Output the recognized text to the console
Console.WriteLine(Result.Text)
End Using
OCR परिणामहरू खोजी योग्य PDF को रूपमा निर्यात गर्नुहोस्
प्रतिलिपि योग्य पाठ स्ट्रिङको साथ PDF मा छवि। खोज इन्जिन र डाटाबेस द्वारा अनुक्रमित गर्न सकिन्छ।
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Set the title for the searchable PDF
input.Title = "Quarterly Report";
// Add multiple images for OCR input
input.AddImage("image1.jpeg");
input.AddImage("image2.png");
input.AddImage("image3.gif");
// Perform OCR and save the result as a searchable PDF
var Result = Ocr.Read(input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Set the title for the searchable PDF
input.Title = "Quarterly Report";
// Add multiple images for OCR input
input.AddImage("image1.jpeg");
input.AddImage("image2.png");
input.AddImage("image3.gif");
// Perform OCR and save the result as a searchable PDF
var Result = Ocr.Read(input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using Input = New OcrInput()
' Set the title for the searchable PDF
input.Title = "Quarterly Report"
' Add multiple images for OCR input
input.AddImage("image1.jpeg")
input.AddImage("image2.png")
input.AddImage("image3.gif")
' Perform OCR and save the result as a searchable PDF
Dim Result = Ocr.Read(input)
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
TIFF खोज्न योग्य PDF रूपान्तरणमा
TIFF कागजात (वा छवि फाईलहरूको कुनै समूह) सिधै खोज्न योग्य पीडीएफमा रूपान्तरण गर्नुहोस् जुन इन्ट्रानेट, वेबसाइट र गुगल खोजी इञ्जिनहरू द्वारा अनुक्रमणिका गर्न सकिन्छ।
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Add a multi-frame TIFF for conversion
input.AddMultiFrameTiff("example.tiff");
// Perform OCR and save as a searchable PDF
var Result = Ocr.Read(input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Add a multi-frame TIFF for conversion
input.AddMultiFrameTiff("example.tiff");
// Perform OCR and save as a searchable PDF
var Result = Ocr.Read(input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using Input = New OcrInput()
' Add a multi-frame TIFF for conversion
input.AddMultiFrameTiff("example.tiff")
' Perform OCR and save as a searchable PDF
Dim Result = Ocr.Read(input)
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
HTML को रूपमा OCR परिणामहरू निर्यात गर्नुहोस्
OCR image to XCR HTML रूपान्तरण।
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Set the title for the OCR output
input.Title = "Html Title";
// Add an image to the OCR input
input.AddImage("image1.jpeg");
// Perform OCR and save the result as HTML
var Result = Ocr.Read(input);
Result.SaveAsHocrFile("results.html");
}
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput())
{
// Set the title for the OCR output
input.Title = "Html Title";
// Add an image to the OCR input
input.AddImage("image1.jpeg");
// Perform OCR and save the result as HTML
var Result = Ocr.Read(input);
Result.SaveAsHocrFile("results.html");
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using Input = New OcrInput()
' Set the title for the OCR output
input.Title = "Html Title"
' Add an image to the OCR input
input.AddImage("image1.jpeg")
' Perform OCR and save the result as HTML
Dim Result = Ocr.Read(input)
Result.SaveAsHocrFile("results.html")
End Using
OCR छवि संवर्द्धन फिल्टर
ICROCR ले OCR प्रदर्शन सुधार गर्न OcrInput
वस्तुहरूको लागि अनुपम फिल्टरहरू प्रदान गर्दछ।
छवि संवर्धन कोड उदाहरण
OCR इनपुट छविहरू उच्च गुणवत्तामा छिटो OCR परिणामहरू उत्पादन गर्दछ।
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Apply image enhancements for OCR
Input.DeNoise(); // डिजिटल ध्वनि र गरीब स्क्यानिंग फिक्स गर्दछ
Input.Deskew(); // रोटेशन र परिप्रेक्ष्य फिक्स गर्दछ
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
// Using block for input handling
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Apply image enhancements for OCR
Input.DeNoise(); // डिजिटल ध्वनि र गरीब स्क्यानिंग फिक्स गर्दछ
Input.Deskew(); // रोटेशन र परिप्रेक्ष्य फिक्स गर्दछ
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
' Using block for input handling
Using Input = New OcrInput("LowQuality.jpeg")
' Apply image enhancements for OCR
Input.DeNoise() ' डिजिटल ध्वनि र गरीब स्क्यानिंग फिक्स गर्दछ
Input.Deskew() ' रोटेशन र परिप्रेक्ष्य फिक्स गर्दछ
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Output the recognized text to the console
Console.WriteLine(Result.Text)
End Using
OCR छवि फिल्टरहरूको सूची
ICROCR मा निर्मित ओसीआर प्रदर्शन बृद्धि गर्न इनपुट फिल्टरहरूले समावेश गर्दछ:
- OcrInput.Rotate (डबल डिग्री) - छविहरू घडीको दिशामा डिग्रीको एक नम्बर द्वारा घुमाउँदछ। एन्टी-क्लकवाइजको लागि, नकारात्मक संख्या प्रयोग गर्नुहोस्।
- OcrInput.Binarize () - यो छवि फिल्टर मध्य पिक्सेलको साथ प्रत्येक पिक्सेल कालो वा सेतो गर्दछ। पृष्ठभूमिमा पाठको एकदम कम कन्ट्रास्टको OCR प्रदर्शन केसहरू सुधार गर्न सक्दछ।
- OcrInput.ToGrayScale () - यस छवि फिल्टरले प्रत्येक पिक्सेललाई ग्रेस्केलको छायामा परिणत गर्दछ। OCR सटीकता सुधार गर्न असम्भव तर गतिको सुधार हुन सक्छ
- OcrInput.Contrast () - स्वतः कन्ट्रास्ट बढाउँदछ । यस फिल्टरले अक्सर कम कन्ट्रास्ट स्क्यानहरूमा OCR गति र शुद्धता सुधार गर्दछ।
- OcrInput.DeNoise () - डिजिटल आवाज हटाउँछ। यो फिल्टर मात्र प्रयोग गर्नुपर्नेछ जहाँ हल्लाको आशा गरिन्छ।
- OcrInput.Invert () - हरेक र In उल्टाउछ । उदाहरणका लागि सेतो कालो हुन्छ: कालो सेतो हुन्छ।
- OcrInput.Dilate () - उन्नत मोर्फोलजी । डिलेसनले छविमा वस्तुहरूको सीमामा पिक्सलहरू थपेको छ । ईरोडको विपरित
- OcrInput.Erode () - उन्नत मोर्फोलजी । इरोसनले वस्तुको सीमामा पिक्सल हटाउँदछ
- OcrInput.Deskew () - तस्विर घुमाउँदछ ताकि यो सहि तरीकाले माथि र अर्थोगोनल हो। यो ओसीआरको लागि धेरै उपयोगी छ किनकि स्केन स्क्यानहरूको लागि Tesseract सहिष्णुता degrees डिग्री जति कम हुन सक्छ।
- OcrInput.DeepCleanBackgroundNoise () - भारी पृष्ठभूमि आवाज हटाउने। केवल यो फिल्टर प्रयोग गर्नुहोस् यदि चरम कागजात पृष्ठभूमि शोर ज्ञात छ, किनकि यस फिल्टरले सफा कागजातहरूको ओसीआर शुद्धतालाई पनि कम गर्ने जोखिममा पार्छ, र धेरै सीपीयू महँगो छ।
- OcrInput.EnhanceResolution - कम गुणवत्ता छविहरूको रिजोलुसन विस्तार गर्दछ। यस फिल्टर प्राय: आवश्यक पर्दैन किनकि OcrInput.MINimumDPI र OcrInput.TargetDPI स्वचालित रूपमा कम रिजोलुसन इनपुटहरू समात्छ र समाधान गर्दछ।
क्लीनब्याकग्राउंडनोईस। यो एक सेटिंग हो जुन केहि समय उपभोक्ता हो; जे होस्, यसले पुस्तकालयलाई स्वचालित रूपमा डिजिटल आवाज, कागज crumples, र एक डिजिटल छवि भित्र अन्य अपूर्णताहरू सफा गर्न अनुमति दिन्छ जुन अन्य OCR लाइब्रेरीहरू पढ्न असक्षमको रूपमा प्रस्तुत गर्दछ।
एन्हान्ससन्ट्रास्ट एक सेटिंग हो जसले आइरन ओसीआरलाई स्वचालित रूपमा छविको पृष्ठभूमि बिरुद्द पाठको विरोधाभास बढाउँदछ, ओसीआरको शुद्धता बढाउँदछ र सामान्यतया प्रदर्शन र ओसीआरको गति बढाउँदछ।
EnhanceResolution एक सेटिंग हो जसले स्वचालित तवरले कम रिजोलुसन छविहरू पत्ता लगाउँदछ (जुन २ d5 dpi अन्तर्गत हुन्छ) र स्वचालित रूपमा छवि अपस्केल गर्दछ र त्यसपछि सबै पाठलाई तीक्ष्ण गर्दछ ताकि यसलाई पूर्ण रूपमा OCR लाइब्रेरी द्वारा पढ्न सकिन्छ। यद्यपि यो अपरेशन आफैंमा समय खपत हुने छ, यसले सामान्यतया छविमा OCR अपरेशनको लागि समग्र समय घटाउँछ।
भाषा आइरन ओसीआरले २२ अन्तर्राष्ट्रिय भाषा प्याकहरू समर्थन गर्दछ, र भाषा सेटिंग्स एक वा अधिक एकाधिक भाषाहरू चयन गर्न ओसीआर अपरेशनको लागि प्रयोग गर्न सकिन्छ।
रणनीति आयरन OCR ले दुई रणनीतिहरू समर्थन गर्दछ। हामी या त कागजातको छिटो र कम सटीक स्क्यानको लागि जान सक्छौं, वा एक उन्नत रणनीति प्रयोग गर्न सक्छौं जसले केही कृत्रिम बुद्धिमत्ता मोडलहरू प्रयोग गर्दछ स्वचालित रूपमा ओसीआर पाठको शुद्धतालाई सुधार गर्नका लागि वाक्यमा एक अर्कामा शब्दहरूको सांख्यिकीय सम्बन्धलाई हेरेर। ।
कलरस्पेस एक सेटिंग हो जहाँ हामी ग्रेस्केल वा रंगमा OCR लाई छनौट गर्न सक्छौं। सामान्यतया, ग्रेस्केल उत्तम विकल्प हो। जे होस्, कहिलेकाँही जब त्यहाँ पाठहरू वा समान रंगको पृष्ठभूमि हुन्छ तर धेरै भिन्न रंग, पूर्ण र . color रंग ठाउँले राम्रो परिणाम प्रदान गर्दछ।
WWiteiteTextOnDarkBackgrounds पत्ता लगाउनुहोस्। सामान्यतया, सबै OCR पुस्तकालयहरू सेतो पृष्ठभूमिमा कालो पाठ हेर्न अपेक्षा गर्दछ। यो सेटिले फलामको OCR लाई स्वचालित रूपमा नकारात्मक, वा सेतो पाठको साथ कालो पृष्ठहरू पत्ता लगाउन र यसलाई पढ्न अनुमति दिन्छ।
InputImageType। यस सेटिले विकासकर्तालाई OCR लाइब्रेरी मार्गनिर्देशन गर्न अनुमति दिन्छ कि यो एक पूर्ण कागजात वा स्निपेट हेर्दै छ कि जस्तो स्क्रिनसटको रूपमा।
RotateAndStraight एक उन्नत सेटिंग हो जसले आइरन OCR लाई अद्वितीय क्षमता कागजातहरू पढ्न अनुमति दिन्छ जुन केवल घुमाइएको छैन, तर सम्भव परिप्रेक्ष्यमा जस्तै पाठ कागजातहरूको फोटोग्राफहरू।
रिडबोर्कोड्स एक उपयोगी सुविधा हो जसले आइरन ओसीआरलाई स्वचालित रूपमा पृष्ठमा बारकोडहरू र क्यूआर कोडहरू पढ्न अनुमति दिन्छ किनकि यसले ठूलो अतिरिक्त समयको बोझ थप नगरीकन पाठ पनि पढ्छ।
कलर डिप्थ। यस सेटिले निर्धारित गर्दछ कि पिक्सेल प्रति पिक्सेल कति बिट्स ओसीआर लाइब्रेरीले र aको गहराई निर्धारित गर्न प्रयोग गर्दछ। एक उच्च र . depth गहिराईले ओसीआर गुणस्तर बढाउन सक्छ, तर ओसीआर कार्य पूरा हुन आवश्यक समय बृद्धि गर्दछ।
१२6 भाषा प्याक
आइरन ओसीआरले १२6 अन्तर्राष्ट्रिय भाषाहरू भाषा प्याकहरू मार्फत समर्थन गर्दछ जुन DLLs को रूपमा वितरित गरिएको छ, जुन यस वेबसाइटबाट डाउनलोड गर्न सकिन्छ, वा नुजेट प्याकेज प्रबन्धकबाट पनि ।
भाषाहरूमा जर्मन, फ्रान्सेली, अंग्रेजी, चिनियाँ, जापानीज र अन्य धेरै समावेश छन्। पासपोर्ट एमआरजेड, एमआईसीआर चेकहरू, वित्तीय डेटा, लाइसेन्स प्लेटहरू र अधिक धेरैको लागि विशेषज्ञ भाषा प्याकहरू अवस्थित छन्। तपाईं कुनै पनि परीक्षेपण ".रेन्डडाटा" फाइल पनि प्रयोग गर्न सक्नुहुनेछ - जसमा तपाईंले आफैं सिर्जना गर्नुभयो।
भाषा उदाहरण
अन्य OCR भाषाहरू प्रयोग गर्दै।
// PM> Install IronOcr.Languages.Arabic
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Arabic;
// Using block for input handling
using (var input = new OcrInput())
{
// Add an Arabic image to the OCR input
input.AddImage("img/arabic.gif");
// if necessary, add image filters
// In this case, even if the input is of very low quality
// IronTesseract might still be able to read it when traditional Tesseract cannot.
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Windows Console might not easily print Arabic
// Save it to disk instead
Result.SaveAsTextFile("arabic.txt");
}
// PM> Install IronOcr.Languages.Arabic
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Arabic;
// Using block for input handling
using (var input = new OcrInput())
{
// Add an Arabic image to the OCR input
input.AddImage("img/arabic.gif");
// if necessary, add image filters
// In this case, even if the input is of very low quality
// IronTesseract might still be able to read it when traditional Tesseract cannot.
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Windows Console might not easily print Arabic
// Save it to disk instead
Result.SaveAsTextFile("arabic.txt");
}
' PM> Install IronOcr.Languages.Arabic
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Arabic
' Using block for input handling
Using input = New OcrInput()
' Add an Arabic image to the OCR input
input.AddImage("img/arabic.gif")
' if necessary, add image filters
' In this case, even if the input is of very low quality
' IronTesseract might still be able to read it when traditional Tesseract cannot.
' Perform OCR and get the result
Dim Result = Ocr.Read(input)
' Windows Console might not easily print Arabic
' Save it to disk instead
Result.SaveAsTextFile("arabic.txt")
End Using
बहु भाषा उदाहरण
यो पनि सम्भव छ OCR एकै समयमा धेरै भाषाहरू प्रयोग गरेर। यसले युनिकोड कागजातहरूमा अंग्रेजी भाषा मेटाडेटा र युआरएलहरू लिन मद्दत गर्दछ।
// PM> Install IronOcr.Languages.ChineseSimplified
using IronOcr;
var Ocr = new IronTesseract();
// Set primary language to Chinese Simplified
Ocr.Language = OcrLanguage.ChineseSimplified;
// Add secondary language settings
Ocr.AddSecondaryLanguage(OcrLanguage.Nepali);
// Add any language as required
// Using block for input handling
using (var input = new OcrInput())
{
// Add a multi-language PDF to the OCR input
input.Add("multi-language.pdf");
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Save the result as a text file
Result.SaveAsTextFile("results.txt");
}
// PM> Install IronOcr.Languages.ChineseSimplified
using IronOcr;
var Ocr = new IronTesseract();
// Set primary language to Chinese Simplified
Ocr.Language = OcrLanguage.ChineseSimplified;
// Add secondary language settings
Ocr.AddSecondaryLanguage(OcrLanguage.Nepali);
// Add any language as required
// Using block for input handling
using (var input = new OcrInput())
{
// Add a multi-language PDF to the OCR input
input.Add("multi-language.pdf");
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Save the result as a text file
Result.SaveAsTextFile("results.txt");
}
' PM> Install IronOcr.Languages.ChineseSimplified
Imports IronOcr
Private Ocr = New IronTesseract()
' Set primary language to Chinese Simplified
Ocr.Language = OcrLanguage.ChineseSimplified
' Add secondary language settings
Ocr.AddSecondaryLanguage(OcrLanguage.Nepali)
' Add any language as required
' Using block for input handling
Using input = New OcrInput()
' Add a multi-language PDF to the OCR input
input.Add("multi-language.pdf")
' Perform OCR and get the result
Dim Result = Ocr.Read(input)
' Save the result as a text file
Result.SaveAsTextFile("results.txt")
End Using
विस्तृत OCR परिणाम वस्तुहरू
फलामको OCR ले प्रत्येक OCR अपरेशनको लागि OCR परिणाम वस्तु फिर्ता गर्दछ। सामान्यतया, विकासकर्ताहरूले छविबाट पाठ स्क्यान गर्न केवल यो वस्तुको पाठ गुण प्रयोग गर्दछन्। जे होस्, OCR नतीजा DOM यो भन्दा धेरै उन्नत छ।
using IronOcr;
using System.Drawing; //असेंबली सन्दर्भ थप्नुहोस्
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
// Enable barcode reading
Ocr.Configuration.ReadBarCodes = true;
// Using block for input handling
using (var Input = new OcrInput(@"images\sample.tiff"))
{
// Perform OCR and get the full result
OcrResult Result = Ocr.Read(Input);
// accessing detailed information from the OCR result
var Pages = Result.Pages;
var Words = Pages[0].Words;
var Barcodes = Result.Barcodes;
// Here a extensive API for exploration:
// - Pages, Blocks, Paragraphs, Lines, Words, Characters
// - Image export, font coordinates, statistical data
}
using IronOcr;
using System.Drawing; //असेंबली सन्दर्भ थप्नुहोस्
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Nepali;
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
// Enable barcode reading
Ocr.Configuration.ReadBarCodes = true;
// Using block for input handling
using (var Input = new OcrInput(@"images\sample.tiff"))
{
// Perform OCR and get the full result
OcrResult Result = Ocr.Read(Input);
// accessing detailed information from the OCR result
var Pages = Result.Pages;
var Words = Pages[0].Words;
var Barcodes = Result.Barcodes;
// Here a extensive API for exploration:
// - Pages, Blocks, Paragraphs, Lines, Words, Characters
// - Image export, font coordinates, statistical data
}
Imports IronOcr
Imports System.Drawing 'असेंबली सन्दर्भ थप्नुहोस्
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Nepali
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm
' Enable barcode reading
Ocr.Configuration.ReadBarCodes = True
' Using block for input handling
Using Input = New OcrInput("images\sample.tiff")
' Perform OCR and get the full result
Dim Result As OcrResult = Ocr.Read(Input)
' accessing detailed information from the OCR result
Dim Pages = Result.Pages
Dim Words = Pages(0).Words
Dim Barcodes = Result.Barcodes
' Here a extensive API for exploration:
' - Pages, Blocks, Paragraphs, Lines, Words, Characters
' - Image export, font coordinates, statistical data
End Using
प्रदर्शन
IronOCR ले बाकसको बाहिर कार्य गर्दछ कार्य सम्पादन ट्युन गर्न वा भारी इनपुट छविहरू परिमार्जन गर्न आवश्यक पर्दैन।
स्पीड ब्लिजिंग हो: IronOcr.2020 + १० पटकसम्म छिटो छ र अघिल्लो निर्माणहरूले भन्दा २ %०% कम त्रुटिहरू बनाउँदछ।
थप सिक
O # को बारेमा अधिक जान्न C #, VB, F #, वा कुनै अर्को .नेट भाषामा, कृपया हाम्रो समुदाय ट्यूटोरियलहरू पढ्नुहोस् , जसले कसरी आइरन OCR प्रयोग गर्न सकिन्छ र कसरी उत्तम प्रयोग गर्ने भन्ने बारीकता देखाउन सक्छ भन्ने वास्तविक विश्व उदाहरणहरू दिन्छ। यो पुस्तकालय
.NET विकासकर्ताहरूको लागि पूर्ण वस्तु सन्दर्भ पनि उपलब्ध छ।