Skip to content

GIMP plugin that add the ability to perform a lens blur, also known as Bokeh blur

License

Notifications You must be signed in to change notification settings

Davide-sd/GIMP-lens-blur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a GIMP plugin that add the ability to perform a Lens Blur (also know as Bokeh Blur).

This code is based on Mike Pound's implementation created for this Computerphile video. I changed the code to use OpenCV for performance gains.

Many thanks to Niklas Liebig for the alpha channel correction! :)

This plugin has been tested on Ubuntu 18.04 and GIMP 2.10.8.

Requirements

To use this plugin you have to install the following dependencies in the Python environment used by GIMP:

pip install numpy opencv-python

Install

  1. Open the terminal, move to the GIMP plug-ins folder (usually ~/.config/GIMP/2.10/plug-ins).

  2. git clone https://github.com/Davide-sd/GIMP-lens-blur.git

  3. cd GIMP-lens-blur

  4. Change permission to allow execution: chmod +x GIMP-lens-blur.py

Usage

Lens Blur UI

  1. Open GIMP and load the image you'd like to edit.

  2. In the layer palette, select the layer you would like to apply the lens blur.

  3. Go to Filters/Blur/Lens Blur...

  4. Adjust the parameters:

    • Radius: The amount of blur to add.
    • Components: The more components, the better the final result, but the slower the computation. Even with 2 components the result is very nice.
    • Gamma: tweak the exposure to highlight bright spots.
  5. Click Ok.

TODO

  1. Is it possible to implement a preview window?

About

GIMP plugin that add the ability to perform a lens blur, also known as Bokeh blur

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages