Introduction: Reduce Motion Blur Using the GIMP

Picture of Reduce Motion Blur Using the GIMP

This Instructable helps you reduce the effects of soft motion blur you get because of camera shake. This is an experimental method developed by me, so please try out and leave comments, preferably with images.

As is evident from the quality of the photograph I hereby present, I am not a Pro. Heck. I don't even come close to my 5th grade cousin.

But I am OK with my favourite photo editor GIMP. So I tried developing a technique similar to the Unsharp Mask filter. All out of trial and error, so I don't guaranty anything. I have noticed it only reduces soft motion blur. So take a backup of the images you try this on. You have been warned.

( I found that the steps apply much better to the following images :



So here goes nothing.

Select your camera shake affected photograph and move on to the next step.

Step 1: Measure the Blur.

Picture of Measure the Blur.

Find a suitable item/part of your image where you can 'Measure' your motion blur. That is, the angle and length. For the uninitiated, GIMP has a Measure tool. Find it. It usually looks like a divider/compass from the geometry box.

Step 2: Triplicate the Layer.

Picture of Triplicate the Layer.

We will need the top 2 to create a sort of difference between an even more blurred version of the image (next step) and the original. Then we remove this difference from the original to get a some-what better image.

Don't ask me exactly how I came up with this. It was a bit of looking in the code of "unsharp mask" filter and a lot of trial and error.

Step 3: Add Motion Blur.

Picture of Add Motion Blur.

Yes. We add motion blur. If you have a slow enough computer, or large enough image on which you have run "unsharp mask" filter, you might have noticed "Blurring" before "Masking". Yes. What we do here is somewhat the same. Instead of blurring equally on all directions, we do a motion blur. Because we want to remove the motion blur.

For people who did not catch the above, it is simple : We fight motion blur with more motion blur, kind of like fighting fire with fire. Now on to what we do in this step.

In step 1, we measured the motion blur. Use this to fill the parameters for filters>blur>motion blur. Make sure you do this for the top layer. You may have to add or subtract a multiple of 90 to create the right motion blur.

Experimenting is a nice productive time pass. Do it.

Step 4: Switch Top Layer Mode to Grain Extract.

Picture of Switch Top Layer Mode to Grain Extract.

Make sure you have selected the top layer in the layers dialog, and change it's mode to grain extract. Don't panic at the result. All is fine.

Step 5: Merge the Top 2 Layers.

Picture of Merge the Top 2 Layers.

Merge the top layer with the 2nd layer. Use the steps in the image to achieve it.

Step 6: "Grain Merge" the Resultant Layer.

Picture of "Grain Merge" the Resultant Layer.

Set the layer blending mode of the resultant top layer to "Grain merge".
Play with Colors>Levels and the opacity of the layer to your liking. After each unblurring, if more is left, repeat. The resulting image is a bit sharper than the original.

The effect depends on different qualities of blurring, both during the shoot and step 3.

Your mileage may vary. Inputs are very much welcome.


anthonyisageek (author)2012-05-29

I've found that adjusting the red and cyan (blue and green composite) channels separately with opposite motion blur angles renders a better image, much like a reverse anaglyph. You can do this in GIMP by going to the channels dialog, right-click the red channel, then click "Channel to Selection". Copy the selection and paste as a new layer. Duplicate it and add motion blur with an angle of -90 (270) to 90 degrees (right semi-circle), depending on the angle of incidence. Do the same thing as you would with the Grain modes. Now do the same with the Cyan channel. Select the red channel and invert it. Copy and paste as a new layer, then duplicate. This time, when you add motion blur, set the angle opposite of the red channel 90 to 270 degrees (left semi-circle). I suspect this won't matter so much with a vertically blurred image.

kamathln (author)anthonyisageek2014-11-20

That means your lens is not good (or you are abusing the zoom), and what you are seeing is "Chromatic Abberration" . Are you clicking an object in the shadow with the background being bighter sky?

aharper1 (author)2016-11-13

This is awesome! It would make a great script also

Randolph Quest (author)2016-05-15

Hi Kamathin

I'd be grateful for any practical suggestion you may have for how I could improve a particular image (described below).

The image is a TIFF file (1053 x 1373 pixels) that was produced (several years ago by a relative, not by me) by scanning a very old photograph. The defect that I would like to eliminate is that the image actually comprises two distinct identical images, which are displaced diagonally by about 5 pixels (as measured by me using the GIMP measurement tool).

To me, the two images do not appear to result from continuous motion of the photographic apparatus (whether the camera or the enlarger). My guess is that the two images resulted from jolting of the photographic enlarger during the exposure of the print.

I have GIMP in Ubuntu on my computer. Nevertheless, I am not familiar with advanced photo editing software like GIMP or Photoshop. I have done some playing around with Photoshop when I had a Windows machine. However, I can follow specific instructions (though not instructions that skip steps, or assume familiarity with photo editing software and jargon, etc).

Thank you.

richruss69 (author)2012-04-29

this is awsome! i've only tried it out on one image and i think i got the angle a little off but the is some reduction still. however the color did wierd things. i will have to play with it some more!

kamathln (author)richruss692015-10-14

Thanks :)

pymousse made it! (author)2015-10-14

Your tutorial was really very successful for me... I just tweaked it a bit by duplicating the final layer (this gives for me a better result but with some visible artifacts... but this was not a concern for me).

kamathln (author)pymousse2015-10-14

Great to see the instructable put to real world use , and see the results :) The "artifacts" that you mention must be that you get "double vision" one at the beginning of the shake and one at the end. I have noticed this right from the time I posted on many images. I have tried various tricks to eliminate it with little success. The easiest were bright objects on black backgrounds. But this is unfortunately not such a photograph.

About This Instructable




More by kamathln:The GIMP: 2 Layer Dialogs trickReduce motion blur using The GIMPMaking Images seamless horizontally or vertically only (for "The GIMP") .
Add instructable to: