w3c / ColorWeb-CG

repo for the Color on the Web Community Group
47 stars 21 forks source link

Standardize tone mapping applied when rendering HDR content to an SDR canvas #113

Open ccameron-chromium opened 8 months ago

ccameron-chromium commented 8 months ago

Suppose there exists HDR content either as a ITU-R BT.2100 video or ISO 22028-5 image. It has:

Suppose that that image is required to be converted to an SDR target, e.g, because it is being drawn (using drawImage) to a 2D SDR canvas.

In this process, a tone mapping from HDR to SDR must be performed. This issue is to standardize that tone mapping.

Note: This is a subset of the HTML issue Standardize rendering of PQ and HLG HDR image content. That issue attempts to render to a space defined by an HDR headroom. This issue is just to an SDR space.

Scope

Before considering the tone mapping to be performed, we should first establish a more limited scope for the problem.

Test images

Some test images are available here:

Candidate Algorithms

Several of these candidates have been implemented here.

simontWork commented 8 months ago

As well as natural images can we please include some generated images with a range of colours and sweeps to ensure that candidate solutions can be evaluated in terms of colour accuracy, discontinuities etc.

Examples could include the TruVision LUT stress test image, Macbeth colours, colour bars etc. It's also important that any solution correctly displays memory colours such as the entire range of skin tone, sky, grass etc.

Myndex commented 8 months ago

OpenEXR has a collection of HDR test images that may be useful for this context. There is an assortment of patterns as well as natural images, and images intended to stress test or break things.

https://openexr.com/en/latest/_test_images/index.html