Zero mean filters for edges at different orientations

In the first question of the quiz, a filter like the following is presented.

\begin{matrix} 1 & 1 & 2 \\ 1 & 2 & -1 \\ 2 & -1 &-1 \end{matrix}

But this is not zero mean, while the other analogous matrices mentioned in the lecture for other orientations are zero mean.

Would matrices like

\begin{matrix} 1 & 1 & 0 \\ 1 & 0 & -1 \\ 0 & -1 & -1 \end{matrix}

or

\begin{matrix} 2 & 1 & 0 \\ 1 & 0 & -1 \\ 0 & -1 &-2 \end{matrix}

be adequate alternatives?

The filters do not need to have a zero mean.

The dataset should have a zero mean, but not the filters.

If they are zero mean, their response to constant images will be zero. Isn’t this is a nice property for edge detectors?

Not necessarily. In a learning system, you’re not going to specify the exact filter. The filters will be learned through training. If an edge detector helps to minimize the cost, then a filter that happens to detect edges will be learned.

Training includes both the weight values for the filter and a bias value that compensates for any offsets.

Also keep in mind that the filters used in the quiz are just simple examples, and aren’t completely implemented systems.

Thank you for your explanation!