colour_hdri.image_stack_to_HDRI#

colour_hdri.image_stack_to_HDRI(image_stack: ImageStack, weighting_function: Callable = weighting_function_Debevec1997, camera_response_functions: ArrayLike | None = None) NDArrayFloat[source]#

Generate a HDRI from given image stack.

Parameters:
  • image_stack (ImageStack) – Stack of single channel or multichannel floating point images. The stack is assumed to be representing linear values except if camera_response_functions argument is provided.

  • weighting_function (Callable) – Weighting function \(w\).

  • camera_response_functions (ArrayLike | None) – Camera response functions \(g(z)\) of the imaging system / camera if the stack is representing non-linear values.

Returns:

HDRI.

Return type:

numpy.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 encoding the images in a wider RGB colourspace. This definition avoids NaNs creation by ensuring that all values are greater or equal to current floating point format epsilon. In practical applications such as HDRI merging with photographic material there should never be a pixel with a value exactly equal to zero. Ideally, the process should not be presented by any negative photometric quantity even though RGB colourspace encodings allows to do so.

References

[BADC11a]