GAUSSIAN_NOISE_CVIP
gaussian_noise_cvip() - adds Gaussian noise to an image.
Contents
SYNTAX
[ outImage ] = gaussian_noise_cvip( inImage, gaussianArgs, noiseImgSize)
Input Parameters include :
- inImage - 1-band input image of MxN size or 3-band input image of MxNx3 size.The input image can be of uint8 or uint16 or double class.
- gaussianArgs - Gaussian noise arguments. gaussianArgs(1): mean value (default 0) gaussianArgs(2): variance value (default 100)
- noiseImgSize - Size of Gaussian noise image. Only needed when noise is added to black image. noiseImgSize(1): height (default 256) noiseImgSize(2): width (default 256)
Output Parameter includes :
- outImage - Gaussian noise added image or Gaussian noise image
DESCRIPTION
The function adds Gaussian noise to an image or creates Gaussian noise image. If the user wants to add Gaussian noise to an image, the user needs to pass only two input arguments (input image and gaussian noise arguments). The gaussian noise argument consists of mean and variance values. If the user wants to create a Gaussian noise image only, the input image is to be passed as an empty matrix [ ]. The size of the noise image can be defined by passing additional parameters. The default size of the image is 256*256.
REFERENCE
1.Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
% Read image I = imread('butterfly.tif'); % default parameters O1 = gaussian_noise_cvip(I); noise_parameter = [20 100]; %mean = 20, variance =100 % Gamma noise added image O2 = gaussian_noise_cvip(I,noise_parameter); % Gamma noise image image_size = [300 400]; %height = 300, width = 400 O3 = gaussian_noise_cvip([],noise_parameter, image_size); % Display input image figure;imshow(I);title('Input Image'); % Display output image figure;imshow(remap_cvip(O1,[]));title('Gamma noise added image '); figure;imshow(remap_cvip(O2,[]));title('Gamma noise added image with default parameters'); figure;imshow(remap_cvip(O3,[]));title('Gamma noise added image with user defined parameters');
CREDITS
Author: Norsang Lama, April 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website