Thursday, March 15, 2012

MATLAB for image and video processing DAY 01

r = randn(n) returns an n-by-n matrix containing pseudorandom values drawn from the standard normal distribution.
( ): used for indexing
[ ]: used to concatenate numbers, matrix, vectors
{ }: used to represent cell-array

%Read image and convert it into double
y=im2double(imread(image1.pgm'));

% Add the AWGN to the original image y with a zero mean and a standard deviation 'sigma'

       z = y + (sigma/255)*randn(size(y));


% Add the AWGN to the original image y with a mean of 25 and a standard deviation 'sigma'

       z = y + (25 + (sigma/255)*randn(size(y)));


No comments:

Post a Comment

Mounting USB drives in Windows Subsystem for Linux

Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...