In: Electrical Engineering
Filtering/edge detection, gradients, Laplacians, Sobel, Canny, etc. briefly what do each technique
(basic information). What do we mean for segmentation? Any example?
Which technique of the above provides better edge detection? Why?
Definition of edges:-
- Edges are significant local changes of intensity in an
image.
- Edges typically occur on the boundary between two different
regions in an image.
Sobel Operator:-
Sobel is one of the most commonly used edge detectors. It is based on convolving the image with a small, separable, and integer valued filter in the horizontal and vertical direction and is therefore relatively inexpensive in terms of computations. The Sobel edge enhancement filter has the advantage of providing differentiating (which gives the edge response) and smoothing (which reduces noise) concurrently.
Laplacian Operator
Laplacian is somewhat different from the methods we have discussed so far. Unlike the Sobel and Prewitt’s edge detectors, the Laplacian edge detector uses only one kernel. It calculates second order derivatives in a single pass. Two commonly used small kernels are:
Because these masks are approximating a second derivative measurement on the image, they are very sensitive to noise. To correct this, the image is often Gaussian smoothed before applying the Laplacian filter.
We can also convolve a gaussian mask with the Laplacian mask and apply it to the image in one pass.
Canny Operator
The canny edge detector is probably the most commonly used and most effective method, it can have it’s own tutorial because it’s much more complex edge detecting method than the ones described above. However, I will try to make it short and easy to understand.
First, two steps are very straight forward, note that in the second step we are also computing the orientation of gradients “theta = arctan(Gy / Gx)” Gy and Gx are gradient x direction and y direction respectively.
Segmentation :-
Segmentation is the finding of different regions based normally on the pixel characteristics however edge detection refers to the findings of contour (outlines) of any shape, object in the image to separate it from the background or other objects.
Let’s understand image segmentation using a simple example. Consider the below image:
There’s only one object here – a dog. We can build a straightforward cat-dog classifier model and predict that there’s a dog in the given image. But what if we have both a cat and a dog in a single image?
We can train a multi-label classifier, in that instance. Now, there’s another caveat – we won’t know the location of either animal/object in the image.
That’s where image localization comes into the picture (no pun intended!). It helps us to identify the location of a single object in the given image. In case we have multiple objects present, we then rely on the concept of object detection (OD). We can predict the location along with the class for each object using OD.
Before detecting the objects and even before classifying the image, we need to understand what the image consists of. Enter – Image Segmentation.
The Canny filter is widely used, because of the good results it provides. What exactly are you looking for? Edge detection also depends on the images you have.
1. Original
2.Sobel.
3.Laplacian
4. Canny