OCR Difficulties

Hello mods, I am trying to use the OCR that comes with the latest version of OCR to read the text attached. It is mistaking the N for an H, A for R, R for an A, B for an A and so on and so forth. I have tried with contrast on and off, when it was on I tried various tolerances ranging from 10-100.

Please give it a try and let me know if your OCR engine is able to recognize those characters.

(To test: I make a loop to read one line at a time, then it just increments the y coordinates)

Note: I do not care about the time-stamp, just the text.

Thanks,
Z

I don’t think the OCR is ever going to be able to read this font reliably. If you can change the font used by this window without invalidating your tests, you should have better luck. The main problem is that the letter shapes are not very distinct. For example the letter A in this font has a rounded shape that is more commonly associated with the structurally similar letter R. Similarly, the letter V is rounded like a U, and the W really just looks like a U with a thick bottom (see attached zoomed image).

Setting the contrast isn’t doing anything because you already have almost maximum contrast, i.e., white on black. There aren’t any pixels to nudge one way or another.

PLEASE be aware that the OCR is an interpretive algorithm – it’s seeing shapes in a cloud of pixels and trying to make those shapes into letters. There is no letter to “just read” – there are a whole bunch of pixels of one color splattered with some pixels of another color (or more generally, colors) and there are a bunch of heuristics that are used to determine whether there are any words there. It tries to use context to resolve uncertainties, but when what is being asked to read isn’t actual words, there is no context.

As an alternative. This text looks like something that you should be able to capture using the RemoteClipboard by issuing a copy command on the SUT.

If that would work, it would be a much better route to pursue.

I know there are problems with this font, but this is what is being used and cannot be changed.

Assuming I take shots of every character/number/symbol, is there a way I can search for a string using those shots?

Thank you guys for the help,
Z

If this is on a Windows SUT then you should be able to use the TIG approach. You install the TIG executable on the SUT and it uses the SUT’s built-in text rendering and installed fonts to generate images of the text on the fly and return them to eggPlant. The scripting process is the same as for OCR, but you specify External TIG as the text engine.

Are there so many messages that you can’t just capture images of the whole message and look for those?

Part of what determines the best approach will be if you are trying to read what is actually present on the screen or whether you are trying to look for something that might be on the screen.

The SUT is actually running on Solaris and eggPlant is running on Mac OS-X.

It is a massive system and capturing the images can be endless (thousands of images, texts). The Display text is 14 pixels high by seven pixels wide. The font used is called “misc_fixed_bold_normal”, which is an ISO standard font defined as “14-130-75-75-c-70-ISO8859-1”. Not sure if that helps.

And these images/texts might be on the screen or might not be,

I think I will end up taking shots of all the characters and try to implement a function that somehow will read the font given a library of character images.

Thank you,
Z

Please send an email to support and we can send you a suite that does the kind of character-image–based reading that you’re describing.

@EggplantMatt:

When discussing searching through TIG you stated -

“The scripting process is the same as for OCR, but you specify External TIG as the text engine.”

Does this mean that eggPlant will not utilize TIG functionality until it’s been told to do so through the Preferences menu?

That’s more or less correct, by which I mean, it has to be specified as part of a Text Platform in the Preferences, but you can switch the Text Platform on the fly by specifying it as a property of the text search. The WindowsClassic text platform uses the TIG; since v11 of eggPlant, the default Text Platform has been GenericOCR, which uses the OCR engine.

Note that with Windows SUTs, use of the TIG also requires that a TIG executable be installed on the SUT or on a similarly configured machine.