<meta http-equiv="content-language" content="tt" />
<h1>C#һәм .NET</h1>
<h6> Бу документның башка версияләре:</h6>
<ul>
<li> <a rel='alternate' hreflang='en' href="/csharp/ocr/languages/tatar/">Инглиз (This Page in English)</a></li>
<li> <a href="/csharp/ocr/languages/">Күбрәк Лангаглар</a></li>
</ul>
<p>IronOCR - C# программа компоненты .NET кодераторларына рәсемнәрдән һәм PDF документларыннан текстны 126 телдә укырга мөмкинлек бирә, шул исәптән татар.</p>
<p>Бу Тессерактның алдынгы челтәре, .NET ясаучылар өчен генә төзелгән һәм тизлек һәм төгәллек өчен башка Tesseract двигательләреннән даими узып бара.</p>
<h2>IronOcr.Languages.Tatar эчтәлеге</h2>
<p>Бу пакетта .NET өчен 40 OCR теле бар:</p>
<ul>
<li>Татар</li>
<li>TatarBest</li>
<li>Tatarәр сүзнең</li>
</ul>
<h2>Йөкләү</h2>
<p>Татар Pack <span style='white-space:default'>[татар теле Себер теле]</span> <br/>
* Download as <a class='languages-dll' href='/csharp/ocr/packages/language-packs/Tatar.ocrdata.zip'>Почта <i class='fas fa-download'></i></a><br/>
* Install with <a target='_blank' class='languages-nuget' href="https://www.nuget.org/packages/IronOcr.Languages.Tatar/">NuGet<i class='nuget-icon'></i></a></p>
<h2>Урнаштыру</h2>
<p>Беренче эш - безнең .NET проектына безнең <strong>Татар</strong> OCR пакетын урнаштыру.</p>
<pre><code>PM> Install-Package IronOcr.Languages.Tatar</code></pre>
<h2>Код үрнәге</h2>
<p>Бу C# код мисалы Рәсем яки PDF документыннан татар текстын укый.</p>
```csharp
// PM> Install-Package IronOcr.Languages.Tatar
using IronOcr;
// Create an OCR engine instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load the input image
using (var Input = new OcrInput(@"images\Tatar.png"))
{
// Process the input image and extract text
var Result = Ocr.Read(Input);
// Store the recognized text in a variable
var AllText = Result.Text;
}
```
<h2>Нигә IronOCR сайларга?</h2>
<p>Тимер OCR - урнаштыру җиңел, тулы һәм яхшы документлаштырылган .NET программа китапханәсе.</p>
<p>Тышкы веб-хезмәтләрне, дәвамлы түләүләрне кулланмыйча яки интернет аша яшерен документлар җибәрмичә, <strong>99,8% + OCR төгәллегенә</strong> ирешү өчен IronOCR-ны сайлагыз.</p>
<h4>Ни өчен C# уйлап табучылар Vanilla Tesseract өстендә IronOCR сайлыйлар:</h4>
<ul>
<li>Бер DLL яки NuGet итеп урнаштырыгыз</li>
<li>Тессеракт өчен 5, 4 һәм 3 двигательләр керә.</li>
<li>Төгәллек <strong>99,8%</strong> регуляр Тессеракттан күпкә өстен.</li>
<li>Ялкынлы тизлек һәм күп уку</li>
<li>MVC, WebApp, Desktop, Console & Server кушымтасы туры килә</li>
<li>Эшләргә Exes яки C ++ коды юк</li>
<li>Тулы PDF OCR ярдәме</li>
<li>OCR теләсә нинди Рәсем файлын яки PDFны башкару өчен</li>
<li>Тулы .NET Core, Standard һәм FrameWork ярдәме</li>
<li>Windows, Mac, Linux, Azure, Docker, Lambda, AWS урнаштырыгыз</li>
<li>Штрих-кодларны һәм QR кодларны укыгыз</li>
<li>XHTML буенча OCR экспортлагыз</li>
<li>Эзләнә торган PDF документларына OCR экспортлагыз</li>
<li>Күпкырлы ярдәм</li>
<li>126 халыкара тел барысы да NuGet яки OcrData файллары белән идарә ителә</li>
<li>Рәсемнәрне, координаталарны, статистика һәм шрифтларны чыгару. Текст кына түгел.</li>
<li>Tesseract OCR-ны коммерция һәм милек кушымталары эчендә тарату өчен кулланырга мөмкин.</li>
</ul>
<p><em>Тимер OCR реаль дөнья образлары һәм камил булмаган документлар белән эшләгәндә балкып тора, фотосурәтләр, яки санлы тавыш яки кимчелекләр булырга мөмкин түбән резолюция сканерлары.</em></p>
<p>.NET платформасы өчен бүтән <a href="/csharp/ocr/use-case/free-ocr-csharp/">бушлай OCR</a> китапханәләре, башка .NET Tesseract APIs һәм веб-хезмәтләр бу реаль дөнья куллану очракларында бик яхшы эшләми.</p>
<h2>Tesseract 5 белән OCR - C# кодлаштыруны башлау</h2>
<p>Түбәндәге код үрнәге C# яки VB .NET ярдәмендә рәсемнән текстны уку ничек җиңел икәнен күрсәтә.</p>
<h3>OneLiner</h3>
```csharp
// This example demonstrates reading text from an image in one line
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
```
<h3>Сәлам Дөнья</h3>
```csharp
// PM> Install-Package IronOcr.Languages.Tatar
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Create input for the OCR process
using (var Input = new OcrInput())
{
// Add images to the input for OCR processing
Input.AddImage("images/sample.jpeg");
//... сез теләсә нинди рәсемнәр өсти аласыз
// Execute OCR and retrieve the result
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
```
<h3>C# PDF OCR</h3>
<p>Шул ук ысул теләсә нинди PDF документыннан текст алу өчен кулланылырга мөмкин.</p>
```csharp
using IronOcr;
// Create a new OCR instance
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load the PDF file for OCR
using (var Input = new OcrInput())
{
Input.AddPdf("example.pdf", "password");
// Execute OCR on the provided PDF
var Result = Ocr.Read(Input);
// Output recognized text and page count
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count()} Pages");
}
```
<h3>MultiPage TIFF өчен OCR</h3>
<p>OCR уку TIFF файл форматы, берничә бит документларын кертеп. TIFF шулай ук эзләнә торган текст белән турыдан-туры PDF файлына әверелергә мөмкин.</p>
```csharp
using IronOcr;
// Create a new OCR instance and set language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load multi-frame TIFF file
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("multi-frame.tiff");
// Read text from the input
var Result = Ocr.Read(Input);
// Print the recognized text to the console
Console.WriteLine(Result.Text);
}
```
<h3>Штрих-кодлар һәм QR</h3>
<p>Тимер OCRның уникаль үзенчәлеге - ул текстны сканерләгәндә документлардан штрих-кодларны һәм QR кодларны укый ала. <code>OcrResult.OcrBarcode</code> класс очраклары уйлап табучыга һәр сканерланган штрих-код турында тулы мәгълүмат бирә.</p>
```csharp
// Import IronOcr namespace
using IronOcr;
// Initialize the OCR engine and enable barcode reading
var Ocr = new IronTesseract();
Ocr.Configuration.ReadBarCodes = true;
// Create input for OCR
using (var Input = new OcrInput())
{
// Add image containing barcodes
Input.AddImage("img/Barcode.png");
// Perform OCR and retrieve results
var Result = Ocr.Read(Input);
foreach (var Barcode in Result.Barcodes)
{
// Print the value of each detected barcode
Console.WriteLine(Barcode.Value);
// Other barcode properties such as type and location can also be accessed
}
}
```
<h3>Рәсемнәрнең аерым өлкәләрендә OCR</h3>
<p>Тимер OCR-ның барлык сканерлау һәм уку ысуллары битнең яки битнең кайсы өлешен текст укырга теләгәнебезне күрсәтә ала. Стандартланган формаларны караганда бу бик файдалы, бик күп вакытны саклап калырга һәм эффективлыкны күтәрергә мөмкин.</p>
<p>Уңыш районнары куллану өчен, без бер система Белешмә өстәргә кирәк булачак <code>System.Drawing</code> без куллана ала дип <code>System.Drawing.Rectangle</code> объект.</p>
```csharp
using IronOcr;
using System.Drawing;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load the target image and specify the area of interest
using (var Input = new OcrInput())
{
var ContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// Load the specified area from the image for OCR processing
Input.Add("document.png", ContentArea);
// Execute OCR within the specified region
var Result = Ocr.Read(Input);
// Print the recognized text from the specified region
Console.WriteLine(Result.Text);
}
```
<h3>Сыйфатсыз сканерлар өчен OCR</h3>
<p>Тимер OCR <code>OcrInput</code> классы гадәти Tesseract укый алмаган сканерларны төзәтә ала.</p>
```csharp
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load low quality image for OCR
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
// Apply filters to enhance the image quality
Input.DeNoise(); // Reduce noise
Input.Deskew(); // Correct skew
// Execute OCR and display results
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
```
<h3>OCR нәтиҗәләрен эзләү PDF итеп экспортлау</h3>
<p>Күчереп язылган текст сызыклары белән PDF-ка рәсем. Эзләү системалары һәм мәгълүмат базалары белән индексацияләнергә мөмкин.</p>
```csharp
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load images for OCR and PDF export
using (var Input = new OcrInput())
{
Input.Title = "Quarterly Report";
Input.AddImage("image1.jpeg");
Input.AddImage("image2.png");
Input.AddImage("image3.gif");
// Execute OCR and save results to a searchable PDF
var Result = Ocr.Read(Input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
```
<h3>Эзләнә торган PDF конверсиясенә TIFF</h3>
<p>TIFF документын (яки теләсә нинди рәсем файллары төркемен) турыдан-туры эзләнә торган PDFка күчерегез, аны интернет, вебсайт һәм google эзләү системалары индексацияли ала.</p>
```csharp
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Convert multi-frame TIFF to a searchable PDF
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("example.tiff");
// Execute OCR and save results as a searchable PDF
var Result = Ocr.Read(Input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
```
<h3>OCR нәтиҗәләрен HTML итеп экспортлагыз</h3>
<p>OCR рәсеме XHTML конверсиясенә.</p>
```csharp
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load image and set OCR options for HTML export
using (var Input = new OcrInput())
{
Input.Title = "Html Title";
Input.AddImage("image1.jpeg");
// Execute OCR and save results as an HTML file
var Result = Ocr.Read(Input);
Result.SaveAsHocrFile("results.html");
}
```
<h2>OCR рәсемне арттыру фильтрлары</h2>
<p>IronOCR OCR эшчәнлеген яхшырту өчен <code>OcrInput</code> объектлары өчен уникаль фильтрлар тәкъдим итә.</p>
<h3>Рәсемне арттыру коды мисалы</h3>
<p>Яхшырак, тизрәк OCR нәтиҗәләрен чыгару өчен OCR кертү рәсемнәрен югары сыйфатлы итә.</p>
```csharp
using IronOcr;
// Create a new OCR instance and set language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load a low-quality image for OCR
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Apply image enhancement filters
Input.DeNoise(); // Reduce noise
Input.Deskew(); // Correct skew
// Execute OCR and display the recognized text
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
```
<h3>OCR Рәсем Фильтрлары исемлеге</h3>
<p>IronOCR эчендә төзелгән OCR җитештерүчәнлеген арттыру өчен кертү фильтрлары:</p>
<ul>
<li><strong>OcrInput.Rotate(double degrees)</strong> - Rotate images clockwise by a specified number of degrees. Use negative numbers for counter-clockwise rotation.</li>
<li><strong>OcrInput.Binarize()</strong> - Converts each pixel in the image to black or white. This filter can improve OCR outcomes when there is very low contrast between text and background.</li>
<li><strong>OcrInput.ToGrayScale()</strong> - Converts each pixel into a shade of gray. This may not improve OCR accuracy but can improve processing speed.</li>
<li><strong>OcrInput.Contrast()</strong> - Automatically enhances image contrast. This filter often improves both the speed and accuracy of OCR on low-contrast documents.</li>
<li><strong>OcrInput.DeNoise()</strong> - Removes digital noise. Use this filter only when noise is present.</li>
<li><strong>OcrInput.Invert()</strong> - Inverts all colors. For example, black becomes white, and white becomes black.</li>
<li><strong>OcrInput.Dilate()</strong> - Advanced morphology operation. Dilation adds pixels to the boundaries of objects in an image. Opposite of erosion.</li>
<li><strong>OcrInput.Erode()</strong> - Advanced morphology operation. Erosion removes pixels on object boundaries.</li>
<li><strong>OcrInput.Deskew()</strong> - Corrects image rotation so that it is upright and orthogonal. This is highly beneficial for OCR as Tesseract's tolerance for skew is low, around 5 degrees.</li>
<li><strong>OcrInput.DeepCleanBackgroundNoise()</strong> - Severe background noise removal. Apply this filter when extreme document background noise is known; it can reduce OCR accuracy on clean documents and is CPU intensive.</li>
<li><strong>OcrInput.EnhanceResolution</strong> - Augments resolution of low-quality images. Often unnecessary because `OcrInput.MinimumDPI` and `OcrInput.TargetDPI` will automatically detect and correct low-resolution inputs.</li>
</ul>
<p><strong>CleanBackgroundNoise</strong> - This setting requires significant computation time; however, it allows the library to automatically clean up digital noise, paper artifacts, and other imperfections, making it readable by other OCR libraries.</p>
<p><strong>EnhanceContrast</strong> - This configuration automatically increases the contrast between text and its background, increasing OCR accuracy and typically boosting performance and speed.</p>
<p><strong>EnhanceResolution</strong> - This setting will detect low-resolution images (below 275 dpi) and upscale them so they are more readable by the OCR library, shortening overall OCR operation time for low-quality inputs.</p>
<p><strong>Language</strong> - IronOCR supports 22 international language packs, allowing the selection of one or more languages to use in the OCR operation.</p>
<p><strong>Strategy</strong> - IronOCR supports two strategies: a faster, less accurate scan, and a more advanced strategy using artificial intelligence models to automatically improve text accuracy.</p>
<p><strong>ColorSpace</strong> - Determines whether OCR uses grayscale or color. Grayscale is usually the best choice, but full color may yield better results when there is similar colored text or background in full-text color space.</p>
<p><strong>DetectWhiteTextOnDarkBackgrounds</strong> - By default, OCR libraries will recognize black text on white backgrounds. This configuration allows IronOCR to automatically detect and read white text on black backgrounds.</p>
<p><strong>InputImageType</strong> - Provides guidance to the OCR library as to whether the input is expected to be a full document or a snippet like a screenshot.</p>
<p><strong>RotateAndStraighten</strong> - An advanced setting that allows IronOCR to not just rotate but correct perspectives found in photographs of text documents.</p>
<p><strong>ReadBarcodes</strong> - This feature allows IronOCR to automatically read barcodes and QR codes as it reads text, adding little additional processing time.</p>
<p><strong>ColorDepth</strong> - Determines the bit depth used per pixel by the OCR library for color, which may increase OCR quality but also the processing time required to complete an OCR operation.</p>
<h2>126 Тел пакетлары</h2>
<p>Тимер OCR тел пакетлары аша <strong>126 халыкара телгә</strong> ярдәм итә, алар DLL буларак таратыла <a href="/csharp/ocr/languages/">, бу сайттан йөкләнә</a> ала, яки <a href="https://www.nuget.org/packages?q=IronOcr.Languages">NuGet Package менеджерыннан</a>.</p>
<p>Телләргә немец, француз, инглиз, кытай, япон һәм башкалар керә. МРЗ паспорты, MICR тикшерүләре, финанс мәгълүматлары, лицензия тәлинкәләре һәм башкалар өчен махсус тел пакетлары бар. Сез шулай ук теләсә нинди ".traineddata" файлын куллана аласыз - үзегез ясаган файлларны да кертеп.</p>
<h3>Тел мисалы</h3>
<p>Башка OCR телләрен куллану.</p>
```csharp
// using IronOcr;
// PM> Install IronOcr.Languages.Arabic
// Create an OCR instance and set the language to Arabic
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Arabic;
using (var Input = new OcrInput())
{
// Add an image for OCR processing
Input.AddImage("img/arabic.gif");
// Execute OCR on the input
var Result = Ocr.Read(Input);
// Save the recognized text to a file
Result.SaveAsTextFile("arabic.txt");
}
```
<h3>Күп телләр мисалы</h3>
<p>ОКРга берьюлы берничә тел кулланып та мөмкин. Бу чыннан да icникод документларында инглиз теленең мета-мәгълүматларын һәм урлларын алырга ярдәм итә ала.</p>
```csharp
// using IronOcr;
// PM> Install IronOcr.Languages.ChineseSimplified
// Create a new OCR instance
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.ChineseSimplified;
Ocr.AddSecondaryLanguage(OcrLanguage.Tatar);
// Load a multi-language PDF
using (var Input = new OcrInput())
{
Input.Add("multi-language.pdf");
// Execute OCR and save results
var Result = Ocr.Read(Input);
Result.SaveAsTextFile("results.txt");
}
```
<h2>OCR нәтиҗәләре объектлары</h2>
<p>Тимер OCR һәр OCR операциясе өчен OCR нәтиҗә объектын кайтара. Гадәттә, уйлап табучылар бу объектның текст мөлкәтен тексттан сканерлау өчен кулланалар. Ләкин, OCR нәтиҗәләре DOM моннан күпкә алгарак.</p>
```csharp
using IronOcr;
using System.Drawing; // Add System.Drawing reference
// Create a new OCR instance and set language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Configure OCR engine mode and enable barcode reading
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
Ocr.Configuration.ReadBarCodes = true;
using (var Input = new OcrInput(@"images\sample.tiff"))
{
// Execute OCR and retrieve OCR result
OcrResult Result = Ocr.Read(Input);
// Access detailed information from the OCR result
var Pages = Result.Pages;
var Words = Pages[0].Words;
var Barcodes = Result.Barcodes;
// Explore the API for additional details:
// - Pages, Blocks, Paragraphs, Lines, Words, Symbols
// - Image export, font coordinates, statistics
}
```
<h2>Спектакль</h2>
<p>IronOCR рамкадан эшли, көйләү көйләрен башкарырга яки кертү рәсемнәрен бик үзгәртергә кирәкми.</p>
<p>Тизлек янып тора: IronOCR.2020 + 10 тапкырга тизрәк һәм алдагы корылмаларга караганда 250% азрак хаталар ясый.</p>
<h2>Тулырак</h2>
<p>OCR турында C #, VB, F # яки бүтән .NET телендә күбрәк белү өчен, зинһар өчен, <a href="/csharp/ocr/tutorials/how-to-read-text-from-an-image-in-csharp-net/">безнең җәмгыять дәреслекләрен укыгыз</a>, алар тимер OCR куллануның реаль дөнья мисалларын китерәләр һәм ничек яхшырак файдалану нюансларын күрсәтә алалар бу китапханә.</p>
<p><a href="/csharp/ocr/object-reference/api/">.NET ясаучылар өчен</a> тулы <a href="/csharp/ocr/object-reference/api/">объект сылтамасы</a> да бар.</p>
Бу C# код мисалы Рәсем яки PDF документыннан татар текстын укый.
// PM> Install-Package IronOcr.Languages.Tatarusing IronOcr;// Create an OCR engine instance and set the language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Load the input imageusing (varInput = new OcrInput(@"images\Tatar.png")){ // Process the input image and extract text varResult = Ocr.Read(Input); // Store the recognized text in a variable varAllText = Result.Text;}
// PM> Install-Package IronOcr.Languages.Tatar
using IronOcr;
// Create an OCR engine instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load the input image
using (var Input = new OcrInput(@"images\Tatar.png"))
{
// Process the input image and extract text
var Result = Ocr.Read(Input);
// Store the recognized text in a variable
var AllText = Result.Text;
}
Түбәндәге код үрнәге C# яки VB .NET ярдәмендә рәсемнән текстны уку ничек җиңел икәнен күрсәтә.
OneLiner
// This example demonstrates reading text from an image in one linestringText = new IronTesseract().Read(@"img\Screenshot.png").Text;
// This example demonstrates reading text from an image in one line
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
' This example demonstrates reading text from an image in one lineDimTextAsString = (New IronTesseract()).Read("img\Screenshot.png").Text
' This example demonstrates reading text from an image in one line
Dim Text As String = (New IronTesseract()).Read("img\Screenshot.png").Text
Сәлам Дөнья
// PM> Install-Package IronOcr.Languages.Tatarusing IronOcr;// Create a new OCR instance and set the language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Create input for the OCR processusing (varInput = new OcrInput()){ // Add images to the input for OCR processingInput.AddImage("images/sample.jpeg"); //... сез теләсә нинди рәсемнәр өсти аласыз // Execute OCR and retrieve the result varResult = Ocr.Read(Input);Console.WriteLine(Result.Text);}
// PM> Install-Package IronOcr.Languages.Tatar
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Create input for the OCR process
using (var Input = new OcrInput())
{
// Add images to the input for OCR processing
Input.AddImage("images/sample.jpeg");
//... сез теләсә нинди рәсемнәр өсти аласыз
// Execute OCR and retrieve the result
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
ImportsIronOcr' Create a new OCR instance and set the language to TatarDimOcrAs New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Create input for the OCR processUsingInputAs New OcrInput() ' Add images to the input for OCR processingInput.AddImage("images/sample.jpeg") '... сез теләсә нинди рәсемнәр өсти аласыз ' Execute OCR and retrieve the result DimResult = Ocr.Read(Input)Console.WriteLine(Result.Text)EndUsing
Imports IronOcr
' Create a new OCR instance and set the language to Tatar
Dim Ocr As New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Create input for the OCR process
Using Input As New OcrInput()
' Add images to the input for OCR processing
Input.AddImage("images/sample.jpeg")
'... сез теләсә нинди рәсемнәр өсти аласыз
' Execute OCR and retrieve the result
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
C# PDF OCR
Шул ук ысул теләсә нинди PDF документыннан текст алу өчен кулланылырга мөмкин.
using IronOcr;// Create a new OCR instancevarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Load the PDF file for OCRusing (varInput = new OcrInput()){Input.AddPdf("example.pdf", "password"); // Execute OCR on the provided PDF varResult = Ocr.Read(Input); // Output recognized text and page countConsole.WriteLine(Result.Text);Console.WriteLine($"{Result.Pages.Count()} Pages");}
using IronOcr;
// Create a new OCR instance
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load the PDF file for OCR
using (var Input = new OcrInput())
{
Input.AddPdf("example.pdf", "password");
// Execute OCR on the provided PDF
var Result = Ocr.Read(Input);
// Output recognized text and page count
Console.WriteLine(Result.Text);
Console.WriteLine($"{Result.Pages.Count()} Pages");
}
ImportsIronOcr' Create a new OCR instancePrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Load the PDF file for OCRUsingInput = New OcrInput()Input.AddPdf("example.pdf", "password") ' Execute OCR on the provided PDF DimResult = Ocr.Read(Input) ' Output recognized text and page countConsole.WriteLine(Result.Text)Console.WriteLine($"{Result.Pages.Count()} Pages")EndUsing
Imports IronOcr
' Create a new OCR instance
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Load the PDF file for OCR
Using Input = New OcrInput()
Input.AddPdf("example.pdf", "password")
' Execute OCR on the provided PDF
Dim Result = Ocr.Read(Input)
' Output recognized text and page count
Console.WriteLine(Result.Text)
Console.WriteLine($"{Result.Pages.Count()} Pages")
End Using
using IronOcr;// Create a new OCR instance and set language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Load multi-frame TIFF fileusing (varInput = new OcrInput()){Input.AddMultiFrameTiff("multi-frame.tiff"); // Read text from the input varResult = Ocr.Read(Input); // Print the recognized text to the consoleConsole.WriteLine(Result.Text);}
using IronOcr;
// Create a new OCR instance and set language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load multi-frame TIFF file
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("multi-frame.tiff");
// Read text from the input
var Result = Ocr.Read(Input);
// Print the recognized text to the console
Console.WriteLine(Result.Text);
}
ImportsIronOcr' Create a new OCR instance and set language to TatarPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Load multi-frame TIFF fileUsingInput = New OcrInput()Input.AddMultiFrameTiff("multi-frame.tiff") ' Read text from the input DimResult = Ocr.Read(Input) ' Print the recognized text to the consoleConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
' Create a new OCR instance and set language to Tatar
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Load multi-frame TIFF file
Using Input = New OcrInput()
Input.AddMultiFrameTiff("multi-frame.tiff")
' Read text from the input
Dim Result = Ocr.Read(Input)
' Print the recognized text to the console
Console.WriteLine(Result.Text)
End Using
// Import IronOcr namespaceusing IronOcr;// Initialize the OCR engine and enable barcode readingvarOcr = new IronTesseract();Ocr.Configuration.ReadBarCodes = true;// Create input for OCRusing (varInput = new OcrInput()){ // Add image containing barcodesInput.AddImage("img/Barcode.png"); // Perform OCR and retrieve results varResult = Ocr.Read(Input); foreach (varBarcodeinResult.Barcodes) { // Print the value of each detected barcodeConsole.WriteLine(Barcode.Value); // Other barcode properties such as type and location can also be accessed }}
// Import IronOcr namespace
using IronOcr;
// Initialize the OCR engine and enable barcode reading
var Ocr = new IronTesseract();
Ocr.Configuration.ReadBarCodes = true;
// Create input for OCR
using (var Input = new OcrInput())
{
// Add image containing barcodes
Input.AddImage("img/Barcode.png");
// Perform OCR and retrieve results
var Result = Ocr.Read(Input);
foreach (var Barcode in Result.Barcodes)
{
// Print the value of each detected barcode
Console.WriteLine(Barcode.Value);
// Other barcode properties such as type and location can also be accessed
}
}
' Import IronOcr namespaceImportsIronOcr' Initialize the OCR engine and enable barcode readingPrivateOcr = New IronTesseract()Ocr.Configuration.ReadBarCodes = True' Create input for OCRUsingInput = New OcrInput() ' Add image containing barcodesInput.AddImage("img/Barcode.png") ' Perform OCR and retrieve results DimResult = Ocr.Read(Input) For EachBarcodeInResult.Barcodes ' Print the value of each detected barcodeConsole.WriteLine(Barcode.Value) ' Other barcode properties such as type and location can also be accessed NextBarcodeEndUsing
' Import IronOcr namespace
Imports IronOcr
' Initialize the OCR engine and enable barcode reading
Private Ocr = New IronTesseract()
Ocr.Configuration.ReadBarCodes = True
' Create input for OCR
Using Input = New OcrInput()
' Add image containing barcodes
Input.AddImage("img/Barcode.png")
' Perform OCR and retrieve results
Dim Result = Ocr.Read(Input)
For Each Barcode In Result.Barcodes
' Print the value of each detected barcode
Console.WriteLine(Barcode.Value)
' Other barcode properties such as type and location can also be accessed
Next Barcode
End Using
Рәсемнәрнең аерым өлкәләрендә OCR
Тимер OCR-ның барлык сканерлау һәм уку ысуллары битнең яки битнең кайсы өлешен текст укырга теләгәнебезне күрсәтә ала. Стандартланган формаларны караганда бу бик файдалы, бик күп вакытны саклап калырга һәм эффективлыкны күтәрергә мөмкин.
Уңыш районнары куллану өчен, без бер система Белешмә өстәргә кирәк булачак System.Drawing без куллана ала дип System.Drawing.Rectangle объект.
using IronOcr;using System.Drawing;// Create a new OCR instance and set the language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Load the target image and specify the area of interestusing (varInput = new OcrInput()){ varContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 }; // Load the specified area from the image for OCR processingInput.Add("document.png", ContentArea); // Execute OCR within the specified region varResult = Ocr.Read(Input); // Print the recognized text from the specified regionConsole.WriteLine(Result.Text);}
using IronOcr;
using System.Drawing;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load the target image and specify the area of interest
using (var Input = new OcrInput())
{
var ContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// Load the specified area from the image for OCR processing
Input.Add("document.png", ContentArea);
// Execute OCR within the specified region
var Result = Ocr.Read(Input);
// Print the recognized text from the specified region
Console.WriteLine(Result.Text);
}
ImportsIronOcrImportsSystem.Drawing' Create a new OCR instance and set the language to TatarPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Load the target image and specify the area of interestUsingInput = New OcrInput() DimContentArea = New Rectangle() With { .X = 215, .Y = 1250, .Height = 280, .Width = 1335 } ' Load the specified area from the image for OCR processingInput.Add("document.png", ContentArea) ' Execute OCR within the specified region DimResult = Ocr.Read(Input) ' Print the recognized text from the specified regionConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
Imports System.Drawing
' Create a new OCR instance and set the language to Tatar
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Load the target image and specify the area of interest
Using Input = New OcrInput()
Dim ContentArea = New Rectangle() With {
.X = 215,
.Y = 1250,
.Height = 280,
.Width = 1335
}
' Load the specified area from the image for OCR processing
Input.Add("document.png", ContentArea)
' Execute OCR within the specified region
Dim Result = Ocr.Read(Input)
' Print the recognized text from the specified region
Console.WriteLine(Result.Text)
End Using
using IronOcr;// Create a new OCR instance and set the language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Load low quality image for OCRusing (varInput = new OcrInput(@"img\Potter.LowQuality.tiff")){ // Apply filters to enhance the image qualityInput.DeNoise(); // Reduce noiseInput.Deskew(); // Correct skew // Execute OCR and display results varResult = Ocr.Read(Input);Console.WriteLine(Result.Text);}
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load low quality image for OCR
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
// Apply filters to enhance the image quality
Input.DeNoise(); // Reduce noise
Input.Deskew(); // Correct skew
// Execute OCR and display results
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
ImportsIronOcr' Create a new OCR instance and set the language to TatarPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Load low quality image for OCRUsingInput = New OcrInput("img\Potter.LowQuality.tiff") ' Apply filters to enhance the image qualityInput.DeNoise() ' Reduce noiseInput.Deskew() ' Correct skew ' Execute OCR and display results DimResult = Ocr.Read(Input)Console.WriteLine(Result.Text)EndUsing
Imports IronOcr
' Create a new OCR instance and set the language to Tatar
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Load low quality image for OCR
Using Input = New OcrInput("img\Potter.LowQuality.tiff")
' Apply filters to enhance the image quality
Input.DeNoise() ' Reduce noise
Input.Deskew() ' Correct skew
' Execute OCR and display results
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
using IronOcr;// Create a new OCR instance and set the language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Load images for OCR and PDF exportusing (varInput = new OcrInput()){Input.Title = "Quarterly Report";Input.AddImage("image1.jpeg");Input.AddImage("image2.png");Input.AddImage("image3.gif"); // Execute OCR and save results to a searchable PDF varResult = Ocr.Read(Input);Result.SaveAsSearchablePdf("searchable.pdf");}
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load images for OCR and PDF export
using (var Input = new OcrInput())
{
Input.Title = "Quarterly Report";
Input.AddImage("image1.jpeg");
Input.AddImage("image2.png");
Input.AddImage("image3.gif");
// Execute OCR and save results to a searchable PDF
var Result = Ocr.Read(Input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
ImportsIronOcr' Create a new OCR instance and set the language to TatarPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Load images for OCR and PDF exportUsingInput = New OcrInput()Input.Title = "Quarterly Report"Input.AddImage("image1.jpeg")Input.AddImage("image2.png")Input.AddImage("image3.gif") ' Execute OCR and save results to a searchable PDF DimResult = Ocr.Read(Input)Result.SaveAsSearchablePdf("searchable.pdf")EndUsing
Imports IronOcr
' Create a new OCR instance and set the language to Tatar
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Load images for OCR and PDF export
Using Input = New OcrInput()
Input.Title = "Quarterly Report"
Input.AddImage("image1.jpeg")
Input.AddImage("image2.png")
Input.AddImage("image3.gif")
' Execute OCR and save results to a searchable PDF
Dim Result = Ocr.Read(Input)
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
using IronOcr;// Create a new OCR instance and set the language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Convert multi-frame TIFF to a searchable PDFusing (varInput = new OcrInput()){Input.AddMultiFrameTiff("example.tiff"); // Execute OCR and save results as a searchable PDF varResult = Ocr.Read(Input);Result.SaveAsSearchablePdf("searchable.pdf");}
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Convert multi-frame TIFF to a searchable PDF
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("example.tiff");
// Execute OCR and save results as a searchable PDF
var Result = Ocr.Read(Input);
Result.SaveAsSearchablePdf("searchable.pdf");
}
ImportsIronOcr' Create a new OCR instance and set the language to TatarPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Convert multi-frame TIFF to a searchable PDFUsingInput = New OcrInput()Input.AddMultiFrameTiff("example.tiff") ' Execute OCR and save results as a searchable PDF DimResult = Ocr.Read(Input)Result.SaveAsSearchablePdf("searchable.pdf")EndUsing
Imports IronOcr
' Create a new OCR instance and set the language to Tatar
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Convert multi-frame TIFF to a searchable PDF
Using Input = New OcrInput()
Input.AddMultiFrameTiff("example.tiff")
' Execute OCR and save results as a searchable PDF
Dim Result = Ocr.Read(Input)
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
OCR нәтиҗәләрен HTML итеп экспортлагыз
OCR рәсеме XHTML конверсиясенә.
using IronOcr;// Create a new OCR instance and set the language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Load image and set OCR options for HTML exportusing (varInput = new OcrInput()){Input.Title = "Html Title";Input.AddImage("image1.jpeg"); // Execute OCR and save results as an HTML file varResult = Ocr.Read(Input);Result.SaveAsHocrFile("results.html");}
using IronOcr;
// Create a new OCR instance and set the language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load image and set OCR options for HTML export
using (var Input = new OcrInput())
{
Input.Title = "Html Title";
Input.AddImage("image1.jpeg");
// Execute OCR and save results as an HTML file
var Result = Ocr.Read(Input);
Result.SaveAsHocrFile("results.html");
}
ImportsIronOcr' Create a new OCR instance and set the language to TatarPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Load image and set OCR options for HTML exportUsingInput = New OcrInput()Input.Title = "Html Title"Input.AddImage("image1.jpeg") ' Execute OCR and save results as an HTML file DimResult = Ocr.Read(Input)Result.SaveAsHocrFile("results.html")EndUsing
Imports IronOcr
' Create a new OCR instance and set the language to Tatar
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Load image and set OCR options for HTML export
Using Input = New OcrInput()
Input.Title = "Html Title"
Input.AddImage("image1.jpeg")
' Execute OCR and save results as an HTML file
Dim Result = Ocr.Read(Input)
Result.SaveAsHocrFile("results.html")
End Using
using IronOcr;// Create a new OCR instance and set language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Load a low-quality image for OCRusing (varInput = new OcrInput(@"LowQuality.jpeg")){ // Apply image enhancement filtersInput.DeNoise(); // Reduce noiseInput.Deskew(); // Correct skew // Execute OCR and display the recognized text varResult = Ocr.Read(Input);Console.WriteLine(Result.Text);}
using IronOcr;
// Create a new OCR instance and set language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Load a low-quality image for OCR
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
// Apply image enhancement filters
Input.DeNoise(); // Reduce noise
Input.Deskew(); // Correct skew
// Execute OCR and display the recognized text
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
ImportsIronOcr' Create a new OCR instance and set language to TatarPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Load a low-quality image for OCRUsingInput = New OcrInput("LowQuality.jpeg") ' Apply image enhancement filtersInput.DeNoise() ' Reduce noiseInput.Deskew() ' Correct skew ' Execute OCR and display the recognized text DimResult = Ocr.Read(Input)Console.WriteLine(Result.Text)EndUsing
Imports IronOcr
' Create a new OCR instance and set language to Tatar
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Load a low-quality image for OCR
Using Input = New OcrInput("LowQuality.jpeg")
' Apply image enhancement filters
Input.DeNoise() ' Reduce noise
Input.Deskew() ' Correct skew
' Execute OCR and display the recognized text
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
OCR Рәсем Фильтрлары исемлеге
IronOCR эчендә төзелгән OCR җитештерүчәнлеген арттыру өчен кертү фильтрлары:
OcrInput.Rotate(double degrees) - Rotate images clockwise by a specified number of degrees. Use negative numbers for counter-clockwise rotation.
OcrInput.Binarize() - Converts each pixel in the image to black or white. This filter can improve OCR outcomes when there is very low contrast between text and background.
OcrInput.ToGrayScale() - Converts each pixel into a shade of gray. This may not improve OCR accuracy but can improve processing speed.
OcrInput.Contrast() - Automatically enhances image contrast. This filter often improves both the speed and accuracy of OCR on low-contrast documents.
OcrInput.DeNoise() - Removes digital noise. Use this filter only when noise is present.
OcrInput.Invert() - Inverts all colors. For example, black becomes white, and white becomes black.
OcrInput.Dilate() - Advanced morphology operation. Dilation adds pixels to the boundaries of objects in an image. Opposite of erosion.
OcrInput.Deskew() - Corrects image rotation so that it is upright and orthogonal. This is highly beneficial for OCR as Tesseract's tolerance for skew is low, around 5 degrees.
OcrInput.DeepCleanBackgroundNoise() - Severe background noise removal. Apply this filter when extreme document background noise is known; it can reduce OCR accuracy on clean documents and is CPU intensive.
OcrInput.EnhanceResolution - Augments resolution of low-quality images. Often unnecessary because OcrInput.MinimumDPI and OcrInput.TargetDPI will automatically detect and correct low-resolution inputs.
CleanBackgroundNoise - This setting requires significant computation time; however, it allows the library to automatically clean up digital noise, paper artifacts, and other imperfections, making it readable by other OCR libraries.
EnhanceContrast - This configuration automatically increases the contrast between text and its background, increasing OCR accuracy and typically boosting performance and speed.
EnhanceResolution - This setting will detect low-resolution images (below 275 dpi) and upscale them so they are more readable by the OCR library, shortening overall OCR operation time for low-quality inputs.
Language - IronOCR supports 22 international language packs, allowing the selection of one or more languages to use in the OCR operation.
Strategy - IronOCR supports two strategies: a faster, less accurate scan, and a more advanced strategy using artificial intelligence models to automatically improve text accuracy.
ColorSpace - Determines whether OCR uses grayscale or color. Grayscale is usually the best choice, but full color may yield better results when there is similar colored text or background in full-text color space.
DetectWhiteTextOnDarkBackgrounds - By default, OCR libraries will recognize black text on white backgrounds. This configuration allows IronOCR to automatically detect and read white text on black backgrounds.
InputImageType - Provides guidance to the OCR library as to whether the input is expected to be a full document or a snippet like a screenshot.
RotateAndStraighten - An advanced setting that allows IronOCR to not just rotate but correct perspectives found in photographs of text documents.
ReadBarcodes - This feature allows IronOCR to automatically read barcodes and QR codes as it reads text, adding little additional processing time.
ColorDepth - Determines the bit depth used per pixel by the OCR library for color, which may increase OCR quality but also the processing time required to complete an OCR operation.
Телләргә немец, француз, инглиз, кытай, япон һәм башкалар керә. МРЗ паспорты, MICR тикшерүләре, финанс мәгълүматлары, лицензия тәлинкәләре һәм башкалар өчен махсус тел пакетлары бар. Сез шулай ук теләсә нинди ".traineddata" файлын куллана аласыз - үзегез ясаган файлларны да кертеп.
Тел мисалы
Башка OCR телләрен куллану.
// using IronOcr;// PM> Install IronOcr.Languages.Arabic// Create an OCR instance and set the language to ArabicvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Arabic;using (varInput = new OcrInput()){ // Add an image for OCR processingInput.AddImage("img/arabic.gif"); // Execute OCR on the input varResult = Ocr.Read(Input); // Save the recognized text to a fileResult.SaveAsTextFile("arabic.txt");}
// using IronOcr;
// PM> Install IronOcr.Languages.Arabic
// Create an OCR instance and set the language to Arabic
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Arabic;
using (var Input = new OcrInput())
{
// Add an image for OCR processing
Input.AddImage("img/arabic.gif");
// Execute OCR on the input
var Result = Ocr.Read(Input);
// Save the recognized text to a file
Result.SaveAsTextFile("arabic.txt");
}
' using IronOcr;' PM> Install IronOcr.Languages.Arabic' Create an OCR instance and set the language to ArabicDimOcr = New IronTesseract()Ocr.Language = OcrLanguage.ArabicUsingInput = New OcrInput() ' Add an image for OCR processingInput.AddImage("img/arabic.gif") ' Execute OCR on the input DimResult = Ocr.Read(Input) ' Save the recognized text to a fileResult.SaveAsTextFile("arabic.txt")EndUsing
' using IronOcr;
' PM> Install IronOcr.Languages.Arabic
' Create an OCR instance and set the language to Arabic
Dim Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Arabic
Using Input = New OcrInput()
' Add an image for OCR processing
Input.AddImage("img/arabic.gif")
' Execute OCR on the input
Dim Result = Ocr.Read(Input)
' Save the recognized text to a file
Result.SaveAsTextFile("arabic.txt")
End Using
Күп телләр мисалы
ОКРга берьюлы берничә тел кулланып та мөмкин. Бу чыннан да icникод документларында инглиз теленең мета-мәгълүматларын һәм урлларын алырга ярдәм итә ала.
// using IronOcr;// PM> Install IronOcr.Languages.ChineseSimplified// Create a new OCR instancevarOcr = new IronTesseract();Ocr.Language = OcrLanguage.ChineseSimplified;Ocr.AddSecondaryLanguage(OcrLanguage.Tatar);// Load a multi-language PDFusing (varInput = new OcrInput()){Input.Add("multi-language.pdf"); // Execute OCR and save results varResult = Ocr.Read(Input);Result.SaveAsTextFile("results.txt");}
// using IronOcr;
// PM> Install IronOcr.Languages.ChineseSimplified
// Create a new OCR instance
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.ChineseSimplified;
Ocr.AddSecondaryLanguage(OcrLanguage.Tatar);
// Load a multi-language PDF
using (var Input = new OcrInput())
{
Input.Add("multi-language.pdf");
// Execute OCR and save results
var Result = Ocr.Read(Input);
Result.SaveAsTextFile("results.txt");
}
' using IronOcr;' PM> Install IronOcr.Languages.ChineseSimplified' Create a new OCR instanceDimOcr = New IronTesseract()Ocr.Language = OcrLanguage.ChineseSimplifiedOcr.AddSecondaryLanguage(OcrLanguage.Tatar)' Load a multi-language PDFUsingInput = New OcrInput()Input.Add("multi-language.pdf") ' Execute OCR and save results DimResult = Ocr.Read(Input)Result.SaveAsTextFile("results.txt")EndUsing
' using IronOcr;
' PM> Install IronOcr.Languages.ChineseSimplified
' Create a new OCR instance
Dim Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.ChineseSimplified
Ocr.AddSecondaryLanguage(OcrLanguage.Tatar)
' Load a multi-language PDF
Using Input = New OcrInput()
Input.Add("multi-language.pdf")
' Execute OCR and save results
Dim Result = Ocr.Read(Input)
Result.SaveAsTextFile("results.txt")
End Using
OCR нәтиҗәләре объектлары
Тимер OCR һәр OCR операциясе өчен OCR нәтиҗә объектын кайтара. Гадәттә, уйлап табучылар бу объектның текст мөлкәтен тексттан сканерлау өчен кулланалар. Ләкин, OCR нәтиҗәләре DOM моннан күпкә алгарак.
using IronOcr;using System.Drawing; // Add System.Drawing reference// Create a new OCR instance and set language to TatarvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Tatar;// Configure OCR engine mode and enable barcode readingOcr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;Ocr.Configuration.ReadBarCodes = true;using (varInput = new OcrInput(@"images\sample.tiff")){ // Execute OCR and retrieve OCR result OcrResultResult = Ocr.Read(Input); // Access detailed information from the OCR result varPages = Result.Pages; varWords = Pages[0].Words; varBarcodes = Result.Barcodes; // Explore the API for additional details: // - Pages, Blocks, Paragraphs, Lines, Words, Symbols // - Image export, font coordinates, statistics}
using IronOcr;
using System.Drawing; // Add System.Drawing reference
// Create a new OCR instance and set language to Tatar
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Tatar;
// Configure OCR engine mode and enable barcode reading
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
Ocr.Configuration.ReadBarCodes = true;
using (var Input = new OcrInput(@"images\sample.tiff"))
{
// Execute OCR and retrieve OCR result
OcrResult Result = Ocr.Read(Input);
// Access detailed information from the OCR result
var Pages = Result.Pages;
var Words = Pages[0].Words;
var Barcodes = Result.Barcodes;
// Explore the API for additional details:
// - Pages, Blocks, Paragraphs, Lines, Words, Symbols
// - Image export, font coordinates, statistics
}
ImportsIronOcrImportsSystem.Drawing' Add System.Drawing reference' Create a new OCR instance and set language to TatarPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Tatar' Configure OCR engine mode and enable barcode readingOcr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstmOcr.Configuration.ReadBarCodes = TrueUsingInput = New OcrInput("images\sample.tiff") ' Execute OCR and retrieve OCR result DimResultAsOcrResult = Ocr.Read(Input) ' Access detailed information from the OCR result DimPages = Result.Pages DimWords = Pages(0).Words DimBarcodes = Result.Barcodes ' Explore the API for additional details: ' - Pages, Blocks, Paragraphs, Lines, Words, Symbols ' - Image export, font coordinates, statisticsEndUsing
Imports IronOcr
Imports System.Drawing ' Add System.Drawing reference
' Create a new OCR instance and set language to Tatar
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Tatar
' Configure OCR engine mode and enable barcode reading
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm
Ocr.Configuration.ReadBarCodes = True
Using Input = New OcrInput("images\sample.tiff")
' Execute OCR and retrieve OCR result
Dim Result As OcrResult = Ocr.Read(Input)
' Access detailed information from the OCR result
Dim Pages = Result.Pages
Dim Words = Pages(0).Words
Dim Barcodes = Result.Barcodes
' Explore the API for additional details:
' - Pages, Blocks, Paragraphs, Lines, Words, Symbols
' - Image export, font coordinates, statistics
End Using
Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.