GAMMA_NOISE_CVIP
gamma_noise_cvip() - adds Gamma noise to an image.
Contents
SYNTAX
outImage = gamma_noise_cvip( inImage, gammaArgs, 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.
- gammaArgs - Gamma noise arguments. gammaArgs(1): alpha value (default 2) gammaArgs(2): variance value (default 100)
- noiseImgSize - Size of Gamma 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 - Gamma noise added image or Gamma noise image
DESCRIPTION
The function adds Gamma noise to an image or creates Gamma noise image. If user wants to add Gamma noise to an image, the user needs to pass only two input arguments (input image and Gamma noise argument). The Gamma noise argument consists of alpha and variance values. If user wants to create a Gamma noise image only, the input image argument has to be passed as an empty matrix [ ]. The size of the noise image can be defined by passing additional parameter (size of noise image). 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 = gamma_noise_cvip(I); noise_parameter = [20 100]; %alpha = 20, variance =100 % Gamma noise added image O2 = gamma_noise_cvip(I,noise_parameter); % Gamma noise image image_size = [300 400]; %height = 300, width = 400 O3 = gamma_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