colour_hdri.generation.radiance Module

HDRI / Radiance Image Generation

Defines HDRI / radiance image generation objects:

References

[1]Banterle, F., Artusi, A., Debattista, K., & Chalmers, A. (2011). 2.1.1 Generating HDR Content by Combining Multiple Exposures. Advanced High Dynamic Range Imaging. A K Peters/CRC Press. ISBN:978-1568817194
colour_hdri.generation.radiance.image_stack_to_radiance_image(image_stack, weighting_function=<function weighting_function_Debevec1997>, weighting_average=False, camera_response_functions=None)[source]

Generates a HDRI / radiance image from given image stack.

Parameters:
  • image_stack (ImageStack) – Stack of single channel or multi-channel floating point images. The stack is assumed to be representing linear values except if camera_response_functions argument is provided.
  • weighting_function (callable, optional) – Weighting function \(w\).
  • weighting_average (bool, optional) – Enables weighting function \(w\) computation on channels average instead of on a per channel basis.
  • camera_response_functions (array_like, optional) – Camera response functions \(g(z)\) of the imaging system / camera if the stack is representing non linear values.
Returns:

Radiance image.

Return type:

ndarray

Warning

If the image stack contains images with negative or equal to zero values, unpredictable results may occur and NaNs might be generated. It is thus recommended to encode the images in a wider RGB colourspace or clamp negative values.