var result = new IronTesseract() { Configuration = new TesseractConfiguration { WhiteListCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789- " } }.Read(new OcrInput("image.png")); Console.WriteLine(result.Text);
var result = new IronTesseract() { Configuration = new TesseractConfiguration { WhiteListCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789- " } }.Read(new OcrInput("image.png")); Console.WriteLine(result.Text);
using IronOcr;// Initialize the Tesseract OCR engineIronTesseract ocr = new IronTesseract();ocr.Configuration = new TesseractConfiguration{ // Whitelist only characters that appear on license platesWhiteListCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789- ", // Blacklist common noise charactersBlackListCharacters = "`~@#$%&*",};var ocrInput = new OcrInput();// Load the input imageocrInput.LoadImage("advanced-input.png");// Perform OCR on the input image with ReadPhoto methodvar results = ocr.ReadPhoto(ocrInput);// Print the filtered text result to the consoleConsole.WriteLine(results.Text);
using IronOcr;
// Initialize the Tesseract OCR engine
IronTesseract ocr = new IronTesseract();
ocr.Configuration = new TesseractConfiguration
{
// Whitelist only characters that appear on license plates
WhiteListCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789- ",
// Blacklist common noise characters
BlackListCharacters = "`~@#$%&*",
};
var ocrInput = new OcrInput();
// Load the input image
ocrInput.LoadImage("advanced-input.png");
// Perform OCR on the input image with ReadPhoto method
var results = ocr.ReadPhoto(ocrInput);
// Print the filtered text result to the console
Console.WriteLine(results.Text);
ImportsIronOcr' Initialize the Tesseract OCR engineDim ocr As New IronTesseract()ocr.Configuration = New TesseractConfigurationWith { ' Whitelist only characters that appear on license plates .WhiteListCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789- ", ' Blacklist common noise characters .BlackListCharacters = "`~@#$%&*"}Dim ocrInput As New OcrInput()' Load the input imageocrInput.LoadImage("advanced-input.png")' Perform OCR on the input image with ReadPhoto methodDim results = ocr.ReadPhoto(ocrInput)' Print the filtered text result to the consoleConsole.WriteLine(results.Text)
Imports IronOcr
' Initialize the Tesseract OCR engine
Dim ocr As New IronTesseract()
ocr.Configuration = New TesseractConfiguration With {
' Whitelist only characters that appear on license plates
.WhiteListCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789- ",
' Blacklist common noise characters
.BlackListCharacters = "`~@#$%&*"
}
Dim ocrInput As New OcrInput()
' Load the input image
ocrInput.LoadImage("advanced-input.png")
' Perform OCR on the input image with ReadPhoto method
Dim results = ocr.ReadPhoto(ocrInput)
' Print the filtered text result to the console
Console.WriteLine(results.Text)
IronTesseract ocr = new IronTesseract();ocr.Configuration = new TesseractConfiguration{PageSegmentationMode = TesseractPageSegmentationMode.SingleLine,};using OcrInput input = new OcrInput();input.LoadImage("single-line-label.png");OcrResult result = ocr.Read(input);Console.WriteLine(result.Text);
IronTesseract ocr = new IronTesseract();
ocr.Configuration = new TesseractConfiguration
{
PageSegmentationMode = TesseractPageSegmentationMode.SingleLine,
};
using OcrInput input = new OcrInput();
input.LoadImage("single-line-label.png");
OcrResult result = ocr.Read(input);
Console.WriteLine(result.Text);
ImportsIronOcrDim ocr As New IronTesseract()ocr.Configuration = New TesseractConfigurationWith { .PageSegmentationMode = TesseractPageSegmentationMode.SingleLine}Using input As New OcrInput() input.LoadImage("single-line-label.png") Dim result AsOcrResult = ocr.Read(input)Console.WriteLine(result.Text)EndUsing
Imports IronOcr
Dim ocr As New IronTesseract()
ocr.Configuration = New TesseractConfiguration With {
.PageSegmentationMode = TesseractPageSegmentationMode.SingleLine
}
Using input As New OcrInput()
input.LoadImage("single-line-label.png")
Dim result As OcrResult = ocr.Read(input)
Console.WriteLine(result.Text)
End Using
IronTesseract ocr = new IronTesseract();ocr.Configuration = new TesseractConfiguration{PageSegmentationMode = TesseractPageSegmentationMode.SparseText,};using OcrInput input = new OcrInput();input.LoadImage("receipt-scan.png");OcrResult result = ocr.Read(input);Console.WriteLine(result.Text);
IronTesseract ocr = new IronTesseract();
ocr.Configuration = new TesseractConfiguration
{
PageSegmentationMode = TesseractPageSegmentationMode.SparseText,
};
using OcrInput input = new OcrInput();
input.LoadImage("receipt-scan.png");
OcrResult result = ocr.Read(input);
Console.WriteLine(result.Text);
ImportsIronTesseractDim ocr As New IronTesseract()ocr.Configuration = New TesseractConfigurationWith { .PageSegmentationMode = TesseractPageSegmentationMode.SparseText}Using input As New OcrInput() input.LoadImage("receipt-scan.png") Dim result AsOcrResult = ocr.Read(input)Console.WriteLine(result.Text)EndUsing
Imports IronTesseract
Dim ocr As New IronTesseract()
ocr.Configuration = New TesseractConfiguration With {
.PageSegmentationMode = TesseractPageSegmentationMode.SparseText
}
Using input As New OcrInput()
input.LoadImage("receipt-scan.png")
Dim result As OcrResult = ocr.Read(input)
Console.WriteLine(result.Text)
End Using
IronTesseract ocr = new IronTesseract();ocr.Configuration = new TesseractConfiguration{RenderSearchablePdf = true,};using OcrInput input = new OcrInput();input.LoadPdf("scanned-document.pdf");OcrResult result = ocr.Read(input);result.SaveAsSearchablePdf("searchable-output.pdf");
IronTesseract ocr = new IronTesseract();
ocr.Configuration = new TesseractConfiguration
{
RenderSearchablePdf = true,
};
using OcrInput input = new OcrInput();
input.LoadPdf("scanned-document.pdf");
OcrResult result = ocr.Read(input);
result.SaveAsSearchablePdf("searchable-output.pdf");
ImportsIronTesseractDim ocr As New IronTesseract()ocr.Configuration = New TesseractConfigurationWith { .RenderSearchablePdf = True}Using input As New OcrInput() input.LoadPdf("scanned-document.pdf") Dim result AsOcrResult = ocr.Read(input) result.SaveAsSearchablePdf("searchable-output.pdf")EndUsing
Imports IronTesseract
Dim ocr As New IronTesseract()
ocr.Configuration = New TesseractConfiguration With {
.RenderSearchablePdf = True
}
Using input As New OcrInput()
input.LoadPdf("scanned-document.pdf")
Dim result As OcrResult = ocr.Read(input)
result.SaveAsSearchablePdf("searchable-output.pdf")
End Using
IronTesseract ocr = new IronTesseract();ocr.Configuration = new TesseractConfiguration{RenderHocr = true,};using OcrInput input = new OcrInput();input.LoadImage("document-page.png");OcrResult result = ocr.Read(input);result.SaveAsHocrFile("output.html");
IronTesseract ocr = new IronTesseract();
ocr.Configuration = new TesseractConfiguration
{
RenderHocr = true,
};
using OcrInput input = new OcrInput();
input.LoadImage("document-page.png");
OcrResult result = ocr.Read(input);
result.SaveAsHocrFile("output.html");
ImportsIronOcrDim ocr As New IronTesseract()ocr.Configuration = New TesseractConfigurationWith { .RenderHocr = True}Using input As New OcrInput() input.LoadImage("document-page.png") Dim result AsOcrResult = ocr.Read(input) result.SaveAsHocrFile("output.html")EndUsing
Imports IronOcr
Dim ocr As New IronTesseract()
ocr.Configuration = New TesseractConfiguration With {
.RenderHocr = True
}
Using input As New OcrInput()
input.LoadImage("document-page.png")
Dim result As OcrResult = ocr.Read(input)
result.SaveAsHocrFile("output.html")
End Using
using IronOcr;using System.IO;IronTesseract ocr = new IronTesseract();ocr.Configuration = new TesseractConfiguration{ // Whitelist only Hiragana, Katakana, numbers, and common Japanese punctuationWhiteListCharacters = "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん" + "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン" + "0123456789、。?!()¥ー", // Blacklist common noise/symbols you want to ignoreBlackListCharacters = "★■§",};var ocrInput = new OcrInput();// Load Japanese input imageocrInput.LoadImage("jp.png");// Perform OCR on the input image with ReadPhoto methodvar results = ocr.ReadPhoto(ocrInput);// Write the text result directly to a file named "output.txt"File.WriteAllText("output.txt", results.Text);// You can add this line to confirm the file was saved:Console.WriteLine("OCR results saved to output.txt");
using IronOcr;
using System.IO;
IronTesseract ocr = new IronTesseract();
ocr.Configuration = new TesseractConfiguration
{
// Whitelist only Hiragana, Katakana, numbers, and common Japanese punctuation
WhiteListCharacters = "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん" +
"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン" +
"0123456789、。?!()¥ー",
// Blacklist common noise/symbols you want to ignore
BlackListCharacters = "★■§",
};
var ocrInput = new OcrInput();
// Load Japanese input image
ocrInput.LoadImage("jp.png");
// Perform OCR on the input image with ReadPhoto method
var results = ocr.ReadPhoto(ocrInput);
// Write the text result directly to a file named "output.txt"
File.WriteAllText("output.txt", results.Text);
// You can add this line to confirm the file was saved:
Console.WriteLine("OCR results saved to output.txt");
ImportsIronOcrImportsSystem.IODim ocr As New IronTesseract()ocr.Configuration = New TesseractConfigurationWith { .WhiteListCharacters = "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん" & "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン" & "0123456789、。?!()¥ー", .BlackListCharacters = "★■§"}Dim ocrInput As New OcrInput()' Load Japanese input imageocrInput.LoadImage("jp.png")' Perform OCR on the input image with ReadPhoto methodDim results = ocr.ReadPhoto(ocrInput)' Write the text result directly to a file named "output.txt"File.WriteAllText("output.txt", results.Text)' You can add this line to confirm the file was saved:Console.WriteLine("OCR results saved to output.txt")
Imports IronOcr
Imports System.IO
Dim ocr As New IronTesseract()
ocr.Configuration = New TesseractConfiguration With {
.WhiteListCharacters = "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん" &
"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン" &
"0123456789、。?!()¥ー",
.BlackListCharacters = "★■§"
}
Dim ocrInput As New OcrInput()
' Load Japanese input image
ocrInput.LoadImage("jp.png")
' Perform OCR on the input image with ReadPhoto method
Dim results = ocr.ReadPhoto(ocrInput)
' Write the text result directly to a file named "output.txt"
File.WriteAllText("output.txt", results.Text)
' You can add this line to confirm the file was saved:
Console.WriteLine("OCR results saved to output.txt")