Hi there! I am looking for the open source solution to convert an image (having math equation written on it) into Latex

330 views
Skip to first unread message

muhammad hamad

unread,
Nov 2, 2023, 10:57:07 AM11/2/23
to tesseract-ocr
I have tried LateX-OCR [ https://github.com/lukas-blecher/LaTeX-OCR ] but it is not fruit full. Do you have any suggestions. Thanks in advance!

Example:
Input Image: Attached Below
Output in LaTex: \begin{equation}\int_{2}^{1}x^{2}dx+\sqrt[3]{2}\end{equation}
int math.jpeg

Dellu Bw

unread,
Nov 2, 2023, 11:11:51 AM11/2/23
to tesser...@googlegroups.com
This is regular ocring project. If you have accurate output with whatever way, latex would accept it. Do, the right question is how to get accurate results for equestions.  You can try find discussions about equestions in this forum.

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/1006e0ea-8c0b-4b7d-a2c0-f50d9d46b8d9n%40googlegroups.com.

Des Bw

unread,
Nov 2, 2023, 1:11:43 PM11/2/23
to tesseract-ocr
OCRing handwritten equations is very difficult. Even Acrobat DC is not recognizing any of the characters in your image. 

Art Rhyno

unread,
Nov 2, 2023, 3:15:53 PM11/2/23
to tesser...@googlegroups.com

This gets confusing, but there is an open source alternative to MathPix called Pix2Text [1]. It uses LateX-OCR but it has had some work done on handwritten equations. Unfortunately, the model used doesn’t seem to be part of the distribution yet, but is available in the web version [2]. One positive in your sample is that the equation is written in a different colour, I tried using OpenCV to isolate the colour, and then used the attached against the web version. I couldn’t get a faithful rendering for the LaTeX but it might be worth investigating:

 

\int_{x}\,x^{2}\,\,d x\;\;+\,\,\sqrt{d}

 

Good luck, the handwritten aspect of your quest makes it a difficult one, but Pix2Text shows some promise for typeset equations at least.

 

art

---

1. https://github.com/breezedeus/Pix2Text

2. https://p2t.breezedeus.com/

From: tesser...@googlegroups.com <tesser...@googlegroups.com> On Behalf Of muhammad hamad
Sent: Thursday, November 2, 2023 10:00 AM
To: tesseract-ocr <tesser...@googlegroups.com>
Subject: [tesseract-ocr] Hi there! I am looking for the open source solution to convert an image (having math equation written on it) into Latex

 

You don't often get email from muhammad...@gmail.com. Learn why this is important

--

blue.png
Reply all
Reply to author
Forward
0 new messages