title: How to make normalized cross correlation robust to small changes in uniform regions
body: <p>the problem is described below:</p>
  
  <p>Given 2 sets of data: A= {
  91
  87
  85
  85
  84
  90
  85
  83
  86
  86
  90
  86
  84
  89
  93
  87
  89
  91
  95
  97
  91
  92
  97
  101
  101
  },</p>
  
  <p>B = {133
  130
  129
  131
  133
  136
  131
  131
  135
  135
  133
  133
  133
  131
  135
  131
  129
  131
  132
  132
  130
  127
  129
  137
  134
  },</p>
  
  <p>If A represent a set of pixels from a background image around (x,y) location, B represents another set of pixels around (x,y) from different image where the illumination changes. </p>
  
  <p>The normalised cross correlation (NCC) calculated = 0.184138251
   (from <a href="http://en.wikipedia.org/wiki/Cross-correlation#Normalized_cross-correlation" rel="nofollow">http://en.wikipedia.org/wiki/Cross-correlation#Normalized_cross-correlation</a>)</p>
  
  <p>Calculated NCC tells us the set A is different to set B. But in fact, A and B are the same group of pixels under the different illumination conditions.</p>
  
  <p>It shows that NCC is very sensitive to the small changes in the data set whose relative variation is quite small. For example, if the ratio between standard deviation and mean is representing the relative variation in each data set, then the relative variation in set A = 0.057684745, in set B = 0.018484007.</p>
  
  <p>Could anyone help me to figure out how to incorporate the relative variation factor in NCC formula, so the modified NCC is robust to the small changes in data sets where the variation within each set are very small?
  Also, the output of modified NCC still needs to be -1 to 1. </p>
  
  <p>Thanks a lot.</p>