Noise in an image: Digital images are prone to various types of noise that makes the quality of the images worst. Image noise is random variation of brightness or color information in the captured image. Noise is basically the degradation in image signal caused by external sources such as camera. Images containing multiplicative noise have the characteristic that the brighter the area the noisier it. But mostly it is additive. There are several ways to introduce noise into an image, depending on how the image is created. For example:
- If the image is scanned from a photograph made on film, the film grain can be the source of noise. Noise can also be the result of damage to the film, or be introduced by the scanner fluctuations itself.
- If the image is acquired directly in digital format, the mechanism for gathering the data (such as a CCD detector) can introduce noise.
- Electronic transmission of digital image data can also introduce noise.
To simulate the effects of some of the problems listed above, the toolbox provides the in-built imnoise function in MATLAB, which you can use to add various types of noise to an image.
Various kind of noise that can be introduced by MATLAB inbuilt function are:
- Salt and Pepper noise: Salt and pepper noise refers to a wide variety of processes that result in the image degradation. In Salt and Pepper noise only few pixels are noisy, but they are very noisy. The effect is similar to sprinkling white and black dots on the image.
X = imnoise(Image, 'salt & pepper', percentage_distortion)
Above in-built function adds “salt and pepper” noise to an image named Image, where percentage_distortion is the noise density. The default for percentage_distortion is 0.05.
- Gaussian noise: Gaussian Noise is a statistical noise having a probability density function equal to normal distribution, also known as Gaussian Distribution. It is also called electronic noise because it arises in amplifiers or detectors.
X = imnoise(Image, 'gaussian', percentage_distortion)
- Speckle noise: Speckle is a noise that inherently exists in an image and degrades its quality. Speckle noise can be generated by multiplying random pixel values with different pixels of an image.
X = imnoise(Image, 'speckle', percentage_distortion)
Below is the Matlab code for adding noise in an image:
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.