colour_hdri.calibration.absolute_luminance Module¶
Absolute Luminance Calibration - Lagarde (2016)¶
Defines Lagarde (2016) panoramic images absolute Luminance calibration objects:
absolute_luminance_calibration_Lagarde2016()
upper_hemisphere_illuminance_Lagarde2016()
upper_hemisphere_illuminance_weights_Lagarde2016()
References
[1] | Lagarde, S., Lachambre, S., & Jover, C. (2016). An Artist-Friendly Workflow for Panoramic HDRI. Retrieved from http://blog.selfshadow.com/publications/s2016-shading-course/unity/s2016_pbs_unity_hdri_notes.pdf |
-
colour_hdri.calibration.absolute_luminance.
upper_hemisphere_illuminance_Lagarde2016
(RGB, colourspace=None)[source]¶ Computes upper hemisphere illuminance \(E_v\) of given RGB panoramic image.
Parameters: - RGB (array_like) – RGB panoramic image array.
- colourspace (colour.RGB_Colourspace, optional) – RGB colourspace used for internal Luminance computation.
Returns: Upper hemisphere illuminance \(E_v\).
Return type: numeric
Examples
>>> RGB = np.ones((16, 32, 3)) >>> upper_hemisphere_illuminance_Lagarde2016(RGB) # doctest: +ELLIPSIS 2.9344691...
-
colour_hdri.calibration.absolute_luminance.
upper_hemisphere_illuminance_weights_Lagarde2016
(height, width)[source]¶ Computes upper hemisphere illuminance weights for use with applications unable to perform the computation directly, i.e. Adobe Photoshop.
Parameters: Returns: Upper hemisphere illuminance weights.
Return type: ndarray
Examples
>>> upper_hemisphere_illuminance_weights_Lagarde2016( # doctest: +ELLIPSIS ... 16, 1) array([[ 0... ], [ 4.0143297...], [ 7.3345454...], [ 9.3865515...], [ 9.8155376...], [ 8.5473281...], [ 5.8012079...], [ 2.0520061...], [ 0... ], [ 0... ], [ 0... ], [ 0... ], [ 0... ], [ 0... ], [ 0... ], [ 0... ]])
-
colour_hdri.calibration.absolute_luminance.
absolute_luminance_calibration_Lagarde2016
(RGB, measured_illuminance, colourspace=None)[source]¶ Performs absolute Luminance calibration of given RGB panoramic image using Lagarde (2016) method.
Parameters: - RGB (array_like) – RGB panoramic image to calibrate.
- measured_illuminance (numeric) – Measured illuminance \(E_v\).
- colourspace (colour.RGB_Colourspace, optional) – RGB colourspace used for internal Luminance computation.
Returns: Absolute Luminance calibrated RGB panoramic image.
Return type: ndarray
Examples
>>> RGB = np.ones((4, 8, 3)) >>> absolute_luminance_calibration_Lagarde2016( # doctest: +ELLIPSIS ... RGB, 500) array([[[ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...]], <BLANKLINE> [[ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...]], <BLANKLINE> [[ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...]], <BLANKLINE> [[ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...], [ 233.9912506..., 233.9912506..., 233.9912506...]]])