MatchTemplateOptions
image MatchTemplateOptions
Tuning knobs for OpenCV-style template matching (findImage, etc.): method, thresholds, pyramid level, max hits, optional mask, and search window.
Table of contents
Properties
Properties
method
method?:number
OpenCV template metric, e.g. cv.TM_CCOEFF_NORMED, cv.TM_CCORR_NORMED, … (see OpenCV matchTemplate documentation).
weakThreshold
weakThreshold?:number
Pre-filter similarity—candidates below this score are discarded before finer checks.
threshold
threshold?:number
Final acceptance threshold in [0, 1]. Higher = stricter. If omitted, a default is derived from image size (per runtime).
level
level?:number
Image-pyramid depth. Larger values speed up wide-area searches but may reduce accuracy. Use MAX_LEVEL_AUTO (-1) to let the runtime pick a level.
max
max?:number
Cap on how many matches to return. Omit for “return all” (subject to other limits).
useTransparentMask
useTransparentMask?:boolean
When the template carries an alpha channel, enabling this uses transparency as a mask for tighter scoring.
region
region?:Region
Restrict matching to a rectangle; omit to scan the whole image.
