Photographic Tone Mapping Filter
Filter
RIF_IMAGE_FILTER_PHOTO_TONEMAP
Description
Photographic tone mapper that emulates the work of camera.
Based on following formulas:
https://en.wikipedia.org/wiki/Film_speed#Measurements_and_calculations
First we compute the luminous exposure H (in lux seconds):
where q is:
For the theta angle, we use a typical value of 10°, for T - 0.9, vignette v is an input parameter.
Then computation diverge based on weather or not a user wants to provide an input value for film ISO or wants to compute film sensitivity in kernel. If ISO is provided and user enables useISO define (see the Parameters section), we compute the final film sensitivity as ISO / 100 and use it in the final pixel value computation. Otherwise, we compute standard output sensitivity using the following formula:
where lx * s = H and Hsos is the exposure that will lead to values of @saturation in pixels.
Parameters
Parameter |
Type |
Input/Output |
Description |
---|---|---|---|
gamma |
float |
input |
Gamma correction value. |
exposureTime |
float |
input |
Film exposure time. |
sensitivity |
float |
input |
Luminance of the scene (in candela per m^2). |
fstop |
float |
input |
Aperture f-number. |
focalL |
float |
input |
Camera focal length. |
vignette |
float |
input |
Vignette value. |
saturation |
float |
input |
Saturation used for sensitivity computation. |
lighten |
float |
input |
Brighten up highlights. Higher settings bring highlights closer to white. |
darken |
float |
input |
Darken shadowed areas. Higher settings bring shadowed areas closer to black. |
ISO |
uint |
input |
Film ISO value. |
useclampN |
uint |
input |
If set to |
whitepoint |
float4 |
input |
The color that will be mapped to white in the output. |
useISO |
uint |
input |
If set to |