Git Product home page Git Product logo

bokeh_me's Introduction

bokeh.me

Make a bokeh effect on your images

Source image with lights Triange shaped kernel size 25 bokeh effect

Getting started

This program puts a bokeh effect on an image. User chooses the kernel picture and the image to process bokeh effect on. Image has three channels (RGB). Each channel goes through pixel overlaying. Kernel is a black and white picture, that overlays source image channel's pixels.

Script bokeh_me.py is a script to run. It takes 4 arguments (3 positional and 1 positional):

positional arguments:

  • image_path - the path of the image to process.
  • kernel_path - the path of the image to process.
  • kernel_side_size - the width (columns number) and length (rows number) of the kernel.

optional arguments:

  • --save_to_folder - set bokeh image save path.

How to run

To get your image with bokeh follow the steps below:

  1. Clone or download this repository.
  2. Go to repository in terminal
  3. In terminal run:
$ python3 bokeh_me.py <image_path> <kernel_path> <kernel_side_size>

For help run:

$ python3 bokeh_me.py -h
$ python3 bokeh_me.py -h
usage: bokeh_me.py [-h] [--save_to_folder SAVE_TO_FOLDER]
                   image_path kernel_path kernel_side_size

This program puts a bokeh effect on an image.User chooses the kernel picture
and the image to use bokeh effect on.Image has three channels (RGB). Each
channel goes through pixel overlaying.Kernel is a black and white picture,
that overlays source image channel's pixels.

positional arguments:
  image_path            The path of the image to process.
  kernel_path           The path of the image to process.
  kernel_side_size      The width (columns number) and length (rows number) of
                        the kernel.

optional arguments:
  -h, --help            show this help message and exit
  --save_to_folder SAVE_TO_FOLDER
                        Set bokeh image save path.

Examples

$ python3 bokeh_me.py blue_lights.jpg tri.tif 19 --save_to_folder D:\
Result:
2020-07-18 02:56:44,719 INFO Processing image...
2020-07-18 02:56:50,945 INFO Channel 1/3 processed.
2020-07-18 02:56:57,692 INFO Channel 2/3 processed.
2020-07-18 02:57:04,312 INFO Channel 3/3 processed.
2020-07-18 02:57:04,312 INFO Channels processed.
2020-07-18 02:57:04,327 INFO Image blue_lights_bokeh_tri_19.jpg saved to D:\

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.