Building Computer Vision Projects with OpenCV 4 and C++
by David Millan Escriva, Prateek Joshi, Vinicius G. Mendonca, Roy Shilkrot
Noise removal
If we don't remove the noise, we can detect more objects than we expect because noise is normally represented 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 operation, but depending on the type of noise, some are better than others. A median filter is normally used for removing salt-and-pepper noise; for example, consider the following image:
The preceding image is the original input with salt-and-pepper noise. If we ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access