title: How to add specific amount of gaussian or salt & pepper noise using matlab function?
body: <p>This question could be very silly for others, but for me it is very difficult.</p>
  
  <p>Hello, I am a beginner in <strong>MATLAB</strong>, I am recently reading a paper where we have to add noise in an image in following manner.</p>
  
  <p>Gaussian Noise => <strong>sigma</strong> = 10</p>
  
  <p>Salt &amp; Pepper Noise => <strong>p</strong> = 20% <strong>sp</strong></p>
  
  <p>I know about <strong>MATLAB</strong> functions for adding noise, we use <code>imnoise()</code> function for it.</p>
  
  <pre><code>noise_image = imnoise(input_image, 'salt &amp; pepper', gaus_val)
  </code></pre>
  
  <p>will add salt &amp; pepper noise and </p>
  
  <pre><code>noise_image = imnoise(input_image, 'gaussian', 0 , salt_pepper_val);
  </code></pre>
  
  <p>will add ZERO-MEAN Gaussian noise of variance <code>salt_pepper_val</code>.</p>
  
  <p><strong>Now my question is that using imnoise() function how can I add following amount of noise. In other words for what value of gaus_val and salt_pepper_val, I will get gaussian noise of amount  sigma = 10%, 20%,..... and salt and pepper noise of amount 20%, 30%...............</strong></p>
  
  <p>Gaussian Noise => <strong>sigma</strong> = 10</p>
  
  <p>Salt &amp; Pepper Noise => <strong>p</strong> = 20% <strong>sp</strong></p>