GIMP Fake Depth-of-field Plugin

by Alexander Thomas (aka Dr. Lex)

What is it?

Example

This is a simple Python-fu plugin for GIMP (a.k.a. the Gnu Image Manipulation Program) that can mimic the effect of ‘depth-of-field’ in photography. Normally this effect is achieved by using a wide-aperture lens, which will only capture objects sharply around the distance it is focused at, and everything else will be blurred the more, the farther away it is from this focal distance.

This plugin mimics the same effect by progressively blurring zones outside of a user-selected area with a blur radius that increases as the zones move away from the selection. In other words, to use this plugin: select the areas that need to remain sharp (that are ‘in focus’) and then invoke the plugin from the FiltersBlur menu.

The initial blur, as well as the number of iterations and the step size (radius) for each iteration can be configured. The defaults should be OK for an image roughly the size of a 720p video frame. For larger images, you should probably increase the first 3 parameters.

Download

Download the plugin (Python script)

To install, place it in the ‘plug-ins’ folder of your GIMP user directory. Where this is, depends on your operation system.

Version History

2019/09/30: first public release

Disclaimer

This plugin is released under the Simplified BSD License. This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In other words, use at your own risk.