Tesseract's binarization

38 views
Skip to first unread message

Scott Thibault

unread,
Jan 26, 2019, 11:54:22 AM1/26/19
to tesseract-ocr
I want to do my own pre-processing including binarization so I can remove borders and other artifacts.  However, the performance seems to be worse.  Perhaps Tesseract has better binarization?  What algorithm does it use?

--Scott

farhad khalafi

unread,
Jan 26, 2019, 12:05:41 PM1/26/19
to tesser...@googlegroups.com
I believe Tesseact uses Otsu algorithm to find a single threshold value. The threshold is used to set gray pixels to binary values depending on whether a gray level is below or above the threshold. I use Leptonica for my own pre-OCR image processing and the performance seems to be fine.



On Sat, Jan 26, 2019 at 9:54 AM Scott Thibault <sathi...@gmail.com> wrote:
I want to do my own pre-processing including binarization so I can remove borders and other artifacts.  However, the performance seems to be worse.  Perhaps Tesseract has better binarization?  What algorithm does it use?

--Scott

--
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 post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/2aac2250-cbaa-4b7a-bef0-ca1acf13d5f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lars Fricke

unread,
Jan 26, 2019, 3:21:25 PM1/26/19
to tesser...@googlegroups.com
I get far better results with bad quality scans using a local threshold. A very nice tool to find the  best algorithm for your case is http://imagej.net/Auto_Threshold in the Fuji Distribution of ImageJ. I got awesome results with Phansalkar.

Am Sa., 26. Jan. 2019, 18:05 hat farhad khalafi <farhad....@gmail.com> geschrieben:

Scott Thibault

unread,
Jan 26, 2019, 4:33:01 PM1/26/19
to tesser...@googlegroups.com
Which Leptonica method do you use?


Scott Thibault

unread,
Jan 26, 2019, 4:34:07 PM1/26/19
to tesser...@googlegroups.com
Thanks, I think I'll try some of Leptonica's methods since I'm already linking to that library anyway.  They have both local and global methods.


Reply all
Reply to author
Forward
0 new messages