Template Matching in Images using Segmented Normalized Cross-Correlation

Davor Marušić, Siniša Popović, Zoran Kalafatić
2/3/2025
cs.CV

No confident code implementation found for this paper.

Abstract

In this paper, a new variant of an 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 a template image approximation, enabling more efficient calculation of approximate NCC with the source image than using the original template 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 depend on per-segment pixel intensity variance. In the approximate template, each segment is assigned the mean grayscale value of the corresponding pixels from the original template. The proposed algorithm achieves superior computational performance with negligible NCC approximation errors compared to the well-known Fast Fourier Transform (FFT)-based NCC algorithm, when applied on less visually complex and/or smaller template images. In other cases, the proposed algorithm can maintain either computational performance or NCC approximation error within the range of the FFT-based algorithm, but not both.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{marui2025template,
  title  = {Template Matching in Images using Segmented Normalized Cross-Correlation},
  author = {Davor Marušić and Siniša Popović and Zoran Kalafatić},
  year   = {2025},
  eprint = {2502.01286},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.01286v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.01286.svg)](https://codeofpaper.com/paper/2502.01286)

Discussion