Question about OCR

Hey guys,

Thanks for the greatest plugin my Mac is currently boasting! It such a powerful app and I try alot of things with it (successfully).

Just I stumbled upon OCR and wanted to get going with it. So I made a macro that OCR the Keyboard Maestro action list, and see what the Actionlist will give me in return.

Here is a little screenshot, red border is OCR area (don't look at the coordinates, I've changed the position to make a screenshot), green border is engine log:

It is basically unusable, is there something I'm doing wrong? Some recognition are flawless, but the rest is gibberish

Regards,

Instead of “Languages- English” try selecting “Apple Text Recognition”, that’s much more reliable.

2 Likes


Indeed this look much better,

But honestly even with this I thought it would've worked better. This is ~70% accuracy

TRex (Mac App) gives me a 100% accuracy score:
All Actions
Favorites
Third Party Plug Ins
Application Control
Clipboard
Control Flow
Debugger
Execute
File
Front Browser Control
Google Chrome Control
Image
Interface Control
Keyboard Maestro
MIDI
Music Control
Notifications
Open
QuickTime Player Control
Safari Control
Stream Deck Control
Switchers
System Control
Text
Variables
Web

Thanks Roger!

As Keyboard Maestro uses external tools to do the translation (i.e. it doesn't have its own translation engine), what you get is what you get. You can try some things, like changing font sizes or window background colors, to help it out, but there's nothing that Keyboard Maestro itself could do to improve the results (short of writing their own translation engine, which would be a nightmare of a project).

I'm a bit surprised at your results; I created the same macro as you did, and the OCR got every name exactly right, except for one instance of an "O" instead of a "0". What happens if you repeat your test in light mode?

However, if you have some third-party tool that's working very well for OCR, you could just find a way to feed it data through KM. TRex looks to have a URL option, so you can send it the contents of the clipboard you capture with KM, for example.

-rob.

2 Likes

I did your tests, several times and in both black and white modes, and my results were always 100.000% accurate. So my speculation is that you are using an Intel-based Mac. Am I right? I've always suspected that the Intel Macs would have less accurate OCR.

When Apple first introduced its new OCR, Intel Macs were excluded. Due to public pressure, Apple quickly added this feature to Intel Macs, and there may have been different code added to support it, which potentially could be less accurate.

This is my best theory at the moment.

1 Like

Thanks for your comment and thinking with me!

I'm using a Macbook M1 Pro at work.

But now I try this at home and also getting a consistent 100% accuracy score (on darkmode), I'm using Mac mini M2 Pro here.

Anyways, since i will be using it at home at not at work, I guess there is no problem (it's still weird though).

I love KM!!

Tesseract does not like white on black text. It is much less reliable in those cases.

In any event, for English, using Apple Text Recognition now that it is available is highly recommended.