
In ImageMagick subimage search, the brightest similarity-map peak identifies the best candidate location, not necessarily an exact match. Each map position represents a possible top-left corner for the small image inside the large one. Read the coordinate, score and nearby competing peaks together.
Specify the two input roles
Identify the large search image and the smaller reference patch. Record their pixel dimensions and which source version supplied the patch. A patch resized, recolored or taken from a different revision can still have a best candidate even when no identical instance exists.
Use the documented compare subimage-search route in the installed ImageMagick 7 build and select the metric intentionally. Do not interpret a similarity map from one metric with another metric's score expectations.
Account for build-dependent output
The official option reference says subimage search produces a difference image and, depending on metric acceleration, a similarity-score image. HDRI and the FFTW delegate enable frequency-domain acceleration for specified metrics; the compare:frequency-domain=false define selects the documented spatial-domain alternative.
Do not require two output files as a universal success condition or infer that a missing optional map proves no comparison happened. Capture the chosen metric and build capabilities with the report.
Interpret the map's coordinates
The similarity image uses the large image's dimensions. Its pixels encode candidate reference-patch origins, not the reference's center and not an already verified object box.
Use the reported position with the small patch's known width and height to form a proposed comparison rectangle. Confirm it against the large raster. The preview-coordinate guide explains why coordinates copied from a scaled preview need their own mapping.
Inspect alternative peaks
Repeated patterns can create several plausible locations. Compare the candidate patches visually and inspect whether the intended reference really occurs there. The source explicitly warns that the best peak need not be a perfect match.
A highest score among poor candidates is still merely the highest candidate. Do not turn it into a universal confidence percentage, identity assertion or proof of authorship.
The before-and-after evidence guide concerns evaluating transformation examples, not locating a patch. This procedure's artifact is a metric-labeled candidate-location report with unresolved alternatives. No search was run and no detection accuracy is claimed.
Related tasks
- Why Does My Image Edit Land in the Wrong Place When I Copy Preview Coordinates?
- How to Choose a Photo Skill by Its Before-and-After Example
Sources and scope
- ImageMagick 7 option reference: subimage-search: Subimage search returns difference and, depending on metric acceleration, a similarity map; peak location is a best candidate, not necessarily a perfect match.
Official ImageMagick 7 documentation was captured October 23, 2026. Examples and checks are proposed, not executed. Confirm the installed build, required delegates, actual file representation and shell syntax.
Prepared by Imagild Editorial, the company editorial team responsible for these guides. AI assisted research and drafting. This is documentation-based guidance with proposed examples, not a claim of hands-on testing or an independent product review. Report a correction.
Cover: Pignatta / Pixabay, Pixabay Content License. This is an illustrative source photograph, not an application screenshot or a generated test result.