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
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Image | File | Yes | Image to search in. | |
| Template | File | Yes | Picture to look for. | |
| Tolerance | Number | No | 10 | Allowed difference in percent (0 = pixel-exact); raise for anti-aliased or scaled screens. |
| Occurrence | Number | No | 1 | Which match to use when the picture appears several times, counting in reading order from 1. |
| Position | String | No | center | Point reported (and clicked): center of the match, or its top_left corner; offsets are added to it. |
| Offset x | Number | No | 0 | Pixels added to the reported x, e.g. to reach a field to the right of a label picture. |
| Offset y | Number | No | 0 | Pixels added to the reported y. |
| X | Number | No | Search region left; the whole image or screen when the region is empty. | |
| Y | Number | No | Search region top. | |
| Width | Number | No | Search region width. | |
| Height | Number | No | Search region height. | |
| Repeat times | Number | No | 1 | How 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) | Number | No | 500 | Pause between two looks, in milliseconds. |
Outputs
| Output | Type | What it is |
|---|---|---|
| found | Boolean | True when a match within the tolerance was found. |
| x | Number | Centre x of the match (or the chosen point). |
| y | Number | Centre y of the match (or the chosen point). |
| similarity | Number | Similarity of the best match in percent. |
| count | Number | Number of matches found (up to occurrence when it is above 1). |
| left | Number | Left edge of the match. |
| top | Number | Top edge of the match. |