C# మరియు .NET లో తెలుగు OCR
ఈ పత్రం యొక్క ఇతర సంస్కరణలు:
ఐరన్ఓసిఆర్ అనేది C# సాఫ్ట్వేర్ భాగం, .NET కోడర్లు తెలుగుతో సహా 126 భాషలో చిత్రాలు మరియు PDF పత్రాల నుండి వచనాన్ని చదవడానికి అనుమతిస్తుంది.
ఇది టెస్రాక్ట్ యొక్క అధునాతన ఫోర్క్, ఇది .NET డెవలపర్ల కోసం ప్రత్యేకంగా నిర్మించబడింది మరియు వేగం మరియు ఖచ్చితత్వం రెండింటికీ ఇతర టెస్రాక్ట్ ఇంజిన్లను క్రమం తప్పుగా అధిగమిస్తుంది.
IronOcr.Languages.Telugu యొక్క విషయాలు
ఈ ప్యాకేజీ .NET కోసం 108 OCR భాషలను కలిగి ఉంది:
- తెలుగు
- తెలుగుబెస్ట్
- తెలుగుఫాస్ట్
- తెలుగు ఆల్ఫాబెట్
- తెలుగు ఆల్ఫాబెట్ బెస్ట్
- తెలుగు ఆల్ఫాబెట్ ఫాస్ట్
డౌన్లోడ్
తెలుగు భాష ప్యాక్ [తెలుగు]
* Download as జిప్
* Install with as https://www.nuget.org/packages/IronOcr.Languages.Telugu/'> నుగెట్
సంస్థాపన
మేము చేయవలసిన మొదటి విషయం మీ .NET ప్రాజెక్ట్కు మా తెలుగు OCR ప్యాకేజీని వ్యవస్థాపించడం.
PM> Install-Package IronOCR.Languages.Telugu
కోడ్ ఉదాహరణ
ఈ C# కోడ్ ఉదాహరణ చిత్రం లేదా PDF పత్రం నుండి తెలుగు వచనాన్ని చదువుతుంది.
// PM> Install-Package IronOcr.Languages.Telugu
using IronOcr;
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the language to Telugu
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput(@"images\Telugu.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text to console
Console.WriteLine(AllText);
}
// PM> Install-Package IronOcr.Languages.Telugu
using IronOcr;
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the language to Telugu
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput(@"images\Telugu.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text to console
Console.WriteLine(AllText);
}
' PM> Install-Package IronOcr.Languages.Telugu
Imports IronOcr
' Create an instance of IronTesseract for OCR operations
Private Ocr = New IronTesseract()
' Set the language to Telugu
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput("images\Telugu.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Get all the recognized text
Dim AllText = Result.Text
' Output the recognized text to console
Console.WriteLine(AllText)
End Using
ఐరన్ఓసిఆర్ ఎందుకు ఎంచుకోవాలి?
ఐరన్ OCR అనేది ఇన్స్టాల్ చేయడం సులభం, పూర్తి మరియు చక్కగా లిఖితం చేయబడిన .NET సాఫ్ట్వేర్ లైబ్రరీ.
బాహ్య వెబ్ సేవలు, కొనసాగుతున్న ఫీజులు లేదా ఇంటర్నెట్ ద్వారా రహస్య పత్రాలను పంపకుండా 99.8% + OCR ఖచ్చితత్వాన్ని సాధించడానికి ఐరన్ఓసిఆర్ ఎంచుకోండి.
C# డెవలపర్లు వనిల్లా టెస్రాక్ట్ కంటే ఐరన్ఓసిఆర్ను ఎందుకు ఎంచుకుంటారు:
- ఒకే DLL లేదా నుగేట్గా ఇన్స్టాల్ చేయండి
- బాక్స్ వెలుపల టెస్రాక్ట్ 5, 4 మరియు 3 ఇంజిన్ల కోసం ఉంటుంది.
- ఖచ్చితత్వం 99.8% సాధారణ టెస్రాక్ట్ను గణనీయంగా అధిగమిస్తుంది.
- మండుతున్న వేగం మరియు మల్టీథ్రెడింగ్
- MVC, వెబ్అప్, డెస్క్టాప్, కన్సోల్ & సర్వర్ అప్లికేషన్ అనుకూలమైనది
- పని చేయడానికి Exes లేదా C++ కోడ్ లేదు
- సంపూర్ణ PDF OCR మద్దతు
- OCR ను దాదాపు ఏదైనా ఇమేజ్ ఫైల్ లేదా PDF చేయడానికి
- సంపూర్ణ .NET కోర్, స్టాండర్డ్ మరియు ఫ్రేమ్వర్క్ మద్దతు
- విండోస్, మాక్, లైనక్స్, అజూర్, డాకర్, లాంబ్డా, AWS లలో అమర్చండి
- బార్కోడ్లు మరియు క్యూఆర్ కోడ్లను చదవండి
- OCR ను XHTML గా ఎగుమతి చేయండి
- శోధించదగిన PDF పత్రాలకు OCR ని ఎగుమతి చేయండి
- మల్టీథ్రెడింగ్ మద్దతు
- 126 అంతర్జాతీయ భాషలు అన్నీ నుగేట్ లేదా ఓకర్డేటా ఫైళ్ల ద్వారా నిర్వహించబడతాయి
- చిత్రాలు, కోఆర్డినేట్లు, గణాంకాలు మరియు ఫాంట్లను సంగ్రహించండి, వచనం మాత్రమే కాదు.
- వాణిజ్య మరియు యాజమాన్య అనువర్తనాలలో టెస్రాక్ట్ OCR ను పున ist పంపిణీ చేయడానికి ఉపయోగించవచ్చు.
వాస్తవ ప్రపంచ చిత్రాలు మరియు ఛాయాచిత్రాలు వంటి అసంపూర్ణ పత్రాలతో లేదా డిజిటల్ శబ్దం లేదా లోపాలను కలిగి ఉన్న తక్కువ రిజల్యూషన్ స్కాన్లతో పనిచేసేటప్పుడు ఐరన్ OCR ప్రకాశిస్తుంది.
.NET ప్లాట్ఫాం కోసం ఇతర ఉచిత OCR లైబ్రరీలు ఈ ఇతర వాస్తవ ప్రపంచ వినియోగ సందర్భాలలో అంత బాగా పనిచేయవు.
టెస్రాక్ట్ 5 తో OCR - C#లో కోడింగ్ ప్రారంభించండి
దిగువ కోడ్ నమూనా C# లేదా VB .NET ఉపయోగించి చిత్రం నుండి వచనాన్ని చదవడం ఎంత సులభమో చూపిస్తుంది.
వన్లైనర్
// Single line OCR operation to extract text from an image
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
Console.WriteLine(Text);
// Single line OCR operation to extract text from an image
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
Console.WriteLine(Text);
' Single line OCR operation to extract text from an image
Dim Text As String = (New IronTesseract()).Read("img\Screenshot.png").Text
Console.WriteLine(Text)
కాన్ఫిగర్ హలో వరల్డ్
// PM> Install-Package IronOCR.Languages.Telugu
using IronOcr;
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Add image to the OCR input
Input.AddImage("images/sample.jpeg");
//... Add any number of images you want
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
// PM> Install-Package IronOCR.Languages.Telugu
using IronOcr;
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Add image to the OCR input
Input.AddImage("images/sample.jpeg");
//... Add any number of images you want
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
' PM> Install-Package IronOCR.Languages.Telugu
Imports IronOcr
' Create an instance of IronTesseract for OCR operations
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput()
' Add image to the OCR input
Input.AddImage("images/sample.jpeg")
'... Add any number of images you want
Dim Result = Ocr.Read(Input)
' Output the recognized text to console
Console.WriteLine(Result.Text)
End Using
C# పిడిఎఫ్ ఓసిఆర్
ఏదైనా పిడిఎఫ్ పత్రం నుండి వచనాన్ని సేకరించేందుకు ఇదే విధానాన్ని ఉపయోగించవచ్చు.
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var input = new OcrInput())
{
// Add a protected PDF file to the input
input.AddPdf("example.pdf", "password");
// Perform OCR on the input PDF
var Result = Ocr.Read(input);
// Output the recognized text and page count
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count()} Pages");
// Each page of the PDF is processed
}
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var input = new OcrInput())
{
// Add a protected PDF file to the input
input.AddPdf("example.pdf", "password");
// Perform OCR on the input PDF
var Result = Ocr.Read(input);
// Output the recognized text and page count
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count()} Pages");
// Each page of the PDF is processed
}
Imports IronOcr
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using input = New OcrInput()
' Add a protected PDF file to the input
input.AddPdf("example.pdf", "password")
' Perform OCR on the input PDF
Dim Result = Ocr.Read(input)
' Output the recognized text and page count
Console.WriteLine(Result.Text)
Console.WriteLine($"{Result.Pages.Count()} Pages")
' Each page of the PDF is processed
End Using
మల్టీపేజ్ TIFF ల కోసం OCR
OCR బహుళ పేజీ పత్రాలతో సహా TIFF ఫైల్ ఆకృతిని చదవడం. TIFF ను నేరుగా శోధించదగిన వచనంతో PDF ఫైల్గా మార్చవచ్చు.
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Add a multi-frame TIFF to the OCR input
Input.AddMultiFrameTiff("multi-frame.tiff");
// Perform OCR on the input TIFF
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Add a multi-frame TIFF to the OCR input
Input.AddMultiFrameTiff("multi-frame.tiff");
// Perform OCR on the input TIFF
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
Imports IronOcr
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput()
' Add a multi-frame TIFF to the OCR input
Input.AddMultiFrameTiff("multi-frame.tiff")
' Perform OCR on the input TIFF
Dim Result = Ocr.Read(Input)
' Output the recognized text to console
Console.WriteLine(Result.Text)
End Using
బార్కోడ్లు మరియు క్యూఆర్
ఐరన్ OCR యొక్క ప్రత్యేక లక్షణం ఏమిటంటే ఇది టెక్స్ట్ కోసం స్కాన్ చేస్తున్నప్పుడు పత్రాల నుండి బార్కోడ్లు మరియు QR కోడ్లను చదవగలదు. OcrResult.OcrBarcode
క్లాస్ యొక్క ఉదాహరణలు ప్రతి స్కాన్ చేసిన బార్కోడ్ గురించి డెవలపర్కు వివరణాత్మక సమాచారాన్ని ఇస్తాయి.
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Configure to read barcodes from images
Ocr.Configuration.ReadBarCodes = true;
// Using block to ensure resources are disposed correctly
using (var input = new OcrInput())
{
// Add image containing barcodes to the OCR input
input.AddImage("img/Barcode.png");
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Iterate over each detected barcode
foreach (var Barcode in Result.Barcodes)
{
// Output the value of the barcode to console
Console.WriteLine(Barcode.Value);
// Also exposes type and position properties
}
}
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Configure to read barcodes from images
Ocr.Configuration.ReadBarCodes = true;
// Using block to ensure resources are disposed correctly
using (var input = new OcrInput())
{
// Add image containing barcodes to the OCR input
input.AddImage("img/Barcode.png");
// Perform OCR and get the result
var Result = Ocr.Read(input);
// Iterate over each detected barcode
foreach (var Barcode in Result.Barcodes)
{
// Output the value of the barcode to console
Console.WriteLine(Barcode.Value);
// Also exposes type and position properties
}
}
Imports IronOcr
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Configure to read barcodes from images
Ocr.Configuration.ReadBarCodes = True
' Using block to ensure resources are disposed correctly
Using input = New OcrInput()
' Add image containing barcodes to the OCR input
input.AddImage("img/Barcode.png")
' Perform OCR and get the result
Dim Result = Ocr.Read(input)
' Iterate over each detected barcode
For Each Barcode In Result.Barcodes
' Output the value of the barcode to console
Console.WriteLine(Barcode.Value)
' Also exposes type and position properties
Next Barcode
End Using
చిత్రాల నిర్దిష్ట ప్రాంతాలపై OCR
ఐరన్ OCR యొక్క అన్ని స్కానింగ్ మరియు పఠన పద్ధతులు మనం వచనం చదవాలనుకుంటున్న పేజీ లేదా పేజీలలో ఏ భాగం ఖచ్చితంగా పేర్కొనే సామర్థ్యాన్ని అందిస్తాయి. మేము ప్రామాణిక రూపాలను చూస్తున్నప్పుడు ఇది చాలా ఉపయోగకరంగా ఉంటుంది మరియు చాలా సమయాన్ని ఆదా చేస్తుంది మరియు సామర్థ్యాన్ని మెరుగుపరుస్తుంది.
పంట ప్రాంతాలను ఉపయోగించడానికి, మేము System.Drawing
కు సిస్టమ్ రిఫరెన్స్ను జోడించాలి, తద్వారా మేము System.Drawing.Rectangle
object ను ఉపయోగించవచ్చు.
using IronOcr;
using System.Drawing; // Add System.Drawing reference
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Define a specific content area to scan
var ContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// Measurements are in pixels
// Add the image with the specified region
Input.Add("document.png", ContentArea);
// Perform OCR on the specified region of the image
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
using IronOcr;
using System.Drawing; // Add System.Drawing reference
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Define a specific content area to scan
var ContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// Measurements are in pixels
// Add the image with the specified region
Input.Add("document.png", ContentArea);
// Perform OCR on the specified region of the image
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
Imports IronOcr
Imports System.Drawing ' Add System.Drawing reference
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput()
' Define a specific content area to scan
Dim ContentArea = New Rectangle() With {
.X = 215,
.Y = 1250,
.Height = 280,
.Width = 1335
}
' Measurements are in pixels
' Add the image with the specified region
Input.Add("document.png", ContentArea)
' Perform OCR on the specified region of the image
Dim Result = Ocr.Read(Input)
' Output the recognized text to console
Console.WriteLine(Result.Text)
End Using
తక్కువ నాణ్యత స్కాన్ల కోసం OCR
ఐరన్ OCR OcrInput
క్లాస్ సాధారణ OcrInput
స్కాన్లను పరిష్కరించగలదు.
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
// Apply denoise to handle digital noise and poor scans
Input.DeNoise();
// Deskew to correct rotation and perspective
Input.Deskew();
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
// Apply denoise to handle digital noise and poor scans
Input.DeNoise();
// Deskew to correct rotation and perspective
Input.Deskew();
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
Imports IronOcr
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput("img\Potter.LowQuality.tiff")
' Apply denoise to handle digital noise and poor scans
Input.DeNoise()
' Deskew to correct rotation and perspective
Input.Deskew()
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Output the recognized text to console
Console.WriteLine(Result.Text)
End Using
OCR ఫలితాలను శోధించదగిన PDF గా ఎగుమతి చేయండి
కాపీ చేయదగిన టెక్స్ట్ తీగలతో PDF కు చిత్రం. సెర్చ్ ఇంజన్లు మరియు డేటాబేస్ల ద్వారా సూచిక చేయవచ్చు.
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Set the title for the PDF output
Input.Title = "Quarterly Report";
// Add multiple images to the OCR input
Input.AddImage("image1.jpeg");
Input.AddImage("image2.png");
Input.AddImage("image3.gif");
// Perform OCR on the input images
var Result = Ocr.Read(Input);
// Save the OCR result as a searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf");
}
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Set the title for the PDF output
Input.Title = "Quarterly Report";
// Add multiple images to the OCR input
Input.AddImage("image1.jpeg");
Input.AddImage("image2.png");
Input.AddImage("image3.gif");
// Perform OCR on the input images
var Result = Ocr.Read(Input);
// Save the OCR result as a searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf");
}
Imports IronOcr
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput()
' Set the title for the PDF output
Input.Title = "Quarterly Report"
' Add multiple images to the OCR input
Input.AddImage("image1.jpeg")
Input.AddImage("image2.png")
Input.AddImage("image3.gif")
' Perform OCR on the input images
Dim Result = Ocr.Read(Input)
' Save the OCR result as a searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
శోధించదగిన PDF మార్పిడికి TIFF
ఇంట్రానెట్, వెబ్సైట్ మరియు గూగుల్ సెర్చ్ ఇంజిన్ల ద్వారా సూచించబడే ఒక టిఎఫ్ఎఫ్ పత్రాన్ని (లేదా ఇమేజ్ ఫైళ్ల సమూహం) నేరుగా శోధించదగిన పిడిఎఫ్కు మార్చండి.
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Add a multi-frame TIFF to the OCR input
Input.AddMultiFrameTiff("example.tiff");
// Perform OCR on the input TIFF
var Result = Ocr.Read(Input);
// Save the OCR result as a searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf");
}
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Add a multi-frame TIFF to the OCR input
Input.AddMultiFrameTiff("example.tiff");
// Perform OCR on the input TIFF
var Result = Ocr.Read(Input);
// Save the OCR result as a searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf");
}
Imports IronOcr
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput()
' Add a multi-frame TIFF to the OCR input
Input.AddMultiFrameTiff("example.tiff")
' Perform OCR on the input TIFF
Dim Result = Ocr.Read(Input)
' Save the OCR result as a searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
OCR ఫలితాలను HTML గా ఎగుమతి చేయండి
OCR చిత్రం XHTML మార్పిడికి.
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Set the title for the HTML output
Input.Title = "Html Title";
// Add an image to the OCR input
Input.AddImage("image1.jpeg");
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Save the OCR result as an HTML file
Result.SaveAsHocrFile("results.html");
}
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput())
{
// Set the title for the HTML output
Input.Title = "Html Title";
// Add an image to the OCR input
Input.AddImage("image1.jpeg");
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Save the OCR result as an HTML file
Result.SaveAsHocrFile("results.html");
}
Imports IronOcr
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput()
' Set the title for the HTML output
Input.Title = "Html Title"
' Add an image to the OCR input
Input.AddImage("image1.jpeg")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Save the OCR result as an HTML file
Result.SaveAsHocrFile("results.html")
End Using
OCR ఇమేజ్ వృద్ధి ఫిల్టర్లు
OCR పనితీరును మెరుగుపరచడానికి OcrInput
వస్తువుల కోసం ప్రత్యేకమైన ఫిల్టర్లను అందిస్తుంది.
చిత్ర వృద్ధి కోడ్ ఉదాహరణ
మెరుగైన, వేగవంతమైన OCR ఫలితాలను ఇవ్వడానికి OCR ఇన్పుట్ చిత్రాలను అధిక నాణ్యతతో చేస్తుంది.
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Apply denoise to handle digital noise and poor scans
Input.DeNoise();
// Deskew to correct rotation and perspective
Input.Deskew();
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
using IronOcr;
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Apply denoise to handle digital noise and poor scans
Input.DeNoise();
// Deskew to correct rotation and perspective
Input.Deskew();
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Output the recognized text to console
Console.WriteLine(Result.Text);
}
Imports IronOcr
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput("LowQuality.jpeg")
' Apply denoise to handle digital noise and poor scans
Input.DeNoise()
' Deskew to correct rotation and perspective
Input.Deskew()
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Output the recognized text to console
Console.WriteLine(Result.Text)
End Using
OCR ఇమేజ్ ఫిల్టర్ల జాబితా
ఐరన్ఓసిఆర్లో నిర్మించిన OCR పనితీరును మెరుగుపరచడానికి ఇన్పుట్ ఫిల్టర్లు:
- OcrInput.Rotate (డబుల్ డిగ్రీలు) - చిత్రాలను సవ్యదిశలో అనేక డిగ్రీల ద్వారా తిరుగుతుంది. వ్యతిరేక సవ్యదిశలో, ప్రతికూల సంఖ్యలను ఉపయోగించండి.
- OcrInput.Binarize () - ఈ ఇమేజ్ ఫిల్టర్ ప్రతి పిక్సెల్ నలుపు లేదా తెలుపు మధ్య గ్రౌండ్ లేకుండా మారుతుంది. వచనానికి నేపథ్యానికి చాలా తక్కువ విరుద్ధమైన OCR పనితీరు కేసులను మెరుగుపరచవచ్చు.
- OcrInput.ToGrayScale () - ఈ ఇమేజ్ ఫిల్టర్ ప్రతి పిక్సెల్ను గ్రేస్కేల్ నీడగా మారుస్తుంది. OCR ఖచ్చితత్వాన్ని మెరుగుపరచడం అసాధ్యం కాని వేగాన్ని మెరుగుపరుస్తుంది
- OcrInput.Contrast () - కాంట్రాస్ట్ను స్వయంచాలకంగా పెంచుతుంది. ఈ ఫిల్టర్ తరచుగా తక్కువ కాంట్రాస్ట్ స్కాన్లలో OCR వేగం మరియు ఖచ్చితత్వాన్ని మెరుగుపరుస్తుంది.
- OcrInput.DeNoise () - డిజిటల్ శబ్దాన్ని తొలగిస్తుంది. శబ్దం ఆశించిన చోట మాత్రమే ఈ ఫిల్టర్ ఉపయోగించాలి.
- OcrInput.Invert () - ప్రతి రంగును విలోమం చేస్తుంది. ఉదా తెలుపు నలుపు: నలుపు తెలుపు అవుతుంది.
- OcrInput.Dilate () - అడ్వాన్స్డ్ మార్ఫాలజీ. చిత్రంలోని వస్తువుల సరిహద్దులకు డైలేషన్ పిక్సెల్లను జోడిస్తుంది. ఈరోడ్ ఎదురుగా
- OcrInput.Erode () - అడ్వాన్స్డ్ మార్ఫాలజీ. ఎరోజన్ విస్తారంగా వర్ణించు వస్తువు boundariesOpposite పిక్సెల్లను తొలగిస్తుంది
- OcrInput.Deskew () - ఒక చిత్రాన్ని తిరుగుతుంది కాబట్టి ఇది సరైన మార్గం మరియు ఆర్తోగోనల్. OCR కి ఇది చాలా ఉపయోగకరంగా ఉంటుంది ఎందుకంటే వక్రీకృత స్కాన్ల కోసం టెస్రాక్ట్ టాలరెన్స్ 5 డిగ్రీల వరకు ఉంటుంది.
- OcrInput.DeepCleanBackgroundNoise () - భారీ నేపథ్య శబ్దం తొలగింపు. విపరీతమైన పత్ర నేపథ్య శబ్దం తెలిసిన సందర్భంలో మాత్రమే ఈ ఫిల్టర్ను ఉపయోగించండి, ఎందుకంటే ఈ ఫిల్టర్ శుభ్రమైన పత్రాల OCR ఖచ్చితత్వాన్ని తగ్గించే ప్రమాదం ఉంది మరియు ఇందులో చాలా CPU ఖరీదైనది.
- OcrInput.EnhanceResolution - తక్కువ నాణ్యత గల చిత్రాల రిజల్యూషన్ను మెరుగుపరుస్తుంది. ఈ ఫిల్టర్ తరచుగా అవసరం లేదు ఎందుకంటే OcrInput.MinimumDPI మరియు OcrInput.TargetDPI స్వయంచాలకంగా తక్కువ రిజల్యూషన్ ఇన్పుట్లను పట్టుకుని పరిష్కరిస్తాయి.
క్లీన్బ్యాక్గ్రౌండ్ నోయిస్. ఇది కొంత సమయం తీసుకునే సెట్టింగ్; ఏది ఏమయినప్పటికీ, డిజిటల్ ఇమేజ్లోని డిజిటల్ శబ్దం, కాగితపు ముక్కలు మరియు ఇతర లోపాలను స్వయంచాలకంగా శుభ్రం చేయడానికి ఇది లైబ్రరీని అనుమతిస్తుంది, అది ఇతర OCR లైబ్రరీల ద్వారా చదవలేకపోతుంది.
EnhanceContrast అనేది ఒక చిత్రం యొక్క నేపథ్యానికి వ్యతిరేకంగా ఐరన్ OCR స్వయంచాలకంగా వచన విరుద్ధతను పెంచుతుంది, OCR యొక్క ఖచ్చితత్వాన్ని పెంచుతుంది మరియు సాధారణంగా పనితీరు మరియు OCR యొక్క వేగాన్ని పెంచుతుంది.
EnhanceResolution అనేది తక్కువ-రిజల్యూషన్ చిత్రాలను స్వయంచాలకంగా గుర్తించే (275 dpi కంటే తక్కువ) మరియు స్వయంచాలకంగా చిత్రాన్ని స్వయంచాలకంగా పెంచుతుంది మరియు తరువాత అన్ని వచనాలను పదునుపెడుతుంది, తద్వారా ఇది OCR లైబ్రరీ ద్వారా ఖచ్చితంగా చదవబడుతుంది. ఈ ఆపరేషన్ సమయం తీసుకుంటున్నప్పటికీ, ఇది సాధారణంగా చిత్రంపై OCR ఆపరేషన్ కోసం మొత్తం సమయాన్ని తగ్గిస్తుంది.
భాష ఐరన్ OCR 22 అంతర్జాతీయ భాషా ప్యాక్లకు మద్దతు ఇస్తుంది మరియు OCR ఆపరేషన్ కోసం వర్తించే ఒకటి లేదా అంతకంటే ఎక్కువ బహుళ భాషలను ఎంచుకోవడానికి భాషా అమరికను ఉపయోగించవచ్చు.
వ్యూహం ఐరన్ OCR రెండు వ్యూహాలకు మద్దతు ఇస్తుంది. మేము పత్రం యొక్క వేగవంతమైన మరియు తక్కువ ఖచ్చితమైన స్కాన్ కోసం ఎంచుకోవచ్చు లేదా ఒక వాక్యంలో పదాల గణాంక సంబంధాన్ని ఒకదానితో ఒకటి చూడటం ద్వారా OCR టెక్స్ట్ యొక్క ఖచ్చితత్వాన్ని స్వయంచాలకంగా మెరుగుపరచడానికి కొన్ని కృత్రిమ మేధస్సు నమూనాలను ఉపయోగించే ఒక ఆధునిక వ్యూహాన్ని ఉపయోగించవచ్చు.
కలర్స్పేస్ అనేది గ్రేస్కేల్ లేదా కలర్లో OCR ను ఎంచుకునే ఒక సెట్టింగ్. సాధారణంగా, గ్రేస్కేల్ ఉత్తమ ఎంపిక. ఏదేమైనా, కొన్నిసార్లు ఇలాంటి రంగు యొక్క పాఠాలు లేదా నేపథ్యాలు ఉన్నప్పటికీ చాలా భిన్నమైన రంగు, పూర్తి-రంగు రంగు స్థలం మంచి ఫలితాలను అందిస్తుంది.
DetectWhiteTextOnDarkBackgrounds. సాధారణంగా, అన్ని OCR లైబ్రరీలు తెలుపు తర్వాత చీకటి టెక్స్ట్ చూడాలని ఆశిస్తాయి. ఈ సెట్టింగ్ ఐరన్ OCR ను స్వయంచాలకంగా ప్రతికూలతలను లేదా తెల్లని వచనంతో చీకటి పేజీలను గుర్తించి వాటిని చదవడానికి అనుమతిస్తుంది.
ఇన్పుట్ ఇమేజ్ టైప్. ఈ సెట్టింగ్ డెవలపర్ను OCR లైబ్రరీకి పూర్తి పత్రం లేదా స్క్రీన్షాట్ వంటి స్నిప్పెట్ను చూస్తున్నారా అని మార్గనిర్దేశం చేయడానికి అనుమతిస్తుంది.
RotateAndStraighten అనేది ఒక అధునాతన అమరిక, ఇది ఐరన్ OCR ను తిప్పడానికి మాత్రమే కాకుండా, వచన పత్రాల ఛాయాచిత్రాలు వంటి దృక్పథాన్ని కలిగి ఉన్న పత్రాలను చదవగల ప్రత్యేక సామర్థ్యాన్ని అనుమతిస్తుంది.
రీడ్బార్కోడ్లు ఉపయోగకరమైన లక్షణం, ఇది ఐరన్ OCR స్వయంచాలకంగా పేజీల లో బార్కోడ్లు మరియు QR కోడ్లను చదవడానికి అనుమతిస్తుంది, ఇది పెద్ద అదనపు సమయ భారాన్ని జోడించకుండా, టెక్స్ట్ను కూడా చదువుతుంది.
కలర్డెప్త్. రంగు యొక్క లోతును నిర్ణయించడానికి OCR లైబ్రరీ పిక్సెల్కు ఎన్ని బిట్స్ ఉపయోగిస్తుందో ఈ సెట్టింగ్ నిర్ణయిస్తుంది. అధిక రంగు లోతు OCR నాణ్యతను పెంచుతుంది, కానీ OCR ఆపరేషన్ పూర్తి కావడానికి అవసరమైన సమయాన్ని కూడా పెంచుతుంది.
126 భాషా ప్యాక్లు
ఐరన్ OCR భాషా ప్యాక్ల ద్వారా 126 అంతర్జాతీయ భాషలకు మద్దతు ఇస్తుంది, వీటిని DLL లుగా పంపిణి చేస్తారు, వీటిని ఈ వెబ్సైట్ నుండి డౌన్లోడ్ చేసుకోవచ్చు లేదా నుగేట్ ప్యాకేజీ మేనేజర్ నుండి కూడా పొందవచ్చు.
భాషలలో జర్మన్, ఫ్రెంచ్, ఇంగ్లీష్, చైనీస్, జపనీస్ మరియు మరెన్నో ఉన్నాయి. పాస్పోర్ట్ MRZ, MICR తనిఖీలు, ఫైనాన్షియల్ డేటా, లైసెన్స్ ప్లేట్లు మరియు మరెన్నో కోసం స్పెషలిస్ట్ లాంగ్వేజ్ ప్యాక్లు ఉన్నాయి. మీరు మీరే సృష్టించిన వాటితో సహా ఏదైనా టెస్రాక్ట్ ".ట్రైన్డేటా" ఫైల్ను కూడా ఉపయోగించవచ్చు.
భాషా ఉదాహరణ
ఇతర OCR భాషలను ఉపయోగించడం.
// PM> Install IronOcr.Languages.Arabic
using IronOcr;
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the language to Arabic for OCR
Ocr.Language = OcrLanguage.Arabic;
// Using block to ensure resources are disposed correctly
using (var input = new OcrInput())
{
// Add an image containing Arabic text to the OCR input
input.AddImage("img/arabic.gif");
// Add image filters if needed for low-quality inputs
// Iron Tesseract can read content that traditional tesseract cannot
// Perform OCR on the input image
var Result = Ocr.Read(input);
// Windows console does not easily print Arabic text
// Save the result to a file instead
Result.SaveAsTextFile("arabic.txt");
}
// PM> Install IronOcr.Languages.Arabic
using IronOcr;
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the language to Arabic for OCR
Ocr.Language = OcrLanguage.Arabic;
// Using block to ensure resources are disposed correctly
using (var input = new OcrInput())
{
// Add an image containing Arabic text to the OCR input
input.AddImage("img/arabic.gif");
// Add image filters if needed for low-quality inputs
// Iron Tesseract can read content that traditional tesseract cannot
// Perform OCR on the input image
var Result = Ocr.Read(input);
// Windows console does not easily print Arabic text
// Save the result to a file instead
Result.SaveAsTextFile("arabic.txt");
}
' PM> Install IronOcr.Languages.Arabic
Imports IronOcr
' Create an instance of IronTesseract for OCR operations
Private Ocr = New IronTesseract()
' Set the language to Arabic for OCR
Ocr.Language = OcrLanguage.Arabic
' Using block to ensure resources are disposed correctly
Using input = New OcrInput()
' Add an image containing Arabic text to the OCR input
input.AddImage("img/arabic.gif")
' Add image filters if needed for low-quality inputs
' Iron Tesseract can read content that traditional tesseract cannot
' Perform OCR on the input image
Dim Result = Ocr.Read(input)
' Windows console does not easily print Arabic text
' Save the result to a file instead
Result.SaveAsTextFile("arabic.txt")
End Using
బహుళ భాషా ఉదాహరణ
ఒకే సమయంలో బహుళ భాషలను ఉపయోగించి OCR కు కూడా అవకాశం ఉంది. యునికోడ్ పత్రాలలో ఆంగ్ల భాషా మెటాడేటా మరియు url లను పొందడానికి ఇది నిజంగా సహాయపడుతుంది.
// PM> Install IronOcr.Languages.ChineseSimplified
using IronOcr;
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the primary language to Chinese Simplified
Ocr.Language = OcrLanguage.ChineseSimplified;
// Add a secondary language as Telugu
Ocr.AddSecondaryLanguage(OcrLanguage.Telugu);
// We can add any number of languages
// Using block to ensure resources are disposed correctly
using (var input = new OcrInput())
{
// Add a multi-language PDF to the OCR input
input.Add("multi-language.pdf");
// Perform OCR on the input PDF
var Result = Ocr.Read(input);
// Save the result text to a file
Result.SaveAsTextFile("results.txt");
}
// PM> Install IronOcr.Languages.ChineseSimplified
using IronOcr;
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the primary language to Chinese Simplified
Ocr.Language = OcrLanguage.ChineseSimplified;
// Add a secondary language as Telugu
Ocr.AddSecondaryLanguage(OcrLanguage.Telugu);
// We can add any number of languages
// Using block to ensure resources are disposed correctly
using (var input = new OcrInput())
{
// Add a multi-language PDF to the OCR input
input.Add("multi-language.pdf");
// Perform OCR on the input PDF
var Result = Ocr.Read(input);
// Save the result text to a file
Result.SaveAsTextFile("results.txt");
}
' PM> Install IronOcr.Languages.ChineseSimplified
Imports IronOcr
' Create an instance of IronTesseract for OCR operations
Private Ocr = New IronTesseract()
' Set the primary language to Chinese Simplified
Ocr.Language = OcrLanguage.ChineseSimplified
' Add a secondary language as Telugu
Ocr.AddSecondaryLanguage(OcrLanguage.Telugu)
' We can add any number of languages
' Using block to ensure resources are disposed correctly
Using input = New OcrInput()
' Add a multi-language PDF to the OCR input
input.Add("multi-language.pdf")
' Perform OCR on the input PDF
Dim Result = Ocr.Read(input)
' Save the result text to a file
Result.SaveAsTextFile("results.txt")
End Using
వివరణాత్మక OCR ఫలితాల వస్తువులు
ఐరన్ OCR ప్రతి OCR ఆపరేషన్ కోసం OCR ఫలిత వస్తువును అందిస్తుంది. సాధారణంగా, డెవలపర్లు చిత్రం నుండి వచనాన్ని స్కాన్ చేయడానికి ఈ వస్తువు యొక్క వచన ఆస్తిని మాత్రమే ఉపయోగిస్తారు. ఏదేమైనా, OCR ఫలితాలు DOM దీని కంటే చాలా అధునాతనమైనది.
using IronOcr;
using System.Drawing; // Add an assembly reference for System.Drawing
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Configure OCR engine mode and barcode reading
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
Ocr.Configuration.ReadBarCodes = true; //! Important
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput(@"images\sample.tiff"))
{
// Perform OCR on the input image
OcrResult Result = Ocr.Read(Input);
// Access detailed OCR result data
var Pages = Result.Pages;
var Words = Pages[0].Words;
var Barcodes = Result.Barcodes;
// Explore the robust and detailed API to find:
// - Pages, Blocks, Paragraphs, Lines, Words, Characters
// - Image Exports, Fonts Coordinates, Statistical Data
}
using IronOcr;
using System.Drawing; // Add an assembly reference for System.Drawing
// Initialize the OCR engine for processing
var Ocr = new IronTesseract();
// Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu;
// Configure OCR engine mode and barcode reading
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
Ocr.Configuration.ReadBarCodes = true; //! Important
// Using block to ensure resources are disposed correctly
using (var Input = new OcrInput(@"images\sample.tiff"))
{
// Perform OCR on the input image
OcrResult Result = Ocr.Read(Input);
// Access detailed OCR result data
var Pages = Result.Pages;
var Words = Pages[0].Words;
var Barcodes = Result.Barcodes;
// Explore the robust and detailed API to find:
// - Pages, Blocks, Paragraphs, Lines, Words, Characters
// - Image Exports, Fonts Coordinates, Statistical Data
}
Imports IronOcr
Imports System.Drawing ' Add an assembly reference for System.Drawing
' Initialize the OCR engine for processing
Private Ocr = New IronTesseract()
' Set the language to Telugu for OCR
Ocr.Language = OcrLanguage.Telugu
' Configure OCR engine mode and barcode reading
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm
Ocr.Configuration.ReadBarCodes = True '! Important
' Using block to ensure resources are disposed correctly
Using Input = New OcrInput("images\sample.tiff")
' Perform OCR on the input image
Dim Result As OcrResult = Ocr.Read(Input)
' Access detailed OCR result data
Dim Pages = Result.Pages
Dim Words = Pages(0).Words
Dim Barcodes = Result.Barcodes
' Explore the robust and detailed API to find:
' - Pages, Blocks, Paragraphs, Lines, Words, Characters
' - Image Exports, Fonts Coordinates, Statistical Data
End Using
ప్రదర్శన
పనితీరు ట్యూన్ చేయాల్సిన అవసరం లేకుండా లేదా ఇన్పుట్ చిత్రాలను భారీగా సవరించాల్సిన అవసరం లేకుండా ఐరన్ఓసిఆర్ బాక్స్ వెలుపల పనిచేస్తుంది.
వేగం మండుతోంది: IronOcr.2020 + 10 రెట్లు వేగంగా ఉంటుంది మరియు మునుపటి నిర్మాణాల కంటే 250% తక్కువ లోపాలను చేస్తుంది.
ఇంకా నేర్చుకో
C#, VB, F#, లేదా మరేదైనా .NET భాషలో OCR గురించి మరింత తెలుసుకోవడానికి, దయచేసి మా కమ్యూనిటీ ట్యుటోరియల్స్ చదవండి, ఇవి ఐరన్ OCR ను ఎలా ఉపయోగించవచ్చో వాస్తవ ప్రపంచ ఉదాహరణలను ఇస్తాయి మరియు ఉత్తమమైనవి ఎలా పొందాలో సూక్ష్మ నైపుణ్యాలను చూపుతాయి ఈ లైబ్రరీ.
.NET డెవలపర్ల కోసం పూర్తి ఆబ్జెక్ట్ రిఫరెన్స్ కూడా అందుబాటులో ఉంది.