Manejo de ecuaciones con IronOCR

This article was translated from English: Does it need improvement?
Translated
View the article in English

¿Puede IronOCR leer ecuaciones?

IronOCR utiliza Tesseract 4/5 y debería funcionar bastante bien al leer ecuaciones de manera predeterminada, aunque puede que desee experimentar con las opciones de configuración detalladas:

Explorar Variables de Configuración de Tesseract

También puede agregar paquetes de idiomas personalizados a IronOCR: Aprenda sobre paquetes de idioma personalizados

También hay un Paquete de Detección de Ecuaciones EQU: Paquete de Idioma EQU

// C# Example to demonstrate reading equations using IronOCR

using IronOcr; // Import the IronOcr namespace

public class EquationOcrExample
{
    public void ReadEquations(string imagePath)
    {
        // Instantiate the IronTesseract object
        var Ocr = new IronTesseract();

        // Load the custom EQU language for better equation detection
        Ocr.Language = Ocr.Languages.Add("equ");

        // Read and OCR the image containing equations
        using (var Input = new OcrInput(imagePath))
        {
            // Extract OcrResult from the image
            var Result = Ocr.Read(Input);

            // Output the contents of the OCR result as text
            System.Console.WriteLine(Result.Text);
        }
    }
}
// C# Example to demonstrate reading equations using IronOCR

using IronOcr; // Import the IronOcr namespace

public class EquationOcrExample
{
    public void ReadEquations(string imagePath)
    {
        // Instantiate the IronTesseract object
        var Ocr = new IronTesseract();

        // Load the custom EQU language for better equation detection
        Ocr.Language = Ocr.Languages.Add("equ");

        // Read and OCR the image containing equations
        using (var Input = new OcrInput(imagePath))
        {
            // Extract OcrResult from the image
            var Result = Ocr.Read(Input);

            // Output the contents of the OCR result as text
            System.Console.WriteLine(Result.Text);
        }
    }
}
' C# Example to demonstrate reading equations using IronOCR

Imports IronOcr ' Import the IronOcr namespace

Public Class EquationOcrExample
	Public Sub ReadEquations(ByVal imagePath As String)
		' Instantiate the IronTesseract object
		Dim Ocr = New IronTesseract()

		' Load the custom EQU language for better equation detection
		Ocr.Language = Ocr.Languages.Add("equ")

		' Read and OCR the image containing equations
		Using Input = New OcrInput(imagePath)
			' Extract OcrResult from the image
			Dim Result = Ocr.Read(Input)

			' Output the contents of the OCR result as text
			System.Console.WriteLine(Result.Text)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

En el ejemplo anterior, IronOCR utiliza el motor OCR de Tesseract para leer ecuaciones de un archivo de imagen. El paquete de idioma personalizado para ecuaciones (equ) se carga para mejorar la precisión de detección. El método ReadEquations acepta una ruta de archivo a la imagen que contiene ecuaciones, realiza OCR y produce el texto reconocido.

Curtis Chau
Escritor Técnico

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien ...

Leer más
¿Listo para empezar?
Nuget Descargas 5,167,857 | Version: 2025.11 recién lanzado