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.
Types of Edges:
- Step Edge
- Ramp Edge
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?
- 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.
- 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.
- In case of extracting the important features in the edges then also edge detection is used. (For e.g corners, lines and curves)
- 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..
The three steps we follow for edge detection are:
- Noise reduction
- Edge enhancement
- 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.
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.
- Robert’s edge detector
- Prewitt edge detector
- Sobel edge detector
- 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
- Low error rate
- Edge points should be well localized
- 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
- image smoothing
- Gradient operation
- Non maxima suppression
- Hypothesis thresholding
- Connectivity analysis
Let’s implement practically using python OpenCv
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