NormalizedCrossCorrelationMean.grad#

NormalizedCrossCorrelationMean.grad()[source]#

Gradient of the score w.r.t. translation (first three) and rotation (last three).

Has the same form as NormalizedCrossCorrelation.grad() evaluated on the centred values vc = v - mean(v) and weights wc = w - mean(w); the mean-subtraction contributes no extra terms because sum(vc) = sum(wc) = 0 (so d<vc, wc>/dp = <dv/dp, wc> and d||vc||/dp = <vc, dv/dp> / ||vc||). Returns score_sign * d(score)/dp.