Croatian OCR in C# and .NET
Outras versões deste documento:
O IronOCR é um componente de software C# que permite aos desenvolvedores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o croata. Trata-se de uma versão avançada do Tesseract, criada exclusivamente para desenvolvedores .NET , e que supera regularmente outros mecanismos do Tesseract tanto em velocidade quanto em precisão.
Conteúdo de IronOcr.Idiomas.Croata
Este pacote contém suporte para 49 linguagens de OCR for .NET, incluindo:
- Croata
- CroatianBest
- CroataFast
Baixar
Pacote de idioma croata [hrvatski jezik]
Instalação
O primeiro passo é instalar o pacote OCR croata em seu projeto .NET usando o NuGet.
Install-Package IronOcr.Languages.Croatian
Exemplo de código
Este exemplo de código C# lê texto croata de uma imagem ou documento PDF.
// Add the required namespace for IronOCR
using IronOcr;
class OCRExample
{
public static void Main()
{
// Create a new IronTesseract instance
var Ocr = new IronTesseract();
// Set the OCR language to Croatian
Ocr.Language = OcrLanguage.Croatian;
// Define the input image or PDF containing Croatian text
using (var Input = new OcrInput(@"images\Croatian.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text to the console
System.Console.WriteLine(AllText);
}
}
}
// Add the required namespace for IronOCR
using IronOcr;
class OCRExample
{
public static void Main()
{
// Create a new IronTesseract instance
var Ocr = new IronTesseract();
// Set the OCR language to Croatian
Ocr.Language = OcrLanguage.Croatian;
// Define the input image or PDF containing Croatian text
using (var Input = new OcrInput(@"images\Croatian.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text to the console
System.Console.WriteLine(AllText);
}
}
}
' Add the required namespace for IronOCR
Imports IronOcr
Friend Class OCRExample
Public Shared Sub Main()
' Create a new IronTesseract instance
Dim Ocr = New IronTesseract()
' Set the OCR language to Croatian
Ocr.Language = OcrLanguage.Croatian
' Define the input image or PDF containing Croatian text
Using Input = New OcrInput("images\Croatian.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
Explicação
- IronTesseract : Esta é a classe principal usada para realizar operações de OCR. Ele lê texto de imagens ou PDFs e suporta vários idiomas.
- OcrInput : Representa a fonte de entrada para OCR, que pode ser uma imagem ou um arquivo PDF.
- Ocr.Read : Executa o processo de OCR na entrada especificada.
- Result.Text : Contém o texto extraído da entrada, que é então impresso no console.

