Welcome back. Very often we going to concentrate the enhancement of an image at its edges. We want to leave the rest of the image unchanged, but only make the edges look sharper. A sharpened image typically conveys more information, more details to the human viewer. Therefore, such class of enhancement techniques is referred to as sharpening techniques. This is a topic of this segment in which we'll describe a number of such sharpening techniques. We will start with unsharp masking or high boost filtering. The idea is very straight forward and has its roots in analog photography. A blurred version of the image is formed, the abstract mask. Which when subtracted from the original image would provide the high frequency information of the image. If this information, typically, amplified is added to the original image, a sharpened image results. Of course, any high pass filter can extract such high frequency information from an image. An example of such a high pass filter is the laplacian. We'll talk about the laplacian with more detail in Week 11, when we talk about segmentation. We show, also, the results in which, varying sharpening techniques are combined. So, let us proceed with this very visual topic. We'll discuss next the use of spatial filters towards sharpening an image, which results in an enhanced image. This technique has been used for many years by the printing and publishing industry to sharpen images. So given an original image here or original signal, we blur it, and this blurred version is the unsharp version of the signal. Subtracting it from the original image gives rise to the unsharp mask. Then this unsharp mask is added to the original image, resulting in the sharpened signal. As described in the previous slide, in the block diagram of the previous slide. If x is the original image, I blur it and I find what I denote here as the low frequency part of the image. I subtract it from the original and this gives rise to the mask, the unsharp mask. The the next step is to add the unsharp mask it's multiplied here by coefficient a. So it's multiplied a added to the original image and this is the sharp image. If I write the original image as simply the sum of the low frequency part of it, plus the high frequency component of the image. Then the previous equation looks like this. So with unsharp masking, I keep the low frequencies, but the high frequencies are multiplied. The booster multiplied by one plus a and actually a is greater that one this is failed to as high boost filtering. If a is less than one then the mask is de-emphasized. So if we put this to practice here is an image of this quarter coins and this is the sharpened version of this image using this Unsharp masking method. A equals 1 was used for this particular example. Here is another example of the application of unsharp masking to sharpen an image. Here is the original image 216 by 308 pixels. Here's a blend version of it by 7 by 7 Gaussian. I subtract the blend version from the original one and obtain the unsharp mask shown here. The unsharp mask is added to the original with alpha equals 1. To give this sharpened image and with alpha equals 2 to give this sharpened image. So clearly, the edges are sharpened or the high frequencies in the image are boosted. The main idea behind these sharpening techniques is to add to the original image, high frequency information, edge information. We saw that with unsharp masking we found the unsharp mask, the high frequencies, by taking the difference between the original and the blurred version. Another way to obtain high frequency information is by finding the derivatives of the image. And specifically finding the second derivative of an image, which is referred to as the Laplacians of the image. We're not going to get into any details at this point. Since we'll start the gradients and laplacians the first and the second [INAUDIBLE] of an image when we talk about segmentation. So for the time being assuming that I can find the high frequencies through the second order of derivatives. I can then add them to the originally sharpened image that way. So here's an example of the moon's north pole. And this image is actually a mosiac, it was put together by 18 images taken by Galileo's imagining system back in 92. So if we look at this image, it looks kind of blurry and, again, would like to sharpen it. So if we find the secondary version of this image, the Laplacian, it looks like this. The Laplacian ranges from minus 255 to, to plus 255, assuming the original image is a eight-bit image. And what we see here is the positive value, since the values below 0 were clipped, were set to 0. Another way to show the Laplacian is by rescaling it, by scaling the minus 255 to 255 range, mapping it into 0 to 255 and then this is what we see. So clearly, the secondary contains the edge formation of the image. So, if I add the Laplacian to the original image, then I obtain this image. And if we compare this sharpened to the original, it should be clear that indeed the edges are enhanced the high frequencies are boosted. There are different ways as we'll see to compute the Laplacian, so if I compute it in a different way. By the way in this example the Laplacian goes computed as shown here. And more specifically this is more like a two-dimensional impulses points minus four in the middle and then one one here one here and one here. Here. So this Laplacian, Laplacian was used to compute this here and to compute this image. So if I compute the Laplacian a different way. And the different way is show here so the impulse response now is minus eight in the middle and then one at all. Of the locations in this three by three mask, then I obtain this result. Which by the way, is definitely sharper than the one we, I had with the first version of Laplacian. So this is the basic idea of sharpening. Take the original image here. At the high frequency information as conveyed here by the Laplacian here. And we have these beautiful results down here where you can see, considerably more detail. When it comes to edges of this image of the moon. We see here a combination of some of the sharpening and enhancement techniques that we have covered so far. So let's consider this whole body bone scan shown here. By looking at this it looks rather blurry. So based on what we've learned, we can find that Laplacian, the second order delivered of this image. Then if we add the Laplacian to the original image we started with, we get the sharpened image, as shown here. We can also take the first order derivative. It's called Sobel gradient. One of the ways to implement the first order derivative, and again, we'll cover these in more detail when we talk about segmentation. Now, I can take the Sobel, the first order derivative we just saw and smooth it out so it's averaged with a five by five filter. Then I take the product of the sharpened image that I had obtained by adding the Laplacian with this smooth Sobel gradient. So this gives me a mask, the, there product. And then I can add this mask to the original image and the obtain this sharpened image. And finally, I can use a power law transformation to further enhance the appearance of this image. So we do have values versions of enhancement right? This is an enhanced version of this and this is a sharpened version of the original and so is this one a sharpened version of the original. So this also illustrate the fact that I mention multiple times that I want to talk about image enhancement. There is not just one specific objective that will give us the optimal way to enhance an image, but instead I have a set of tools in my bag. But I can utilize them appropriately and they can try different tools. And at the end, I can choose the one process [UNKNOWN] that is most suitable for my own purposes.