- Notifications
You must be signed in to change notification settings - Fork2
GIMP plugin that add the ability to perform a lens blur, also known as Bokeh blur
License
Davide-sd/GIMP-lens-blur
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a GIMP plugin that add the ability to perform aLens Blur (also know asBokeh Blur).
This code is based onMike Pound's implementation created forthis Computerphile video. I changed the code to useOpenCV 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.
To use this plugin you have to install the following dependencies in the Python environment used by GIMP:
pip install numpy opencv-python
Open the terminal, move to the GIMP plug-ins folder (usually
~/.config/GIMP/2.10/plug-ins
).git clone https://github.com/Davide-sd/GIMP-lens-blur.git
cd GIMP-lens-blur
Change permission to allow execution:
chmod +x GIMP-lens-blur.py
Open GIMP and load the image you'd like to edit.
In the layer palette, select the layer you would like to apply the lens blur.
Go to
Filters/Blur/Lens Blur...
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.
Click
Ok
.
- Is it possible to implement a preview window?