I am trying to detect text on buttons so that I can get their location and use *pyautogui *to click the button automatically. But the buttons' text returned by tesseract is not even close.
[image: aiScreen.png] <about:invalid#zClosurez> It know tesseract has issues with light text on dark background, so I have tried inverting the color (after some post-processing) [image: ocrImageUsed.png] <about:invalid#zClosurez> However, this hasn't helped either. The result includes "ro" where the "Finish" button is, and it didn't even find the "Cancel" button or the verify buttons. <about:invalid#zClosurez> However, when the button is big enough, or the button text is long enough, or even when the image is cropped to exclude one edge of the buttons, it works fine. <about:invalid#zClosurez> <about:invalid#zClosurez> <about:invalid#zClosurez>[image: Screen Shot 2019-03-27 at 10.12.56 AM.png] <about:invalid#zClosurez>[image: ocrImageUsedCropped.png] I am using: oem:1, psm:6 <about:invalid#zClosurez>I've tried all psm modes. Is there a better workaround than to crop the image? Because different browsers load the buttons differently. So if I were to write a script that's browser independent, cropping for every single browser wouldn't be efficient. I'm using *tesseract 4.0 on Mac* <about:invalid#zClosurez> -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/68e7ba91-b514-4f4e-baed-62f282e6f99d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

