Giter Site home page Giter Site logo

xyq1113723547 / hdr-imaging Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ssarcandy/hdr-imaging

0.0 0.0 0.0 64.82 MB

An implementation of "Paul E. Debevec, Jitendra Malik, Recovering High Dynamic Range Radiance Maps from Photographs, SIGGRAPH 1997."

Home Page: https://ssarcandy.tw/2017/04/16/High-Dynamic-Range-Imaging/

Python 2.84% Jupyter Notebook 96.62% Batchfile 0.54%

hdr-imaging's Introduction

HDR imaging

Requirement

  • python3 (or higher)
  • opencv 3.0 (or higher)

You will need to install some package using pip3:

  • numpy
  • matplotlib

Usage

$ python HDR-playground.py <input img dir> <output .hdr name>

# for example
$ python ./HDR-playground.py taipei taipei.hdr

I also provide an jupyter version(HDR-playground.ipynb), it’s function is same as HDR-playground.py. jupyter is really convenient for develop python program!

Input format

The input dir should have:

  • Some .png images
  • A image_list.txt, file should contain:
    • filename
    • exposure
    • 1/shutter_speed

This is an example for image_list.txt:

# Filename   exposure 1/shutter_speed
DSC_0058.png 32        0.03125
DSC_0059.png 16        0.0625
DSC_0060.png  8        0.125
DSC_0061.png  4        0.25
DSC_0062.png  2        0.5
DSC_0063.png  1        1
DSC_0064.png  0.5      2
DSC_0065.png  0.25     4
DSC_0066.png  0.125    8
DSC_0067.png  0.0625  16

Output

The program will output:

  • A .hdr image
  • A reconstruct RGB response curve plot
  • A pseudo-color radiance map(with log value)

for sample output, you can see HDR-playground.ipynb as reference.

Tonemap

I use tmo for tonemapping, it implement 24 algorithms.
I write a script tonemap.bat for auto-run all 24 algorithms.

$ tonemap.bat <filename without extension>

Make sure all tm_*.exe is in your system PATH

Environment

I test my code in Window10, but it should work fine in macOS/Linux(exclude tonemapping reference program need run in Windows)

hdr-imaging's People

Contributors

ssarcandy avatar

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.