Back
Gigapixel AI
Sharpen AI
DeNoise AI
Video Enhance AI

How we use AI to sharpen your photos

AUTHOR:
Albert Yang
Published:
February 28, 2019
Time to read:
7 Minutes

Building AI to improve photo sharpness

As photographers, we want to shoot sharp photos, period!  Our goal of getting sharp images is one of the major factors in the thousands of dollars we spend on good cameras and lenses with features like optical stabilization.  We’ve also invested time in learning techniques, tips, and tools for shooting sharp photos, like lugging around a sturdy but heavy tripod, setting proper shutter speed, learning about depths of field, proper focus, and so on and so forth.

Even with the best equipment and expert techniques, we sometimes still end up with images that could be sharper. That is why almost every photo editing software provides a “Sharpen” feature. For example, Photoshop has no less than 6 different “sharpen” filters on my last count.

While we hope that getting a sharp picture will not be a problem when using a sharpening software, we know that’s not always the case. Unless your image has a very small blur, existing software “Sharpen” functions do not work well.

Now let’s go into a technical explanation about how a given software sharpens your images. Up until now, the photo sharpening tools in software typically use one of two type methods: image filtering or deconvolution.

The first type of sharpening is Image Filtering. The basic idea is simple: blurry images lack spatial high-frequency components.  Therefore, applying a filter that boosts high-frequency will make the photo look sharper. Generally, this technique will works for photos with just a little blur.  Since this method is fast, most software sharpen tools use this method. In Photoshop, “Sharpen”, “Sharpen More”, “Sharpen Edge” and “Unsharp Mask” all use this type.

The Image Filtering method works well if you just need to sharpen the photo slightly, but if your photo has a bigger blur, it does not work well.  The problem is that when boosting high-frequency photo components, the tool will also also boost noise and artifacts in photos. Over using a sharpening filter that uses this method will create images with artifacts such as “fat edges”, “halo”, and noise amplification.

The second type of sharpening method is called Deconvolution.   Imagine you are looking through a camera at a star at night.  You will see, instead of a single bright point, a small blurry disk.  This disk represents the so-called point spread function. This function summarizes the blurring process as a mathematical operation called Convolution. Thus, removing blur is modeled mathematically as Deconvolution. This type of method was first developed primarily for astronomy and later for spy satellites. At its creation, normal photographers did not have access to this tech due to the computer speed and the stability of the algorithms.

The situation changed around 2010. There was a break-through in the deconvolution algorithm to make it feasible to use on a PC.  We were the first company to bring this tech to photographers when we released a Photoshop plugin, Topaz InFocus. This method works much better for small and moderate blurs.  It also works, to a certain degree, on blur due to camera shake or from a moving object. To this day, Topaz InFocus is still be considered to be one of the best sharpening tools on the market. Later, Photoshop also added “Smart Sharpen” and “Shake Reduction” based on deconvolution.

In addition to being much slower than the image filtering method, deconvolution needs to know the point spread function, which is very hard to estimate. It is also very sensitive to image noise and jpeg compression.  Therefore, it fails most of the time for large and complex blurs, such as one in Figure 2 (a). Since Hollywood’s crime dramas had (incorrectly) shown that they could usually turn very blurry photos into sharp ones to catch the bad guys, Topaz InFocus fell short of some of our customers expectations.  I took this quite personally and have been on the lookout for a silver-bullet ever since.

For eight years we did not find one…. not until recently. I felt we might finally have a shot to redeem ourselves thanks to the rapid development of Deep Learning in Artificial Intelligence (AI).

AI approaches the problem very differently. Instead of studying the mathematical model of the blur process and how to solve the inverse problem, we train an Artificial Neural Network with millions of blur-sharp image pairs.  The neural network will eventually “remember” what the sharp image should look like if it sees a blurry image. After months of training, the neural network could produce a sharper when image given an image it had not seen before. Figure 1 (c) and Figure 2 (c) are examples from our latest product, Topaz Sharpen AI.   Here is another example to sharpen an out-of-focus photo.

Looking at Figures 1, 2, and 3 more carefully, you will find that Topaz Sharpen AI seems be able to create images with very fine details rather than simply sharpening the edges.  This is what makes Topaz Sharpen AI truly unique – it actually synthesizes convincing details even if the blurred image does not have any through the power of AI.

There is a reason that nobody has released an deep-learning sharpen AI tool for photographers so far.  It is quite an engineering challenge. For example, the neural network requires extremely high computation that makes regular PC pretty much unusable.  I am so proud that our team was able to overcome many challenges to bring Topaz Sharpen AI to you, from Dr. Acharjee’s  ingenious neural network architecture, to Image Processing Lead Bowen Wang’s efficient GPU neural engine development, to our whole product team’s application design.

You can try it yourself by downloading the a free trial of Sharpen AI.

Does AI finally make blurry images a thing of the past? Not at all.  The example images I used are pretty much the best case scenarios to impress you with the AI.  You will find it is still a hit or miss situation sometimes. However, it is a huge step forward and best of all, we are just at the beginning of the Artificial Intelligence (AI) revolution.  You can be assured that there will be many more amazing things to come.

Tags
No items found.
AUTHOR:
Albert Yang