# Image Edge Detection Operators in Digital Image Processing

**Edges** are significant local changes of intensity in a digital image. An edge can be defined as a set of connected pixels that forms a boundary between two disjoint regions. There are three types of edges:

- Horizontal edges
- Vertical edges
- Diagonal edges

**Edge Detection** is a method of segmenting an image into regions of discontinuity. It is a widely used technique in digital image processing like

- pattern recognition
- image morphology
- feature extraction

Edge detection allows users to observe the features of an image for a significant change in the gray level. This texture indicating the end of one region in the image and the beginning of another. It reduces the amount of data in an image and preserves the structural properties of an image.

**Edge Detection Operators** are of two types:

**Gradient –**based operator which computes first-order derivations in a digital image like, Sobel operator, Prewitt operator, Robert operator**Gaussian –**based operator which computes second-order derivations in a digital image like, Canny edge detector, Laplacian of Gaussian

**Sobel Operator:** It is a discrete differentiation operator. It computes the gradient approximation of image intensity function for image edge detection. At the pixels of an image, the Sobel operator produces either the normal to a vector or the corresponding gradient vector. It uses two 3 x 3 kernels or masks which are convolved with the input image to calculate the vertical and horizontal derivative approximations respectively –

**Advantages:**

- Simple and time efficient computation
- Very easy at searching for smooth edges

**Limitations:**

- Diagonal direction points are not preserved always
- Highly sensitive to noise
- Not very accurate in edge detection
- Detect with thick and rough edges does not give appropriate results

**Prewitt Operator:** This operator is almost similar to the sobel operator. It also detects vertical and horizontal edges of an image. It is one of the best ways to detect the orientation and magnitude of an image. It uses the kernels or masks –

**Advantages:**

- Good performance on detecting vertical and horizontal edges
- Best operator to detect the orientation of an image

**Limitations:**

- The magnitude of coefficient is fixed and cannot be changed
- Diagonal direction points are not preserved always

**Robert Operator:** This gradient-based operator computes the sum of squares of the differences between diagonally adjacent pixels in an image through discrete differentiation. Then the gradient approximation is made. It uses the following 2 x 2 kernels or masks –

**Advantages:**

- Detection of edges and orientation are very easy
- Diagonal direction points are preserved

**Limitations:**

- Very sensitive to noise
- Not very accurate in edge detection

**Marr-Hildreth Operator or Laplacian of Gaussian (LoG):** It is a gaussian-based operator which uses the Laplacian to take the second derivative of an image. This really works well when the transition of the grey level seems to be abrupt. It works on the zero-crossing method i.e when the second-order derivative crosses zero, then that particular location corresponds to a maximum level. It is called an edge location. Here the Gaussian operator reduces the noise and the Laplacian operator detects the sharp edges.

The Gaussian function is defined by the formula:

Where

is the standard deviation.

And the LoG operator is computed from

**Advantages:**

- Easy to detect edges and their various orientations
- There is fixed characteristics in all directions

**Limitations:**

- Very sensitive to noise
- The localization error may be severe at curved edges
- It generates noisy responses that do not correspond to edges, so-called “false edges”

**Canny Operator:** It is a gaussian-based operator in detecting edges. This operator is not susceptible to noise. It extracts image features without affecting or altering the feature. Canny edge detector have advanced algorithm derived from the previous work of Laplacian of Gaussian operator. It is widely used an optimal edge detection technique. It detects edges based on three criteria:

- Low error rate
- Edge points must be accurately localized
- There should be just one single edge response

**Advantages:**

- It has good localization
- It extract image features without altering the features
- Less Sensitive to noise

**Limitations:**

- There is false zero crossing
- Complex computation and time consuming

**Some Real-world Applications of Image Edge Detection:**

- medical imaging, study of anatomical structure
- locate an object in satellite images
- automatic traffic controlling systems
- face recognition, and fingerprint recognition

## Recommended Posts:

- Image Processing in Python (Scaling, Rotating, Shifting and Edge Detection)
- Image Processing in Java | Set 9 ( Face Detection )
- Matlab | Edge Detection of an image without using in-built function
- Image Processing in Java | Set 6 (Colored image to Sepia image conversion)
- Image Processing in Java | Set 4 (Colored image to Negative image conversion)
- Image Processing in Java | Set 3 (Colored image to greyscale image conversion)
- MATLAB - Image Edge Detection using Prewitt Operator from Scratch
- MATLAB - Image Edge Detection using Robert Operator from Scratch
- MATLAB - Image Edge Detection using Sobel Operator from Scratch
- Digital Image Processing Chain
- Redundancy in Digital Image Processing
- Digital Image Processing Basics
- Python Program to detect the edges of an image using OpenCV | Sobel edge detection method
- Difference between Opening and Closing in Digital Image Processing
- Image Processing in Java | Set 5 (Colored to Red Green Blue Image Conversion)

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.