Denklemlerin IronOCR ile İşlenmesi
IronOCR denklemleri okuyabilir mi?
IronOCR, Tesseract 4/5 kullanır ve kutudan çıkar çıkmaz denklemleri okumada oldukça iyi çalışır, ancak detaylı yapılandırma seçenekleriyle denemeler yapmak isteyebilirsiniz:
Tesseract Konfigürasyon Değişkenlerini Keşfedin
IronOCR'ye özel dil paketleri de ekleyebilirsiniz: Özel dil paketleri hakkında bilgi edinin
Ayrıca bir EQU Denklem Algılama Dil Paketi vardır: EQU Dil Paketi
// 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
Yukarıdaki örnekte, IronOCR, bir resim dosyasından denklemleri okumak için Tesseract OCR motorunu kullanır. Denklemler için özel dil paketi (equ), algılama doğruluğunu artırmak için yüklenir. ReadEquations yöntemi, denklemleri içeren resim için bir dosya yolu kabul eder, OCR gerçekleştirir ve tanınan metni çıktılar.

