Reconocimiento óptico de caracteres (OCR) de Myanmar en C# y .NET
IronOCR es un componente de software C# que permite a los desarrolladores .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el birmano. Es una bifurcación avanzada de Tesseract, construida exclusivamente para desarrolladores .NET, y regularmente supera a otros motores Tesseract en velocidad y precisión.
Contenido de IronOcr.Languages.Myanmar
Este paquete contiene soporte OCR para 114 idiomas específicos de Myanmar:
- Myanmar
- MyanmarBest
- MyanmarFast
- MyanmarAlphabet
- MyanmarAlphabetBest
- MyanmarAlphabetFast
Descargar
Paquete de Idioma Myanmar [Birmano]
Instalación
Primero, instala el paquete OCR de Myanmar en tu proyecto .NET a través de NuGet:
Install-Package IronOCR.Languages.Myanmar
Ejemplo de código
Este ejemplo de código C# lee texto en birmano de una imagen o documento PDF.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Myanmar
Ocr.Language = OcrLanguage.Myanmar;
// Define input source - image or PDF containing Myanmar text
using (var Input = new OcrInput(@"images\Myanmar.png"))
{
// Perform OCR on the input and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Output the recognized Myanmar text
Console.WriteLine(AllText);
}
}
}// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Myanmar
Ocr.Language = OcrLanguage.Myanmar;
// Define input source - image or PDF containing Myanmar text
using (var Input = new OcrInput(@"images\Myanmar.png"))
{
// Perform OCR on the input and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Output the recognized Myanmar text
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Myanmar
Ocr.Language = OcrLanguage.Myanmar
' Define input source - image or PDF containing Myanmar text
Using Input = New OcrInput("images\Myanmar.png")
' Perform OCR on the input and obtain the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the OCR result
Dim AllText = Result.Text
' Output the recognized Myanmar text
Console.WriteLine(AllText)
End Using
End Sub
End ClassExplicación
- IronTesseract: Esta es la clase principal proporcionada por la biblioteca IronOCR que maneja tareas de OCR.
- Ocr.Language: Establece el idioma para OCR; este ejemplo está configurado en
OcrLanguage.Myanmar. - OcrInput: Se utiliza para especificar la fuente de entrada, que podría ser un archivo de imagen o PDF.
- Ocr.Read: Realiza el proceso de OCR y devuelve un objeto
OcrResult. - Result.Text: Contiene el texto extraído de la imagen o documento PDF.





