RAYLEIGH_NOISE_CVIP
rayleigh_noise_cvip() - adds Rayleigh noise to an image.
Contents
SYNTAX
outImage = rayleigh_noise_cvip(inImage, var, 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.
- var - variance of Rayleigh noise. (default 100)
- noiseImgSize - Size of Rayleigh 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 - Rayleigh noise added image or Rayleigh noise image
DESCRIPTION
The function adds Rayleigh noise to an image or creates Rayleigh noise image. If user wants to add Rayleigh noise to the image, the user needs to pass only two input arguments (input image, and noise variance). If user wants to create a Rayleigh noise image only, pass input image as an empty matrix [ ]. The size of the noise image can be defined by passing additional parameter (size of noise image). If not passed, default size of 256*256 will be selected.
REFERENCE
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
%Read image I = imread('butterfly.tif'); % Calling function with default parameters O1 = rayleigh_noise_cvip(I); % Calling function with user defined parameters noise_parameter = 200; % Rayleigh noise added image O2 = rayleigh_noise_cvip(I,noise_parameter); % Rayleigh noise image image_size = [300 400]; %height = 300, width = 400 O3 = rayleigh_noise_cvip([],noise_parameter, image_size); % Display input image figure;imshow(I);title('Input image'); % Display output image figure;imshow(hist_stretch_cvip(O1,0,1,0,0));title('Output image with default parameters') figure;imshow(hist_stretch_cvip(O2,0,1,0,0));title(' Output image with Noise added Image'); figure;imshow(hist_stretch_cvip(O3,0,1,0,0));title(' Output image with Rayleigh noise only');
CREDITS
Author: Norsang Lama, April 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website