Another common task in image processing is image sharpening. A simple way we can accomplish this is by simply adding more of the high frequency components back into the image.
            We can get the high frequency portions by simply subtracting the blurred image from the original image. This will give us the high frequency components of the image which we can add back with an enhancement factor to "sharpen" the image.
            Combining these operations into one filter gives us the unsharp mask filter. The process is outlined below for two example images:
            
                
                     
                    Image Sharpening Process
                 
             
            
                
                     
                    Costco Sharpening Process
                 
             
            Here are some results from testing this filter on several blurry images.
            
                
                     
                    Original Image
                 
                
                     
                    Sharpened Image
                 
             
            
                
                     
                    Blurry Costco
                 
                
                     
                    Sharpened Costco
                 
             
            
                
                     
                    Blurry Concert Image
                 
                
                     
                    Sharpened Concert Image
                 
             
            
                
                     
                    Blurry IVE Concert Image
                 
                
                     
                    Sharpened IVE Concert Image
                 
             
            
                
                     
                    (Not so Blurry) Bird Picture
                 
                
                     
                    Sharpened Bird Picture
                 
             
            From these examples, we can see that the unsharp mask filter does a good job of enhancing some of the higher frequency components. It does particularly good with the lines in building structures.
            However, it is far from perfect as an unblurring filter since it is only able to enhance the edges that are already present in the image. It is not able to recover any lost details from the original image.
            For fun, this is what happens when we apply the unsharp mask filter to a blurred and re-sharpened image:
            
                
                     
                    Oski
                 
                
                     
                    Sharpened Oski
                 
             
            This image was already decently sharp. I then attempted to blur it and re-sharpen it. The result is an image of oski with even sharper edges than the original.
        
            In this section, we will be creating hybrid images by combining the low frequency components of one image with the high frequency components of another image.
            Since human's perceive low frequency much better than high frequency, up close, we will see mostly the image with low-pass components. However, when viewed from afar, we can see the elements of the high-pass filtered image.
            Similar to before, we can get the low-pass components by blurring the image with a Gaussian filter. We can get the high-pass components by subtracting the low-pass filtered image from the original image. We then can average the two filtered images to produce our hybrid image.
            We can control the amount of high frequency components in the image by adjusting the sigma of the Gaussian filter. The higher the sigma, the more high frequency components we will have in the image. This is also the same for the low frequency components.
            Before doing this, in order for the image to hybridize properly, we first aligned the two images by matching up two points and resizing them to the same dimensions.
            
                
                     
                    Nutmeg the Cat
                 
                
                     
                    Derek the Human
                 
                
                     
                    Hybrid Image
                 
             
            We can visualize the frequency response of these images by taking the Fourier Transform of the images and plotting the magnitude of the Fourier Transform.
            As we can see in these plots of the magnitude of the Fourier Transform, we only keep the low frequency portions of image 1 and the high frequency portions of image 2 to create the hybrid image.
            
                
                     
                    Hybrid Image Fourier Transform (for Miles-Monkey Hybrid)
                 
             
            Here are some other examples of hybrid images:
            
                
                     
                    Miles (my roomate)
                 
                
                     
                    Monkey
                 
                
                     
                    Miles-Monkey Hybrid Image
                 
             
            
                
                     
                    Dom (old roomate)
                 
                
                     
                    Wizard Monkey
                 
                
                     
                    Dom-Wizard Hybrid Image
                 
             
            This last image did not turn out great. I believe this was mostly because the shapes and color schemes of the two images were a little bit too off.
            It ended up only really looking like one image with a slight ghost of the other image.