similarity measure
********************SAD: Sum of Absolute DifferencesSAD=Σin|Xi-Yi|(similar lighting)some distinct points work well others don’t such as: edges, areas of uniformity
(some lighting changes and slight (2 degrees)rotation)SAD adds up constant lighting changes.If two images are identical, but offset(偏移) in greyscale intensity by D, then the SAD score will differ by nD
**********************SSD: Sum of Squared Differences SSD=Σin (Xi-Yi)2Enhances effect of very different pixelsDerive how SSD is the same as NCC if patches are normalized
(done on the board, show normalized SSD=2-2NCC : the bigger NCC is, the lower SSD isCorrelation =ΣinXiYi
•NCC =(ΣXiYi)/(||X|| ||Y||) -turn each patch into unit vector•CSM = Σ(Xi-Xu)(Yi-Yu) -subtract mean for lighting level•VNC =(Σ(Xi-Xu)(Yi-Yu) /Nsd(X)sd(Y) =(Σ(Xi-Xu)(Yi-Yu)/Nsqrt[Σ(Xi-Xu)(Xi-Xu)/N]sqrt[Σ(Yi-Yu)(Yi-Yu)/N]-compensate for both lighting level and brightnes