Formulation

The operator uses two 3 × 3 cores, collapsing the original image to calculate the approximate values of the derivatives: one horizontally and one vertically. Let *A* be the original image and *Gx* i *Gy* be two images in which each point contains a horizontal and vertical approximation of the derivative, which is calculated as:

$$\mathbf{G}\_{\mathbf{x}} = \begin{bmatrix} -1 & 0 & 1 \\ -1 & 0 & 1 \\ -1 & 0 & 1 \end{bmatrix} \cdot A\_{\mathbf{x}} \text{ and } \mathbf{G}\_{\mathbf{y}} = \begin{bmatrix} -1 & -1 & -1 \\ 0 & 0 & 0 \\ 1 & 1 & 1 \end{bmatrix} \cdot A\_{\mathbf{x}}$$
