ImageHorizonLibrary

Hi Jaggs,

A tip for tuning images for image recognition libraries like ImageHorizon and SikuliLibrary, is to make your reference images smaller to give you a better chance at a match without having to lower the confidence level.

As an example with your reference image:
image

Any variation in the length of the field will cause a no match, likewise and variation in the distance from the field to the pane frae (black vertical bar at the right of the reference image, will also cause a no match

I would use a reference image like this as you’ll get a much better match rate:
image

notice I don’t include the round corners, nor the full width of the field, just enough to uniquely identify the place on the screen you want.

Also note with macos, if you take the screenshot on a machine with a retina display it won’t work on a non-retina display (so take that into consideration if you plan on running the tests in a Ci environment (the same applies for screen scaling in Windows and Linux, a retina display is just 200% screen scaling)

Hope that helps,

Dave.

1 Like