File Exchange

image thumbnail

Fast normalised cross correlation for gray-level and color images

version 1.0 (3.7 KB) by

An extention of the normxcorr2 function.



View License

A fast vectorized implementation of the ncc that handles color (3 channel) images as well as gray level.
The algorithm for colored images is based on the ncc formulation for vector valued functions.
Note: A bug that I found in the normxcorr2 was also fixed here.

Comments and Ratings (7)


Balaji (view profile)

Hi...when i run my main code
"cc=Fast_NCC_Corr(Image2,Image1); "
in my main file..

i get the error like
"Error using >
Matrix dimensions must agree.

Error in Fast_NCC_Corr (line 87)
i_nonzero = find(cc_d > tol);"

what is this error in line 87.

Please help.. Thanks

couldnt have equal size?

Hi. In the normxcorr2 documentation C = normxcorr2(template, A) I read the A must be larger than "template" for the normalization to be meaningful. Why this happens. Thanks

Qiao Liyong


Renuka (view profile)


For Executing this file it need the Template As i am new to Matlab I dont know how to create a template and exevute this file Please help me...

Rob Campbell

Rob Campbell (view profile)

NOT a fast version of the Mathworks function: Doesn't return a matrix, as does Matlab's normxcorr2, but the x and y location of the peak. Poorly documented.


Steve (view profile)

Runs fast on a first test, but how can I get the reliability out from this (height of the peak)?

MATLAB Release
MATLAB 7.4 (R2007a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video