0

I'm just start using easyocr for text detection but I found that some text were missing. For example this 1 and 2 per attached image. missin text

I try to do the pre processing by dilate the text which is not working. Also changing min_size to < 10 in readtext() also not working.

Here is the code

import easyocr
import argparse
import cv2

image = cv2.imread('thin_image.jpg')

reader = easyocr.Reader(['en','th'])
results = reader.readtext(image,min_size=3)

for (bbox,text,prob) in results:
    (tl,tr,br,bl) = bbox
    tl = (int(tl[0]),int(tl[1]))
    tr = (int(tr[0]),int(tr[1]))
    br = (int(br[0]),int(br[1]))
    bl = (int(bl[0]),int(bl[1]))
    print(text)
    cv2.rectangle(image,tl,br,(0,255,0),2)
cv2.imwrite("rs.jpg",image)

Could anyone point me to a correct direction please ?

0 Answers0