Skip to content

dario-loi/exposure-fusion

Repository files navigation

Contributors Forks Stargazers Issues MIT License Python

Exposure Fusion

An implementation of the Exposure Fusion paper through a fast, lightweight Python class, inspired by pytorch modules.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Sample Image

The project was created as classwork for the course Computer Graphics at Sapienza University of Rome, it is licensed under the MIT license and is free to use for any purpose.

It improves on the Stanford paper Exposure Fusion, by adding an alignment pipeline that can improve outputs when the input sequence's photos are offset from eachother.

The repository contains both a class exposure_fusion.py and a TKinter GUI gui.py that can use the class in a user friendly way`.

(back to top)

Getting Started

To use the class it is enough to copy the exposure_fusion.py file into your project and import it.

from exposure_fusion import ExposureFusion

fuser = ExposureFusion()

Prerequisites

The class requires a set of common scientific and computer vision packages, such as:

  • numpy
  • opencv

For the rest of the files in the repository, one might also need:

  • tkinter
  • matplotlib
  • seaborn

(back to top)

Usage

As shown in the Getting Started section, the class is easy to set up. Each method has an associated docstring that goes into its intended purpose and usage, however, one does not need to concern himself with the implementation details, since the class implements the __call__ dunder method, that correctly performs the Exposure Fusion pipeline on the images

Example:

from exposure_fusion import ExposureFusion

fuser = ExposureFusion(perform_alignment = False)

# Load images

images = [cv2.imread(path) for path in image_paths]

HDR = fuser(images)

The fusion pipeline's parameters are set by the class's __init__ method, and can be changed by the user. The default parameters are what gave us the best result during our tests.

(back to top)

Roadmap

  • Fix pyramid depth overexposure.

Currently the application is fully satisfying to us, however, I still accept feature suggestions, and will be happy to implement them.

Moreover, if the need presents itself, we might want to consider:

  • Export the class as a pip module.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Dario Loi - dloi.projects@gmail.com

Project Link: https://github.com/dario-loi/exposure-fusion

(back to top)

Acknowledgments

(back to top)