limited on 2 axes, sampled
I(x, y) = [[u00, u01, ..., u0n],
[u10, u11, ..., u1n],
...
[um0, um1, ..., umn]]
...
dI/dx = [[u01-u00, ...], ...] = [[u00, ...], ...] * [1, -1]
dI/dy = [[u10-u00, ...], ...] = [[u00, ...], ...] * [1, -1]^T
"^T" - matrix transponation
"*" - is operation of convolution
change between the samples in given axis,
approximation of derivative function in given point and axis
Gradient approximation can be calculated:
- magnitude - sqrt( (dI/dx)^2 + (dI/dy)^2 ), sqrt - square root
- angle - arctan( {dI/dx} / {dI/dy} )