Let $A$ be a image matrix and let $P(i,j)$ be the gray level of pixel $i,j$. Let $0$ be black and $255$ be white Assume I want to differentiate this image with respect to the columns $(x)$ as in I want $P(i,j)=P(i,j+1)-P(i,j)$ in the new image.
I get that I can achieve this with convolution of $A$ with the filter $f = [1 \ -1]$ since you flip the filter in the $x-$direction (so pixel $i,j$ would be multiplied by $-1$ and $i,j+1$ with $1$ which gives me what I want.
My understanding is that this process is supposed to highlight differences in the $x-$direction.
How does the gray-level scale in the resulting image work? If one pixel had gray level $240$ and the next pixel had gray level $5$, this would result in the new pixel having the gray level $-235$, what does that mean in the scale of $0$ to $255$? Does my scale change from $0...255$ to $-255...255$?
Does it matter if I convolve $A$ with the filter $[-1 \ 1]$ instead of $[1 \ -1]$?. What would be the result?