Preprocessing the input image
This section introduces some of the most common techniques that we can apply for preprocessing images in the context of object segmentation/detection. The preprocessing is the first change we make to a new image before we start working and extracting the information we require from it. Normally, in the preprocessing step, we try to minimize the image noise, light conditions, or image deformation due to a camera lens. These steps minimize errors while detecting objects or segments in our image.
Noise removal
If we don't remove the noise, we can detect more objects than we expect because noise is normallyrepresented as small points in the image and can be segmented as an object. The sensor and scanner circuit normally produces this noise. This variation of brightness or color can be represented in different types, such as Gaussian noise, spike noise, and shot noise.
There are different techniques that can be used to remove the noise. Here, we are going to use a smooth...