Fast/Robust Template Matching

Template Matching with SSD Block Matching and Normalized CC, (color) 2D and 3D
19.3K Downloads
Updated 22 Feb 2011

View License

TEMPLATE_MATCHING is a CPU efficient function which calculates matching score images between template and (color) 2D image or 3D image volume.

It calculates:
- The sum of squared difference (SSD Block Matching), robust template matching.
- The normalized cross correlation (NCC), independent of illumination, only dependent on texture

The user can combine the two images, to get template matching which works robust with his application.

Both matching methods are implemented using FFT based correlation.

Try the examples.

Please report: bugs, successes and other comment.

Cite As

Dirk-Jan Kroon (2024). Fast/Robust Template Matching (https://www.mathworks.com/matlabcentral/fileexchange/24925-fast-robust-template-matching), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0.0

Faster Multiple Template search

1.1.0.0

Fixed Range to 0..1

1.0.0.0