Remove Camera Shake

Steady hand.

Removing camera shake is a powerful tool for restoring images where the camera has moved during the exposure. This can often be caused by holding a camera by hand, but camera shake can also happen when a picture is taken from a moving vehicle. In Astra Image the Remove Camera Shake function will try to restore the image by automatically detecting the camera shake pattern, or blur kernel, and then remove the shake using deconvolution.

The camera shake detection algorithm uses edges in the image to determine the blur kernel. This means that you need to select an area of the image that has as many edges as possible, preferably edges at many angles.

The picture above is a bad example of edge selection. There are few edges visible, so it is difficult to determine the blur kernel.

This picture is a good example of edge selection. There are many sharp edges, and the edges are going in different directions. This has a much greater chance of success for calculating the blur kernel.

Blur Kernel This tab has the settings used to calculate the blur kernel from the area of the image displayed in the Preview window.

Blur kernel size This sets the absolute size of the blur kernel and should be as small as possible. For example, if you examine your photo and find that there is a motion blur of about 5 pixels, you could set the blur kernel size to 9 or 11. This would be enough to encompass the entire blur kernel, and it would leave a small margin around the edges.

Blur analysis regularization Often, noise becomes a problem when calculating the blur kernel. To help with this, you can set the blur analysis regularization. Low values have less noise suppression but produce a sharpen, more detailed blur kernel. Higher values suppress more noise, but the blur kernel will have less detail and be less sharp. Usually a good balance can be found between noise suppression and blur kernel sharpness with values from 300 – 1000.

Blur analysis iterations noise is our enemy once again. In order to fight noise and get a sharp blur kernel, we can increase the number of iterations that the core analysis algorithm performs. Usually 3 to 5 iterations are enough, but more may be required on challenging images.

Blur kernel preprocessing This option sets how the input image is processed before analysis takes place. The input image can be denoised and the contrast enhanced to increase the chances of a good blur kernel detection. Usually, settings of Low or Standard are enough and they will lightly denoise and enhance the input image. In challenging images, however, the High setting can be used.

Do aggressive blur kernel analysis When all else fails, you can check this box. It will pull out all the stops in preprocessing and blur kernel analysis to try and get a good result. But this option should only be used as a last resort, as it is too aggressive for most images.

Update the blur kernel while calculating When checked, this will display the blur kernel at the end of each iteration on the Current Blur Kernel tab.

Convert to linear pixel values Some file formats (like JPEG) apply a gamma curve to a photo. This can be undesirable when doing deconvolution as it can reduce the effectiveness of the deconvolution and blur kernel detection algorithms. When this setting is checked, the image is converted back to linear pixel values by undoing the effect of the gamma curve.

Analyze Blur Click this button to start the blur kernel detection function.

Deconvolution This tab has the setting for deconvolution. The deconvolution functions use the calculated blur kernel.

Deconvolution method You can select between Faster and Higher quality. Usually, the Faster option is sufficient.

Deconvolution noise and artefact suppression This option sets how much noise and artefact suppression will be applied. Usually, setting this to High is a good idea, but if you have a very clean, noise-free image with a sharp blur kernel, you can set this to Low or Medium.

Deconvolution sharpness This option tries to restore details lost by the noise and artefact suppression. This should usually be set to High.

Deconvolution smoothing If a photo has a lot of noise or artefacts, smoothing can be used to make the image look more appealing. Lower values produce less smoothing. This should be set as low as possible. Please note that this option can only be used with the Faster deconvolution method.

Suppress ringing artefacts When checked, this option will apply a post-processing step to try and remove ringing artefacts around strong edges.

Convert to linear pixel values Some file formats (like JPEG) apply a gamma curve to a photo. This can be undesirable when doing deconvolution as it can reduce the effectiveness of the deconvolution and blur kernel detection algorithms. When this setting is checked, the image is converted back to linear pixel values by undoing the effect of the gamma curve.

Current Blur Kernel This tab shows you the calculated blur kernel. It should look sharp and have as little noise as possible.

Manually Editing the Blur Kernel Below the blur kernel display, there are buttons to load, save, copy and paste the current blur kernel. This allows you to do manual editing of the blur kernel, or to import a hand-drawn blur kernel.

For example, the blur kernel below looks quite good – it is sharp and well defined. But there is some residual noise in the background. To remove this, we can use an external paint program.

Click the Copy button and paste the blur kernel into a paint program. It can be helpful to invert the colors so that the noise is easier to see (don't forget to invert again when you have finished).

After editing, copy the blur kernel in the paint program and click the Paste button in Astra Image.

By removing noise, the result of the deconvolution will often be much better.

In addition, you can also use the Save and Load buttons to save and load a blur kernel from disk.

Last updated