A sample based bokeh simulator that uses inverse tonemapping and weighted (by luminance) sample averaging to produce a bokeh effect. Works on LDR(Low Dynamic Range) Images!
inspiration from https://www.youtube.com/watch?v=v9x_50czf-4
python3 bokeh.py img.png out.png
python3 bokeh_opencv.py images/img1.png images/kernel32.png images/out_cv_normal_128.png
- Python 3
- Numpy
- cv2
- matplotlib
- numba
Gholamreza Dar Jun 2023 when I should be doing other things!