A simple Edge Detection using the Sobel operator
The Sobel Operator help us get the edges of an image by computing an aproximation of an image gradient. At each point the result is either the corresponding gradient vector or the norm of this vector.
By convoluting our image with our first kernel from left to right we get the Gradient in the X direction
Then by convoluting our image with our first kernel from top to bottom we get the Gradient in the Y direction
At this point we have the vectors of the gradient of the image. Now by finding the magnitude o each vector we will get the edges we need.