Part 1.1: Finite Difference Operator
Finite difference filters: $$ D_x = \begin{bmatrix} -1 & 1 \end{bmatrix} \\ D_Y = \begin{bmatrix} -1 \\ 1 \end{bmatrix} $$ Let \(A\) denote the original image. To compute the gradient in one direction and the gradient magnitude \(G_m\): $$ G_x = A * D_x \\ G_y = A * D_y \\ G_m = \sqrt{G_x^2 + G_y^2} $$