Hello, in this segment we consider the noise smoothing problem. That is the case when the impulses points of the variance system is equal to the dimensional delta function. In this case if we said the frequency response of the varying filter equal to one and the expression of the winner restoration filter. The Wiener noise smoothing filter results. This does not become an enhancement problem however, since the Wiener smoothing filter was derived based on a modelling of the degradation and the optimization of a specific objective function. Therefore, under these conditions, it is an optimal noise smoothing filter. We also derive a specially adaptive version of the noise smoothing filter. Each pixel now in the image is processed differently, based on the special activity of the neighborhood it belongs to. So, let's proceed with a material of this segment. I can use the Wiener filter to perform noise smoothing. So, in this case the impulse response of the degradation system is a delta. A delta convolved with f will give me f, i, j here, so therefore the degradation model now is sigma plus noise. I observe an image, which equals the originally merge plus the noise that was added to that. So under the same assumptions as before, that is f and w are wide and stationary. F and w are correlated and they are both zero mean. I can obtain now the form of the Wiener noise smoothing filter. Since here, h i j is a delta function, we know from what we have learned before that the frequency response of the filter is equal to one. So substituting this in the expression we had for the Wiener restoration filter we obtain just the frequency response of the noise smoothing Wiener filter. So this exactly the point that was made earlier on when we talked about enhancement. We have again the signal plus noise problem here, and when we talked about enhancement, we'd argue that a low past type of filter would remove some of the noise. And then we would try different shapes of the filter and different extends of for a given shape, and visually evaluate the results and pick the one that would just be more suitable for our purposes. Instead here we have a specific objective which is the minimization of the mean squared error, mean squared estimation error. And this objective gives rise to this expression for the Wiener noise smoothing filter. Having a dual use the Weiner noise smoothing filter. Here's another interpretation of the Weiner restoration filter. We show again here the degradation model. We call g i j, the image at the output of the LSI degradation system, noise is then added to it, and we observe y which therefore is equal to g plus w. So y is the signal plus noise now model where the signal g is not the original signal but instead the blend signal. Now, we know that the power spectrum of g equals to this. This is one of the first expressions we showed there, standard expressions when we have random process at the input of an LSI system. Okay, now with that, here is the frequency response of the Wiener restoration filter that we saw a couple of times already. Clearly I can multiply this by one, so I multiple by H omega1 omega2 divided by H omega1 omega2. This is identity, well the exception of well H is zero, the frequency for which is zero, but we'll assume that's perfectly fine. And now I can combine this H complex conjugate with this H. And the product will give me the magnitude squared of H omega1, omega2. So then what I obtained I see here. Here that H magnitude squared times P of ff is P of gg, so that's the numerator and I can substitute in the denominator, so I have this expression now. Right? Again, I combined this H complex conjugate with this H, and with this P of ff and I got P of gg. And then this down here is also P of gg, omega1 omega2. So we see that I can think of a Wiener restoration filter as the product of two filters. The first filter is just smoothing the noise. Not with respect to the original signal but with respect to the blurred signal. So first, we take care of getting rid of the noise. And then, the noise free signal is inverse the convult here. I apply an inverse filter for the deconvolution. So this is an interpretation that justifies again first getting rid of the noise and then getting rid of the blur, but in a very specific way within the context of the Wiener restoration filter. Actually people introduced all kinds of modifications to this concept here, which of course, here is mathematically equivalent to doing the Wiener restoration filter. But I can alter the noise smoothing and the inverse filter and end up with combinations of of other filters. Let us look now at the derivation of a spatially adaptive Wiener noise smoothing filter. This is the degradation model, it's signal plus noise. The observed image y equals the original image f plus the noise w that has been added to it. We assume that the noise is zero mean and that it is y, therefore it's spectral density equals it's variance. So, as we have seen for this model, the frequency response of the Wiener filter is given by this expression, where I have already substituted the spectral density of the noise equal to sigma w squared. We are going to develop a filter that has this step shown here. So, the observed image y, from it the mean m of f will be subtracted, then the filter will develop the Wiener filter with impulse response r i j will be applied. The mid will be added back to the image and therefore the smoothed image is denoted by p i j. Maybe, motivated by the exact result we show that got into which the Weiner restoration filter is the concatenation of Weiner smoothing filter and then inverse filter. One can find in the literature a number of results where two restoration filters are combined in different ways. One such result is shown here. It's referred to as the geometric mean filter, and we see that is the combination of the generalized inverse filter and the Weiner restoration filter. So alpha equals, a half is the geometric mean of the two but alpha in general is between 0 into 1. For alpha equals 0 we have the Wiener filter for alpha equal 1 if we have the inverse filter, and of course any combination for the various values of alpha. In addition if you notice here there's a gamma parameter. Weighting this stabilizing term in the denominator of the Weiner filter. So this now starts feeling more like an enhancement problem, since these two parameters in this particular case, alpha and gamma need to be specified by the user based on the visual quality of the restored image. And again this is just one example of the many such examples one could find in the literature. We want to modify the Wiener noise smoothing filter so that it adapts to the local characteristics of the image. Towards this task we divide the image into stationary regions. And then for each region, we assume that the following model holds for the image. So, f i j is equal to the local mean plus the standard deviation multiplied by a noise term, and for this noise term, we assume that it's mean is equal to zero while its variance is equal to one. Empirical evidence suggests that it is a reasonable model for typical images and typical process, image processing applications. Now for each of these regions, I can write down the frequency response of the noise smoothing filter. P of f f based on this model is equal to sigma f squared. So, we see that the filter here is constant, does not depend on omega1, omega2. So, if I take this back to the time domain, the impulse response of the Weiner noise smoothing filter is equal to this. So, the constant gave rise to a delta in the special domain. Let's look now at the model we've been using towards this noise smoothing filter. So we take the input image, subtract the mean, process it through the filter, add back the mean to get the output. So the equation therefore is that P of i j equals i minus the mean convolved with the impulse response of the noise smoothing filter and adding back the mean. So if I substitute here for r i j equal to we have already found over here since I convolved with the delta. It means that the signal goes through and therefore, this is what I obtain. So, this the output of the noise smoothing filter for a specific stationary region. Now, if I shrink the region to the pixel. Then the local variance becomes a function of i j and so does the local mean, and this gives rise to the special adaptive Wiener noise smoothing filter which you will see in the next slide. So based on the analysis and the result we obtained in the previous slide. If each region, the image was divided into is shrunk down to a single pixel, then the local variance of the image becomes a function of i j, and so does the local mean. After rearranging terms, we find that the output of the noise smoothing filter at location i j is a convex combination of the input at the same location and the local mean of the image. So, this is the expression of the specially adaptive Wiener noise smoothing filter. It's a different filter in essence that is applied to each and every pixel in the image. So, let's look at some special cases of this filter. So first of all, if there is no noise added to the data, then the output image, it's simply equal to the input image, which makes perfect sense. The input image is noise free. Therefore, there is absolutely no need to do any filtering to the image. If I look at the edge ridges of the image, at those locations, then the local variance of the image is much greater than the variance of the noise. And if I take this into account and look at this equation. The first term here is approximately equal to one while the second coefficient is approximately equal to zero, and therefore the output of the filter is approximately equal to the input. And this also makes perfect sense based on the arguments I made at an earlier point that based on properties of the human visual system, the masking properties, noise is not visible at the edges. Therefore, noise goes through the filter at the edge location. This is not visible. And this also allows us to leave the edges unfiltered. So therefore we obtain sharp edges, and the noise is not visible, so this is a desirable result. Now if we look at the flat regions, then the local variance of the image is much smaller than the noise variance. And then if I look at the coefficient, the first one is approximately equal to zero. While the second one approximately equal to one, and therefore the output is a smoothed version of the input and the output that, that pixel location is equal to the local mean of the input. I want to comment now on computing some of these parameters here. Actually I, I called m of f the local mean of the input, and this is correct because the noise is zero mean, because of the modelling assumptions early on, and therefore this approximately holds true. Now, as far as finding the variance of the noise, if I first of all the, the model I've been using is that y equals f plus w. I omitted the i j here. And to do the fact that signal and noise aren't correlated. I do have that sigma y squared equals sigma f squared plus sigma w squared. So if I look at the flat region of the image then at that region sigma of f is. Where it's approximately equal to zero and therefore, what I measure if I loc, measure the local variance. It's approximately equal to the variance of the noise. So, this is one way to obtain an estimate of the variance of the noise and then if I look at any other region. I can obtain the variance of the image as the variance of the data minus the variance of the noise. So since I know the variance of the noise I have already calculate it. I measure this I can find this way the local variance of the image.