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 | None[source]#

Generate a HDRI 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) – 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 or clamp negative values.

References

[BADC11a]