# What is Edge Detection Convolutional Neural Network’s (CNN’s) edge detection.

(Multi-Class image classification step by step guide part 3)

So in the previous story on transfer learning(Transfer Learning) there was a missing part to be covered before proceeding that was edge detection.So what are edges.

So basically edges are sudden changes of discontinuities in an image. Significant transitions in an image are called as edges.Edge detection is the first phase of image recognition. Edge is useful because it marks the boundaries and divides of plane, object or appearance from other places things.An edge consists of pixels with the intensity variations of gray tones which are different from their neighbor pixels.Shape information of an image is enclosed in edges. So as the first step in image recognition we try to find edges of an image

Types of edges

- Horizontal edges
- Vertical Edges
- Diagonal Edges

There’s two approaches for edge detection one is gradient based and second is Laplacian based.

Gradient based is using the first order derivative of the image.The first order derivatives are very sensitive to noise and produce thick edges.

**First order derivatives**

1. Roberts filtering: diagonal edge gradients, susceptible to fluctations. Gives no information about edge orientation and works best with binary images. 2. Prewitt filter: The Prewitt operator is a discrete differentiation operator which functions similar to the Sobel operator, by computing the gradient for the image intensity function. Makes use of the maximum directional gradient. As compared to Sobel, the Prewitt masks are simpler to implement but are very sensitive to noise. 3. Sobel filter: Detects edges are where the gradient magnitude is high.This makes the Sobel edge detector more sensitive to diagonal edge than horizontal and vertical edges. Sobel and Prewitt methods are very effectively providing good edge maps. 4. Frei-Chen method: Frei and Chen have adapted the Sobel’s model and proposed a pair of isotropic operator which makes K = SQRT(2) . This makes the gradient for horizontal, vertical, and diagonal edges the same at the edge center. The isotropic smoothed weighting operator proposed by Frei and Chen can easily pick up subtle edge detail and produce thinner edge lines, but it also increase the possibility of erroneously detect noise as real edge points. 5.Kirsch compass kernel: Is a non-linear edge detector that finds the maximum edge strength in a few predetermined directions. Kirsch edge operators have been proposed for image segmentation of mammographic images. 6. Robinson compass filtering: Similar to the Kirsch masks, with mask coefficients of 0, 1, and 2. Kirsch and Robinson methods require more time for calculation and their results are not better than the ones produced by Sobel and Prewitt methods. 7. Nevatia / Babu: detects edges in various degree increments

In the laplacian method images using second order derivatives.which identifies significant spatial change, an edge is detected. 2nd Order Derivative operators are more sophisticated methods towards automatized edge detection, however, still very noise-sensitive.

So that’s on edge detection.Thank you