Mathematische Gleichungen lesen – OCR Software Texterkennung für Formeln mit IronOCR
Kann IronOCR Gleichungen lesen?
IronOCR verwendet Tesseract 4/5 und sollte recht gut darin sein, Gleichungen direkt zu lesen, auch wenn Sie möglicherweise mit den detaillierten Konfigurationsoptionen experimentieren möchten:
Tesseract-Konfigurationsvariablen erkunden
Sie können auch benutzerdefinierte Sprachpakete zu IronOCR hinzufügen: Erfahren Sie mehr über benutzerdefinierte Sprachpakete
Es gibt auch ein EQU-Gleichungserkennungs-Sprachpaket: EQU-Sprachpaket
// 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
Im obigen Beispiel verwendet IronOCR die Tesseract-OCR-Engine, um Gleichungen aus einer Bilddatei zu lesen. Das benutzerdefinierte Sprachpaket für Gleichungen (equ) wird geladen, um die Erkennungsgenauigkeit zu verbessern. Die Methode ReadEquations akzeptiert einen Dateipfad zu dem Bild, das die Gleichungen enthält, führt eine OCR durch und gibt den erkannten Text aus.

