Template Matching in Images Using Segmented Normalized Cross-Correlation
In this paper, a new variant of algorithm for normalized cross-correlation (NCC) is proposed in the context of template matching in images. The proposed algorithm is based on the precomputation of template image approximation, enabling more efficient calculation of approximate NCC with the source image than if the original template were used for exact NCC calculation. The approximate template is precomputed from the template image by a split-and-merge approach, resulting in a decomposition to axis-aligned rectangular segments, whose sizes are contingent on per-segment pixel intensity variance. In the approximate template, each segment gets the corresponding mean grayscale value of the original template assigned to all of its pixels. The conducted tests demonstrate that the proposed algorithm exhibits superior computational performance with negligible NCC approximation errors in comparison with the well-known FFT-based algorithm for NCC computation, when applied on less visually complex and/or smaller template images. In other cases, the proposed algorithm can maintain either the computational performance or NCC approximation error within the range of FFT-based algorithm, but not both.
Authors
- Dragan Marušič (ORCID: https://orcid.org/0000-0002-8452-3057)
- Zoran Kalafatić (ORCID: https://orcid.org/0000-0001-8918-9070)
- Siniša Popović (ORCID: https://orcid.org/0000-0001-6026-9261)
Institutions
- University of Zagreb (HR)
Publication Details
- Published
- 2025-06-02
- DOI
- https://doi.org/10.1109/mipro65660.2025.11131796
- Citations
- 1
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 1.24