Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Cross-correlation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Zero-normalized cross-correlation (ZNCC)=== For [[Digital image processing|image-processing]] applications in which the brightness of the image and template can vary due to lighting and exposure conditions, the images can be first normalized. This is typically done at every step by subtracting the mean and dividing by the [[standard deviation]]. That is, the cross-correlation of a template <math>t(x,y)</math> with a subimage <math>f(x,y)</math> is <math display="block">\frac{1}{n\sigma_f \sigma_t} \sum_{x,y}\left(f(x,y) - \mu_f \right)\left(t(x,y) - \mu_t \right)</math> where <math>n</math> is the number of pixels in <math>t(x,y)</math> and <math>f(x,y)</math>, <math>\mu_f</math> is the average of <math>f</math> and <math>\sigma_f</math> is [[standard deviation]] of <math>f</math>. In [[functional analysis]] terms, this can be thought of as the dot product of two [[Unit vector|normalized vectors]]. That is, if<math display="block">F(x,y) = f(x,y) - \mu_f</math>and<math display="block">T(x,y) = t(x,y) - \mu_t</math>then the above sum is equal to<math display="block">\left\langle\frac{F}{\|F\|},\frac{T}{\|T\|}\right\rangle</math>where <math>\langle\cdot,\cdot\rangle</math> is the [[inner product]] and <math>\|\cdot\|</math> is the [[Lp space|''L''² norm]]. [[Cauchy–Schwarz]] then implies that ZNCC has a range of <math>[-1, 1]</math>. Thus, if <math>f</math> and <math>t</math> are real matrices, their normalized cross-correlation equals the cosine of the angle between the unit vectors <math>F</math> and <math>T</math>, being thus <math>1</math> if and only if <math>F</math> equals <math>T</math> multiplied by a positive scalar. Normalized correlation is one of the methods used for [[template matching]], a process used for finding instances of a pattern or object within an image. It is also the 2-dimensional version of [[Pearson product-moment correlation coefficient]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)