MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

# What is the mathematics behind the imnoise function in matlab?

Asked by Ashwani on 2 Jan 2013

Actually I want to know that how imnoise add noise to a signal .which method it follows.

## Products

No products are associated with this question.

Answer by Walter Roberson on 2 Jan 2013

It depends which kind of noise. http://www.mathworks.com/help/images/ref/imnoise.html

Most of the supported types are essentially randn() * scale + mean

Ashwani on 2 Jan 2013

Thanks for reply. If I am using J = imnoise(I,'gaussian',m,v),( m = 0,v=1). Then how it add noise to 'I'.

Jurgen on 2 Jan 2013

I would guess newpixel = originalpixel + randn(1). For every pixel in image, in other words J = I + randn(size(I)). See 'help randn' on how to get different means/variance.

Answer by Image Analyst on 2 Jan 2013

This is all spelled out in the help for the different types of noise you can choose from. It assumes the image is normalized 0-1 and then adds the noise you selected, then it unnormalizes the image to get back to the original intensity range. Was there one particular type of noise that you did not understand the definition of?