Understanding Image Blurring & How to Blur/Deblur with Deep Learning
Blurring filters are featured by most existing photo editors – they allow to smooth out contours in the defined area and are usually used for retouching purposes. Basically, it is a focus-based filter that reduces the contrast of nearby pixels around a certain area, providing the effect of blur.
Alternatively to blurring, you can also find a deblurring feature in some editors, which is intended to help eliminate blurry defects caused by a shaky camera, prolonged exposition or frame motion. This feature allows us to ultimately fix photo blur by, as opposed to blurring, increasing the contrast of objects and sharpening color transitions.
But let’s see how to deblur a photo all in all and get into more detail about how to deblur a photo with an advanced, AI-based method – deep learning.
Blurring is quite frequently used for drawing up scenes in video games. The thing is, a field of view of the human eye isn’t limited by 180 degrees, which is a standard for most modern oblong monitors. In turn, this spoils the overall realism of an image. That’s why video game developers came up with using the blur effect in the screen edges, which smoothes the general picture out for human perception. Deblurring / Blurring is quite frequently used for drawing up scenes in video games. The thing is, a field of view of the human eye isn’t limited by 180 degrees, which is a standard for most modern oblong monitors. In turn, this spoils the overall realism of an image. That’s why video game developers came up with using the blur effect in the screen edges, which smoothes the general picture out for human perception.
Another reason to employ blurring is regular photo editing. Blurring is closely related to macro photography. It ultimately helps to eradicate sharp color transitions (for instance, when it comes to unwanted skin features – acne, wrinkles, pigments, etc.).
Types of Blurring
We can highlight two major types of blurring – defocusing and motion blur. Let’s take a closer look at each.
This technique helps to achieve the effect of a camera not getting a sufficient focus. The whole effect is reached by smearing brighter parts of the image. The intensity of a defocusing filter in most editors can be regulated for the whole image at once (Horizontal Blur) or for bright areas separately.
All in all, defocusing reduces sharpness and contrast volumes – transitions become smoother while tiny picture elements practically merge with the general background.
This is a very common filter for correcting portrait-oriented photos.
Motion blur is a special blurring effect for motion video transitions. You know when you sit in a car and try to take a photo of some object in the window and it comes out all smeary? That’s what motion blur is all about.
The effect is pretty natural in essence and can be even seen with a naked eye. Despite the fact that the human sight works very differently to the camera, researchers still indicate similarities – a minimum frame rate for a human to see the motion smoothness is 12-18 frames per second. We also change focus about 3 times per second. This means that the maximum number of frames per second we can make out is no more than 80. Try to wave your hand to and fro rapidly before your eyes to see where we’re getting at.
But what about another, alternative question – what is blurring and how to deblur a picture?
In fact, there are several math-based approaches to turning blurry parts distinct.
The first and most common one is when an initially blurred image is perceived by software as a mathematical notion – a linear process resulting in the lowered pixel contrast and sharpness. We, basically, get a convolution of two functions: one defines the original image while another one adds noises on top of it.
Eventually, two equations are defined, in which variables responsible for blurring take part (in particular, an impulse or some dissipation linear function invariant to the shift acts as an indeterminate). To work with such equations, direct and inverse Fourier transformation is often employed.
The second, more advanced way to clear up blurry photos is based on deep learning within a Deep Convolutional Network (DCN). This smart network architecture gets its name due to basic convolution operations where each image fragment is being multiplied by a convolution matrix (cell) element by element and the result is summarized and put down in the identical position of the processed image. This AI-based method is different from the previous method by the number of equations, i.e., layers, which allows us to achieve much higher sharpness and contrast volumes.
How to Deblur with Deep Learning
Initially, DCN receives an image and starts analyzing it to detect and define and visual artifacts. The network doesn’t use any standardized image quality identifiers at that. It employs a more complicated computing process that brings more preciseness and overall efficiency in the end.
This is a type of self-educating principle – when new convolution filters are being autonomously created based on the “educating” source image fragments. Thus, parameters that result from comparing a source file and the same source file reduced by N times in size are taken to build the first convolution layer. The following layers learn from the previous ones and so on.
Experts also frequently use the dropout feature additionally for enhanced processing results – a method of sub-network training where random single neurons are being dropped out.
Fixing Photo Blur
Don’t know how to enhance a blurry photo? Fortunately, you have all the required software tools available to do that. For one thing, you can use Photoshop or GIMP which is, however, not the simplest or most affordable solution for regular users. It feels better when your images are not blurred so you can go ahead and edit them in a higher quality.
As an alternative, you can try out an advanced yet absolutely freeware solution with the built-in photo blur fixer – Image Upscaler. The software is based on the enhanced type of DCN – Generative Adversarial Network (GAN) – a proprietary machine learning algorithm built on the combination of two neural networks – one generates samples, another distinguishes correct elements.
Try Image Upscaler right now – all you need to do is upload a source image to the server, click a button, and get your hi-res processed picture in less than a minute.