0

I have an image here:

metre

I need to extract the meter readings from this image which is "0005053" at the centre.

I have tried pytesseract as follows:

import pytesseract
from PIL import Image
text = pytesseract.image_to_string(Image.open("Screen_Shot_2564-08-25_at_11.23.13.png"))
print(text)

The output I got was ' \n\x0c'.

Another service I found was AWS Textract which is extremely accurate but I couldn't find a workaround to implement that in python. Any leads there will be appreciated.

Any idea on how to resolve this?

Thanks

vaisxn
  • 71
  • 8
  • Do you always have the same framing of the subject matter? I don't think you can feed that image into anything that helps unless you extract a smaller region of the image. – Steven Aug 26 '21 at 02:59
  • Yes, the framing is always the same, the zoom levels might differ but not in great proportions. – vaisxn Aug 26 '21 at 03:01
  • How does pytesseract work when you crop the image down to just the numbers and run it through? – Steven Aug 26 '21 at 03:15
  • I cant take that route, because in the real time, the user is is going to the image just like the tagged one. – vaisxn Aug 26 '21 at 04:20
  • Yes but I am trying to determine if the issue is the OCR, or the noise in the image. You may need to find a process where you can help identify the region to OCR with some other detection algorithm and then pass the subregion to the OCR engine. It is a lot to just ask the OCR to find the text, given how many characters are all over the shot in other places. – Steven Aug 26 '21 at 16:44

1 Answers1

1

If you want to go the textract route you can easily implement it using boto3. You can also try using AWS Rekognition to do the same task and see whether it is more accurate/cheaper

Ninad Gaikwad
  • 4,272
  • 2
  • 13
  • 23