OCR FindText not accurate

In v11.02-Mac of Eggplant, I'm finding inconsistent results when using the FindText function of OCR.

I tried numerous ways to make the run consistent yet Eggplant fails at some point due to it not finding a text that is on the SUT.

Different combinations of Search parameters:
moveto (Text:"Access", TextSize:"14", TextFont:"Geneva")
moveto (Text:"Access")
moveto (Text:"Access", TextPlatform:"MacOSX", TextSize:"14", TextFont:"Geneva")
moveto (Text:"Order Confirmation)
moveto (Text:"Order Confirmation", TextColor:(135,162,179),TextPlatform:"MacOSX", TextFont:"Geneva", TextSize:"14", SearchRectangle:(ImageLocation("Buffer1"),(ImageLocation("Buffer2"))))

The font color was obtained using the most prominent color in the font by clicking on the Text, then the magnifying lense.

Below is a list of texts I used to test the accuracy of OCR Find text. It does not complete the run because during different instances, it fails to read a line. I tried the different combinations indicated above, yet it does not find all of the texts below. It does not complete successfully.

moveto (Text:"Access"
moveto (Text:"Password confirm functionality)
moveto (Text:"HD Movie)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
MoveTo (Text:"Access Order a Movie)
moveto (Text:"SD Movie)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"HD Movie title)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"HD Movie)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"SD Movie)
moveto (Text:"HD Movie title)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"HD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"Order Confirmation)
moveto (Text:"SD Movie title order)
moveto (Text:"Access Order a Movie or Event now)
moveto (Text:"Password confirm functionality)
moveto (Text:"PPV Help page)
moveto (Text:"SD Movie title order)
moveto (Text:"HD Movie title order)
moveto (Text:"SD Movie)
moveto (Text:"HD Movie title)
moveto (Text:"Order Confirmation)

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    First, none of the parameters like TextSize, TextFont, TextColor apply to the OCR search. Those are Text Image properties used when you're actually generating an image of the text. If your default Text Platform (under Preferences > Text) is set to "Generic OCR" then these searches will be OCR searches:

    moveto (Text:"Access", TextSize:"14", TextFont:"Geneva") // the font properties will be ignored
    moveto (Text:"Access")
    moveto (Text:"Order Confirmation")

    but because you have specified "TextPlatform:MacOSX", these searches will be using the eggPlant machine's built-in text rendering routines to create images of the specified text:

    moveto (Text:"Access", TextPlatform:"MacOSX", TextSize:"14", TextFont:"Geneva")
    moveto (Text:"Order Confirmation", TextColor:(135,162,179),TextPlatform:"MacOSX", TextFont:"Geneva", TextSize:"14", SearchRectangle:(ImageLocation("Buffer1"),(ImageLocation("Buffer2"))))

    Make sure that you are using the OCR search. If you verify that it is set as the default in the Preferences, that should be good enough. You can verify it in code by using the code:
    put the defaultTextPlatform.Name // should return "Generic OCR"
    

    Is it possible to turn off the underlining of the links (should be a browser setting)? I suspect that some of the problems are caused by the underlining, which overlaps some of the characters, specifically in the descenders in strings like "PPV Help Page". Running your code against your screenshot with the same search rectangle defined, eggPlant had no problem finding all of the specified strings. With a larger rectangle it was tripped up by "PPV Help Page" and it had trouble with that same string when asked to read the whole page.
  • Thanks for the reasoning. When it's not reading the texts, I chose certain words that it does read and ocr seems to find that text consistently.

    I also removed the underlining of the links. I used Safari, Preferences, Styesheet using a css I created containing only one line:
    a { text-decoration: none }
Sign In or Register to comment.