Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How can we include noise to an image in MATLAB?

user-image
Question added by Deleted user
Date Posted: 2016/04/05
abdulrahman Hussein
by abdulrahman Hussein , Electrical Security Engineer , Consolidated Gulf Company (CGC)

you can use imnoise function 

Deleted user
by Deleted user

J = imnoise(I,'gaussian',M,V)

There is a different type of command in the Matlab, noise may be anything which disturbs the intensity of noise. If there is a white pixel in the black image then that would be noise for that image.

the command is-

rand(image);

imnoise();

 

In the Image processing, We have add the noise in the form of  "Salt and Pepper" with the added noise ratio.

Ayesha Amjad
by Ayesha Amjad , Visiting Lecturer , University of the Punjab

for adding noise in an image, we have a built in command 'imnoise'. There are varous type of noises; such as poisson noise,salt and pepper noise, gaussian noise. by specifying the type of noise in built in command,required noise can be added in an image.

command will be 

i=imread('name of the image.image type');

n=imnoise(i,'poisson');

subplot(2,2,1)

imshow(i)

subplot(2,2,2)

imshow(n)

 

a = imread('nvm.jpg'); b = imnoise(a,'salt & pepper',0.02); figure, imshow(a) figure, imshow(b)

Rafael G. Campos
by Rafael G. Campos , Full Professor of Mathematics and Physics , Universidad Michoacana de San Nicolas de Hidalgo

You may use the function rand().

noise can be included to an image by generating random numbers from gaussian distribution with 0 mean and some variance our interest and adding these numbers to the original values of the image.

Sheraz Mehfooz
by Sheraz Mehfooz , Student , International Islamic University

Simply apply a Gussian blurr,Erode or set intensity to the pixels.

Mohamad Hommaid
by Mohamad Hommaid , متدرب في قسم الهندسة الطبية , Makassed General Hospital

clc

clear

close all

i=imread('C:\\Users\\mhammad\\Desktop\\images\\trees.jpg');

i=rgb2gray(i);

i=double(i)/255;

 

n=imnoise(i,'salt & pepper');

subplot(211)

imshow(i)

subplot(212)

imshow(n)

Mussab Zia
by Mussab Zia , Plant Engineer , Shell

I= double(imread('circles.png')); I= imnoise(I,'salt & pepper',0.02);

Iis a 256-by-256 matrix of 8-bit unsigned integer values.

The model provided with this example already includes this code in file>Model Properties>Model Properties>InitFcn, and executes it prior to simulation.

More Questions Like This