Edge detection- CV

Before getting started with the standard definition lets understand with the edges definition. Then how can we define edges in technical terms?

What are edges?

Edges are nothing but the segment objects and in other words we can say information in the image. Edges is actually the analysis of the discontinues in the images. Usually edges are found or occur on the boundary of two edges.

Edge Detection in Opencv 4.0, A 15 Minutes Tutorial | by Dan Ringwald |  Sicara's blog | Medium

Types of Edges:

  1. Step Edge
  2. Roof
  3. Ramp Edge
  4. Ridge
Different types of edges a) Step Edge: The intensity of image abruptly... |  Download Scientific Diagram

Next, we will dive into the topic with the definition part.

What is Edge detection?

Edge detection, where brightness changes abruptly in the given image or loaded image. We can find the changing brightness through different methods like we can find the changing brightness by using derivatives. 

It is nothing but the process identifying the edges in an image which we further used as a fundamental in the following image analysis part. 

Goal of edge detection?

  1. Edge detection is a key technique where we immensely use the image segmentation part when we want to divide images in different parts or areas with respect to the different objects. Like if you want to extract the different objects from the image then this edge detection is mainly used. 
  2. In case of reducing the size of the image by removing the unnecessary things which are not giving more information then we can use edge detection here.
  3. In case of extracting the important features in the edges then also edge detection is used. (For e.g corners, lines and curves)
  4. When we are working on computer vision algorithms like image recognition and image comparison then we need edge detection.

Process of Edge Detection

When we talk about the process, the edge detection algorithm works on one of the two main important properties of intensity values. That is..

  1. Discontinuity
  2. Similarity

The three steps we follow for edge detection are:

  1. Noise reduction
  2. Edge enhancement
  3. Edge localization
1. Noise reduction

In this process we generally try to suppress the noise as much as possible and also without smoothing the edges.

Edge detection
2. Edge enhancement

In this process, we generally add some filter to the images which acts like strong at the edges and non edges it acts weekly. So, the edges may act like or identified as the local maxima in the output(filter’s output).  Basically using high pass filters is more preferable.

3. Edge Localization

After applying the filter over enhancement step we get local maxima. After getting the local maxima value we have to decide  which local maxima outputs are meaningful over the edges and also which are caused by noise.

Let’s check the different algorithms of edge detection.

  1. Robert’s edge detector
  2. Prewitt edge detector
  3. Sobel edge detector 
  4. Canny edge detector and etc..

We will see a canny edge detector algorithm explanation below..

Canny edge detector :

Canny edge detector is the one algorithm which gives the best output when compared with other algo. its algo is the most complex and also used in multi-stage algorithms  when we have to detect a wide range of edges in the image.

When we dive deep into this algorithm we will get the three main objectives to solve. They are

  1. Low error rate
  2. Edge points should be well localized
  3. Single edge point response

As I mentioned above, the canny algorithm is not like other edge detector algorithms and it is a multi-stage implemented algorithm. Some steps we should follow during the algorithmic part. They are

  1. image smoothing
  2. Gradient operation
  3. Non maxima suppression
  4. Hypothesis thresholding
  5. Connectivity analysis

Let’s implement practically using python OpenCv 

Conclusion

In this article, we have learnt some basic intro about edge detection and advantages. Hope this article gives you insight for your learning.

Thanks for reading!

Written By: Krishna Heroor

Reviewed By: Umamah

If you are Interested In Machine Learning You Can Check Machine Learning Internship Program
Also Check Other Technical And Non Technical Internship Programs