In the last section, we touched upon the foundation on which the frameworks for edge detection are built on. Let's partake in a deeper analysis of the same here.
The very first step in a common edge detection framework that you might come across is the computation of derivatives. The derivatives along both the x and the y direction are computed separately and stored in, say, two different matrices. So, for every pixel (x, y) in the input image, we essentially have the gradient in the x and the y direction: and (these gradient values will be stored in the locations that correspond to pixel (x, y) in both the matrices). From these two values of gradients, we compute what is known as the gradient magnitude at (x, y). The gradient magnitude is given by the following formula:
If you recall, this is the same as the magnitude of a two-dimensional vector that has components and . In fact, derivatives (or gradients) in multiple dimensions...