Ask Your Question
0

Tesseract not detecting text

asked 2017-09-13 14:02:52 -0600

psyfreak gravatar image

updated 2017-09-13 14:09:28 -0600

image description

I cleared the background of the image to the extent that I can possibly do but tesseract only detects the last column here and ignores the rest. Why is this happening its showing very inconsistent resul image description

In this image it detects the 1st 2nd and third row

Can some one please explain to me why this is happening ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-09-14 09:54:42 -0600

LBerger gravatar image

updated 2017-09-14 09:56:15 -0600

I clean maually your image

image description

and results are (leptonica1.74.4 and tesseract matser "4.00.00alpha"):

TEXT ETRACTION
langue :fra
moteur : Default, based on what is available.
analyse : Assume a single uniform block of text.
niveau : ligne
image : a.png
Image too small to scale!! (2x48 vs min width of 3)
Line cannot be recognized!!
Image too small to scale!! (2x48 vs min width of 3)
Line cannot be recognized!!
Text:
8212 15 1 4 40
l 7198 7 3 6 40
6307 6 1 5 60
5640 2 3 6 80
4884 1 1 5 80

proba = 94.9853->[2418 x 49 from (34, 47)] : 8212 15 1 4 40

proba = 84.1706->[2452 x 111 from (0, 150)] : l 7198 7 3 6 40

proba = 94.5019->[2417 x 49 from (35, 377)] : 6307 6 1 5 60

proba = 96.1703->[2416 x 49 from (36, 542)] : 5640 2 3 6 80

proba = 94.8845->[2419 x 49 from (33, 707)] : 4884 1 1 5 80
edit flag offensive delete link more

Comments

can you help me with a python solution and not manual I made that image after lot of cleaning but I have no idea how to clean those black areas other than text

psyfreak gravatar imagepsyfreak ( 2017-09-14 10:25:17 -0600 )edit

I don't know python.

In first image you can sum rows and it will give you region with low value and high value. You can crop image using region. @sturkmen got a code for this in a post.

For second image may be you use the same method to decide when inverse image

LBerger gravatar imageLBerger ( 2017-09-14 11:51:22 -0600 )edit
1

original image can be processed easily

sturkmen gravatar imagesturkmen ( 2017-09-14 12:18:29 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-09-13 14:02:52 -0600

Seen: 1,763 times

Last updated: Sep 14 '17