An implementation of the Exposure Fusion paper through a fast, lightweight Python class, inspired
by pytorch
modules.
Report Bug
·
Request Feature
Table of Contents
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`.
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()
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
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.
- 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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Dario Loi - dloi.projects@gmail.com
Project Link: https://github.com/dario-loi/exposure-fusion
- arpesenti the author of an old implementation of the algorithm under the GPL-2 license.
- Stanford Unversity for the original paper.