Bokeh is the Japanese word which means Blur. Bokeh tends to the region which we choose to out of focus. This effect makes the in-focus image so vibrant and clear to eyes which makes the photo looks more elegant. Now a days, This can be achieved easily with the help of DSLRs at the time of capturing but If we wish to achieve this later then we need to use photoshops or other photo editing software.
but Today I would like to share how to achieve Bokeh effect in Python
if you are intrested in the working behind the program then visit py2py
Libraies Used
import cv2
import numpy as np
import Tracker_HSV as tr
from PIL import Image
import os
- file_name : Tracker_HSV is in house made liberary which I use to select the colour ranges. It can be downloaded by pip:
pip install Tracker_HSV
For more information on this library Please visit: