Skip to content
Advertisement

Pytesseract read coloured text

I am trying to read coloured (red and orange) text with Pytesseract. I tried to not grayscale the image, but that didn’t work either.

Images, that it CAN read IMG 1 IMG 2 IMG 3

Images, that it CANNOT read IMG 1 IMG 2

My current code is:

JavaScript

Advertisement

Answer

This little function (below) will do for any color

ec9Ut.png

enter image description here

Thresh result

enter image description here

x18MN.png

enter image description here

Thresh result

enter image description here

SFr48.png

enter image description here

Thresh result

enter image description here

JavaScript

Output

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement