Skip to main content

Find image in image

Look for a small picture inside a larger image file, optionally in a region and for its n-th appearance; returns the point of the match.

Command in the Image recognition toolkit · id ooa.image/find_in_image · 13 inputs (2 required), 7 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
ImageFileYesImage to search in.
TemplateFileYesPicture to look for.
ToleranceNumberNo10Allowed difference in percent (0 = pixel-exact); raise for anti-aliased or scaled screens.
OccurrenceNumberNo1Which match to use when the picture appears several times, counting in reading order from 1.
PositionStringNocenterPoint reported (and clicked): center of the match, or its top_left corner; offsets are added to it.
Offset xNumberNo0Pixels added to the reported x, e.g. to reach a field to the right of a label picture.
Offset yNumberNo0Pixels added to the reported y.
XNumberNoSearch region left; the whole image or screen when the region is empty.
YNumberNoSearch region top.
WidthNumberNoSearch region width.
HeightNumberNoSearch region height.
Repeat timesNumberNo1How many times to look while the picture is not found; the image file is read again each time, e.g. while another program refreshes it. 1 looks once.
Repeat delay (milliseconds)NumberNo500Pause between two looks, in milliseconds.

Outputs​

OutputTypeWhat it is
foundBooleanTrue when a match within the tolerance was found.
xNumberCentre x of the match (or the chosen point).
yNumberCentre y of the match (or the chosen point).
similarityNumberSimilarity of the best match in percent.
countNumberNumber of matches found (up to occurrence when it is above 1).
leftNumberLeft edge of the match.
topNumberTop edge of the match.