2

This is the first time I am working with OCR. I have an image and want to extract data from the image. My image looks like this:

enter image description here

I have 500 such images and will have to record the parameters and the respective values. I'm thinking of doing it through code than doing manually.

I have tried with python py-tesseract and PIL libraries. They are performing good if the image contains some simple text.This is what i tried


from PIL import Image, ImageEnhance, ImageFilter

from pytesseract import image_to_string

from pytesseract import image_to_boxes

im = Image.open("AHU.png")
im = im.filter(ImageFilter.MedianFilter())
enhancer = ImageEnhance.Contrast(im)
im = enhancer.enhance(2)
im = im.convert('1')
im.save('temp2.jpg')
text = image_to_string(Image.open('temp2.jpg'))
print(text)

What to do in this case where there are several parameters? All my images are similar with respect to position of the values.

chink
  • 1,505
  • 3
  • 28
  • 70

0 Answers0