Skip to main content

Utility functions for perfming basic operations on HDR images, including merging and deghosting

Project description

HDRutils-pip

Some utility functions to generate HDR images from a sequence of exposure time or gain modulated images.

Installation

To download HDRUtils, either fork this github repo or simply use Pypi via pip:

pip install HDRutils

If you forked this repository, install the dependencies using pip:

pip install -r requirements.txt

Additional dependency

You will need the FreeImage plugin for reading and writing OpenEXR images:

imageio_download_bin freeimage

Usage

Just import HDRutils and call the required functions

Reading and writing

Simple wrapper functions for imageio's imread and imwrite are provided to set appropriate flags for HDR data. You can even call imread on RAW file formats:

import HDRutils

raw_file = 'example_raw.arw'
img_RGB = HDRutils.imread(raw_file)

hdr_file = 'example.exr'
img = HDRutils.imread(raw_file)

HDRutils.imwrite('rgb.png', img_RGB)
HDRutils.imwrite('output_filename.exr', img)

Merge input images

The rawpy wrapper is used to read RAW images. Noise-aware merging is performed using the Poisson-noise optimal estimator. The generated HDR image is linearly related to the scene radiance

files = ['file1.dng', 'file2.dng', 'file3.dng']		# RAW input files
HDR_img = HDRutils.merge(files)
HDRutils.imwrite('merged.exr', HDR_img)

The default function processes each image individually using libraw and then merges the RGB images. This behaviour can be overriden to merge RAW bayer image by setting the flag demosaic_first=False.

Deghosting

TODO

Citation

If you find this package useful, please cite

@inproceedings{hanji2020noise,
  title={Noise-Aware Merging of High Dynamic Range Image Stacks Without Camera Calibration},
  author={Param Hanji and Fangcheng Zhong and Rafal K. Mantiuk},
  year={2020},
  booktitle={Computer Vision - {ECCV} 2020 Workshops - Glasgow, UK, August 23-28, 2020, Proceedings, Part {III}},
  url={https://doi.org/10.1007/978-3-030-67070-2\_23}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

HDRutils-0.2.tar.gz (8.2 kB view details)

Uploaded Source

File details

Details for the file HDRutils-0.2.tar.gz.

File metadata

  • Download URL: HDRutils-0.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3

File hashes

Hashes for HDRutils-0.2.tar.gz
Algorithm Hash digest
SHA256 4282d5ca22f621cbebf7779632a2503ea37e46e9396396087a5400c8e68095f3
MD5 9cf3e66e75741b5ae3286a8d1c138281
BLAKE2b-256 f5ca448116ed43edd2e558c301aa95d81cd2e458e02766089c4083089b2b0703

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page