This question already has an answer here:

As far as I understand,

Suppose, we have a 2D image of pixel resolution 200 x 300. That means, the image has 60000 pixels in it.

Now, we would generate $n$ random values and add those values to $n$ number of random pixels.

Now, my question is, what would make those $n$ values to look like Gaussian Random Values?

What would be the logic that I should use?


marked as duplicate by MBaz, jojek, Matt L., Peter K. Mar 18 '16 at 12:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You can find Gaussian noise generators in many image processing softwares.At each pixel, you add a realization from such random noise generators. You can look for more details at How to Generate White Gaussian Noise.

On StackExchange, additional sources of information:

  • $\begingroup$ Is my understanding of Gaussian noise correct? $\endgroup$ – user18425 Mar 17 '16 at 22:25
  • $\begingroup$ It seems so, if $n$ is the number of pixels. $\endgroup$ – Laurent Duval Mar 18 '16 at 8:14
  • $\begingroup$ Image has 60000 pixels. Of which, I would add noise to $n$ pixels. That's why I am generating the same number of random-values. Am I right? $\endgroup$ – user18425 Mar 18 '16 at 9:23
  • $\begingroup$ Sounds correct. Generally the noise is zero-average, so yoou will need to choose the level of the noise, with a factor affecting the random numbers generated, for instance, by a unit-variance Gaussian. $\endgroup$ – Laurent Duval Mar 18 '16 at 9:46