I think I still might be a bit confused about how to derive the 1D derivative filter from the last equation lol.
Let's work it out then:
$f'(x) = \frac{f(x+1)-f(x-1)}{2} = (0.5)\cdot f(x+1)+(0)\cdot f(x) + (-0.5)\cdot f(x-1)$
Recall that the definition of a discrete 1D convolution is
$(g*f)(x) = \sum_i g(i) f(x-i)$
Combining the above equations, the values for the kernel $g(x)$ must then be $g(-1) = 1$, $g(0) = 0$, and $g(1) = -1$.
I think I still might be a bit confused about how to derive the 1D derivative filter from the last equation lol.
Let's work it out then:
$f'(x) = \frac{f(x+1)-f(x-1)}{2} = (0.5)\cdot f(x+1)+(0)\cdot f(x) + (-0.5)\cdot f(x-1)$
Recall that the definition of a discrete 1D convolution is
$(g*f)(x) = \sum_i g(i) f(x-i)$
Combining the above equations, the values for the kernel $g(x)$ must then be $g(-1) = 1$, $g(0) = 0$, and $g(1) = -1$.