Image processing - Is mean filter shift-invariant?
The 1D mean filter defined by the following I/O relation is time/shift invariant;

$$y[n] = T\{x[n]\} = \frac{1}{d_1 + d_2 + 1} \sum_{k=n-d_1}^{n+d_2}{x[k]}$$

For $d_1$ and $d_2$ being positive integers, the filter computes the mean (or the average) of its input $x[n]$ in the range of its summation index. To show that it is shift invariant we shall simply show the truth of the following statement:  $y[n-d] = T\{x[n-d]\}$ for and $d$ and any input $x[n]$

$$ y[n-d] = \frac{1}{d_1 + d_2 + 1} \sum_{k=n-d-d_1}^{n-d+d_2}{x[k]} ~~~\overset{?}{=}~~~ T\{x[n-d]\} = \frac{1}{d_1 + d_2 + 1} \sum_{k=n-d_1}^{n+d_2}{x[k-d]}$$

Which is easily shown to be true by making the simple change of variable in the second sum as $k-d=k'$ and then optionally replacing $k'$ with $k$ again:
\begin{align}
T\{x[n-d]\} &amp;= \frac{1}{d_1 + d_2 + 1} \sum_{k=n-d_1}^{n+d_2}{x[k-d]} ~~~~ &amp;\scriptstyle{\text{replace k-d with k'}}\\
T\{x[n-d]\} &amp;= \frac{1}{d_1 + d_2 + 1} \sum_{k'=n-d-d_1}^{n-d+d_2}{x[k']} &amp;\scriptstyle{\text{replace k' with k again}}\\
T\{x[n-d]\} &amp;= \frac{1}{d_1 + d_2 + 1} \sum_{k=n-d-d_1}^{n-d+d_2}{x[k]} &amp;\scriptstyle{\text{recognise that this is =  y[n-d]}}\\
T\{x[n-d]\} &amp;= y[n-d] &amp;\scriptstyle{\text{Hence the given System is LTI}}\\
\end{align}

This is extended to 2D in a straight-forward manner