OCR Is Broken

As an experiment, I optimized just the teal text in your image, enlarging it, reducing it to grayscale and increasing the contrast:

This allowed the second line to be OCRed accurately but not the first: "De CE Bue Race un Rieu Um ed function"

So I reset the type in an image editing program, recreating the image:

optimized

That delivered accurate results: "How do I create a macro that can be called from another macro as a function"

Then it occurred to me to reverse the optimized version of the original image:

That's pretty blurry, but it was easily readable: "How do I create a macro that can be called from another macro as function"

I think this shows the quality of the text in the image to be OCRed is the determining factor in this case. While it's easy for human eyes to read the original, even a version of the image optimized for OCR wasn't legible to the software while a reset version with a little more clarity in the type was converted correctly.

So in this case it isn't Keyboard Maestro's engine or the OCR package but the image.

Update: 18 August 2021

For a deeper dive into optimizing images for OCR see Tesseract's Improving the Quality of the Output. Tesseract is the OCR engine Keyboard Maestro uses.

4 Likes