# What does "invariant to bias and gain changes" mean?

Reading this paper, about the ECC criterion (which is included in opencv3), In section 3, the following is stated, with regard to the following equation:

(4) $$\left\|\frac{i_r}{\left\|i_r\right\|} - \frac{i_w(p)}{\left\|i_w(p)\right\|}\right\|^2$$

It is apparent from (4) that our criterion is invariant to bias and gain changes. This also suggests that our measure is going to be invariant to any photometric distortions in brightness and/or in contrast.

What does "bias", "gain" invariant mean?

Thanks

You need to be careful when reproducing formulas! Your $$i_r$$, $$i_w$$ are actually $$\bar{i_r}$$, $$\bar{i_w}$$ in the paper and two sentences above $$(4)$$, it says these are

their zero-mean versions, which are obtained by subtracting from each vector its corresponding arithmetic mean.

So, the symbols in your formula are always the same, regardless of whether there is a constant value added to them (that's the definition of bias), because that would automatically shift the arithmetic mean by the same amount.

The division by the individual vector's norm also "undos" any multiplication with a scalar (that's the definition of gain).

So, the overall formula is unchanged (that's what invariant means) when you add a bias to the vectors, and unchanged when you apply gain to the vectors.