Part 2 -Remove noise in an image using Gaussian Blur
In this article, we will discuss and understand the importance of noise reduction and how it is going to be useful for our lane detection algorithm for self-driving cars.
Imagine what will happen in the future, when we have self-driving cars on the road. These cars must communicate with each other (5G will play a crucial role in this) and also understand and process the image of the road on which they are running. Undoubtedly, processing a color image is going to take longer and we can’t risk this as these cars must take decisions every fraction of a second about the road, surroundings, weather and many other known and unknown events which may arise anytime on the road.
So, we need to minimize the time taken on each task and it is going to be better if we minimize our processing time to the best possible lowest number. This is the reason that, we have converted the color image(3 channels) to grayscale (1 channel) , as then we have pixels values b/w 0–255 only. Next step after having a grayscale image is to reduce the noise in it.
Noise Reduction
We must detect as many edges in an image as possible, but we must also remove any noise. Noise is nothing , but false edge detections in the image which are not edges in reality . They must be taken into account and removed , else they will effect the edge detection process. So, to remove any noise, we must smoothen the image.
Smoothening is done with the help of Gaussian Blur. To do so, image convolution technique is applied with a Gaussian Kernel (3x3, 5x5, 7x7 etc…). The kernel size depends on the expected blurring effect. Basically, the smallest the kernel, the less visible is the blur. In our example, we will use a 5 by 5 Gaussian kernel and it is effective for most of the images.
After applying the Gaussian Blur, we get the following result :
So, hereby I conclude the article on Gaussian Blur and Noise reduction. In the next article, we will learn about Canny Edge Detection.