Line break missing

51 views
Skip to first unread message

Полина Трубникова

unread,
Jul 30, 2015, 1:52:12 PM7/30/15
to tesseract-ocr

Hello,
I'm trying to OCR a column of numbers. Result looks like tessnet2 loses line break sometimes. For example, instead of "100","200","300","400","500" it finds "100" and "200300400500".
How can I fix it?
Thanks in advance.

Pavel Shcherbakov

unread,
Aug 1, 2015, 6:21:55 AM8/1/15
to tesseract-ocr
Hi, I have approximately the same data set (a column of numbers), and the best solution I've discovered so far is to split the image of a column to several images with a single number in each.
Another solution I can propose is to set PageSegMode to 4. PSM 4 is "Assume a single column of text of variable sizes", which seems pretty much what you need.

Перевод на родной:
Привет, у меня примерно такой же формат данных, как и у тебя (тоже числа в столбик). Самый лучший способ, который мне удалось найти, и которым я сам пользуюсь - это разбить изображение со столбцом чисел на несколько изображений так, чтобы в каждом изображении было ровно одно число, распознавать их уже по-отдельности.
Ещё один способ, который может подойти - задать PageSegMode значение 4. В исходном коде написано, что 4 означает "Assume a single column of text of variable sizes" - по-моему, то, что нужно.
Reply all
Reply to author
Forward
0 new messages