IronOCR ile Denklem İşleme
IronOCR denklemleri okuyabilir mi?
IronOCR, Tesseract 4/5 kullanır ve kutudan çıktığı haliyle denklemleri okumada oldukça iyi çalışmalıdır, ancak detaylı konfigürasyon seçeneklerini deneyimlemek isteyebilirsiniz.
Tesseract Yapılandırma Değişkenlerini Keşfedin
Özel dil paketleri hakkında bilgi edinin: IronOCR'ye özel dil paketleri de ekleyebilirsiniz
EQU Dil Paketi: Ayrıca, bir EQU Eşitlik Algılama Dil Paketi de mevcuttur
// 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 = OcrLanguage.Custom;
Ocr.UseCustomTesseractLanguageFile("equ.traineddata");
// Read and OCR the image containing equations
using (var Input = new OcrInput())
{
Input.LoadImage(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);
}
}
}' VB Example to demonstrate reading equations using IronOCR
Imports IronOcr ' Import the IronOcr namespace
Public Class EquationOcrExample
Public Sub ReadEquations(imagePath As String)
' Instantiate the IronTesseract object
Dim Ocr As New IronTesseract()
' Load the custom EQU language for better equation detection
Ocr.Language = OcrLanguage.Custom
Ocr.UseCustomTesseractLanguageFile("equ.traineddata")
' Read and OCR the image containing equations
Using Input As New OcrInput()
Input.LoadImage(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' VB Example to demonstrate reading equations using IronOCR
Imports IronOcr ' Import the IronOcr namespace
Public Class EquationOcrExample
Public Sub ReadEquations(imagePath As String)
' Instantiate the IronTesseract object
Dim Ocr As New IronTesseract()
' Load the custom EQU language for better equation detection
Ocr.Language = OcrLanguage.Custom
Ocr.UseCustomTesseractLanguageFile("equ.traineddata")
' Read and OCR the image containing equations
Using Input As New OcrInput()
Input.LoadImage(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 ClassYukarıdaki örnekte, IronOCR bir görüntü 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 görüntünün dosya yolunu kabul eder, OCR gerçekleştirir ve tanınan metni çıktı olarak verir.
Curtis Chau, Bilgisayar Bilimleri alanında Lisans Derecesine (Carleton Üniversitesi) sahip ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirmeyle ilgileniyor. Sezgisel ve estetik açıdan hoş kullanıcı arayüzleri oluşturma tutkunu, Curtis modern çerçevelerle çalışmayı ve iyi yapılandırılmış, görsel olarak çekici kılavuzlar oluşturmayı seviyor.