32-Effect of Sigma on Gaussian Noise

So I just snuck one past you there. Okay. We said the magnitude of the noise is determined by sigma. Fine that's great. In fact, we could just look at the noise function itself, right. So don't add in the original image. Just look at the noise function. But we can't do that just yet until we make a decision, and the reason is this. What's the mean of the noise. 

So that means some of the values are going to be what? Positive, some of the values are going to be negative. How do we look at a picture that has positives and negatives in it? Right? If we said zero was black and one was white, or zero was black and 255 was white, so how do we do this? Well, the mistake is saying that zero is black. Okay? We're going to say, look, we'll map some minimum value to black, some maximum value to white, and we'll distribute them in between. In particular, zero should be what color? What color do you think zero should be, between black and white? What comes between black and white in the universe? Grey. All right? So let's suppose we have values that you know, go from minus 20 to plus 20 in our image, well we can make minus 20 black, plus 20 white and, and zero would be grey. And if we did that, it would look like this.

So here we're showing you images of Gaussian noise. Just the noise, So if there's a very small sigma, so remember sigma's up here, so a very small sigma. All right? You can barely see that this is anything but a constant grey. As we let sigma get bigger and bigger and bigger, you start to see more and more speckle. And that's the effect of sigma so it's just a noise function being added to an image. 

Quiz -Effect of Sigma on Gaussian Noise

So likes these quizzes, so here we have a quiz, and if you can't do this with three eyes closed, I don't know. It says, look, there are four different sigmas here, you know, what are those sigmas? Well, they're 2, 8, 32, and 64. Can you label 'em for me?

Quiz Solution -Effect of Sigma on Gaussian Noise

Two, small, okay, right there I see something I can't. Oh, by the way, the reason we're using all these slides, my handwriting is awful, so you're going to be very happy that we have all these slides. So that's two. Let's see, I guess the eight is over here. The 32, yeah, I guess the one on the top left is less, and 64 is there. Okay, I passed my quiz.

The correct answer is that it only increases the spread. Note that we are only multiplying the values. The number of values, or their counts, are unchanged. Multiplying a set of normally distributed numbers by a value effectively changes the standard deviation of the distribution they were drawn from. Now why is this important to know? Remember that randn generates values with standard deviation one, whereas the images we've been using are of type uint8 and range from zero to 255. What do you think happens when you add the results of randn directly to an image? Let's find out. Time to use a new image. If you look carefully you'll be able to see three moons and a shadow. Now we generate our noise image and add it to the original. Not really very different, is it? This is because the values that randn generated are really small compared to the image. Let's scale up the values. Now you can see the noise affecting the image. How about we increase this further? And more. Now it's really hard to see the moons, isn't it? 

Last modified: Saturday, 30 December 2023, 5:14 PM