TKFRvisionOfficial / bszet_substitution_plan

Parsing and Image creation service of the BSZET substitution plan bot
GNU Affero General Public License v3.0
2 stars 0 forks source link

PyTesseract Image recognition doesn't work properly. #25

Closed PBahner closed 2 years ago

PBahner commented 2 years ago

Here are some examples what doesn't work:

MarcelCoding commented 2 years ago

Are you able to specify the font family. It could be Arial. This could also dramatically improve the accuracy.

TKFRvisionOfficial commented 2 years ago

@PBahner Pytesseract ist designed to detect whole sentences. Not single numbers and symbols.

https://stackoverflow.com/questions/68512226/how-to-improve-the-accuracy-of-pytesseract

MarcelCoding commented 2 years ago

Have you tried what the first answer on the linked thread is saying?

PBahner commented 2 years ago

Ok I have tried it now and parsing every single char works worse than I thought. Especially then the image recognition confuses letters and numbers (e.g. B->8, I->1, O->0, g->9, ->l->1)

TKFRvisionOfficial commented 2 years ago

so easyocr is also not the answer? godamnit...

PBahner commented 2 years ago

I'm actually trying to improve the recognition. Surely it will work better than PyTesseract but it won't work flawlessly...

MarcelCoding commented 2 years ago

I just tested a bit with tesseract and notices that you can (at least in rust) specify the scan region. If you would scan every cell independent that would improve the accuracy. (because there are no lines in between)

PBahner commented 2 years ago

@MarcelCoding I always parse the cells independently...

MarcelCoding commented 2 years ago

You extract and specify the bounds of every cell?