Giter Site home page Giter Site logo

ricardovogel / tonemap-and-bloom Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 102.91 MB

This technique extends on existing tone mapping algorithms by making the brightest areas emit a glow. To do this, the bloom shader effect is used. We take the image with the lowest exposure value, and perform convolution on it with a given kernel.

License: MIT License

Python 77.65% kvlang 22.35%
bloom tone-mapping

tonemap-and-bloom's Introduction

Tonemap and Bloom

Tonemap and Bloom is an algorithm created for the research project of the Computer Science and Engineering bachelor of Delft University of Technology.

When you want to display an image with a higher dynamic range than your camera can pick up, you can take multiple pictures with different exposure rates, and merge them using a process called tone mapping. This creates a picture with detail in both bright and dark areas. Tonemap and Bloom was created for the research project of the bacherlor, and extends on existing tone mapping algorithms by making the brightest areas emit a glow. To do this, we use the bloom shader effect, an effect often used in video games. We take the image with the lowest exposure value, and perform convolution on it with a given kernel. For a realistic effect, this kernel should be similar to a camera’s response to a single point of light.

There are also several parameters. The smoothing factor changes how bright a pixel needs to be to emit a significant glow. The bloom intensity changes the intensity of the glow when it's merged with the tone mapped image. Finally, the kernel size determines the spread of the glow.

A full overview of the technique can be seen below: Overview image of the process Original images by Kevin McCoy, kernel by Unreal Engine

The paper can be found here.

Code Structure

The code consists of four parts. tonemap_and_bloom.py is the general algorithm, along with some helpful tools such as image saving and loading. main.py runs the algorithm and saves it in the img folder. application.py is a Kivy user interface to run the algorithm more easily. The last image created is stored in img/app_output. Finally, time.py output the average runtime for an image.

Requirements

  • Python 3
  • OpenCV2
  • NumPy
  • SciPy
  • Kivy (for running the application only)

tonemap-and-bloom's People

Contributors

ricardovogel avatar

Watchers

 avatar

Forkers

jaedukseo

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.