"Clip out-of-gamut colors" check box

Point taken :thinking: :+1:
Uses which benefit from clipping ON are ‘outside my wheelhouse’ but that’s my fault for being so narrow minded.

For example the tone curves in RawTherapee can’t work properly with out of gamut colors. In darkroom if you fry the highlights with +4 EV exposure correction, you can still recover them with a base curve or a tone curve. This is not the case in RawTherapee. There is an unfinished article about working with out of gamut colors - http://rawpedia.rawtherapee.com/Unclipped.

1 Like

??

And if that’s a raw file I’ll be more than surprised…

Darkroom mode of darktable. Typing mistake…

1 Like

:+1: :+1:

ART uses the film_like clip method like rawtherapee?

Andy, I’m curious about this assertion - when I plot the xyY values of the matrices for ProPhoto and the D65 dcraw values for my D7000, the camera spectral sensitivity clearly outstrips ProPhoto in two of the three vectors:

ProPhoto-vs-D7000

Also curious about your depiction - haven’t yet seen that kind of colorspace plot. What software are you using?

1 Like

ColorThink Glen.

Oh, I see, you’re showing a view from a different axis. And maybe, a different colorspace than xyY, maybe Lab? I’m looking at the spinning screenshot on the CHROMIX website, on the Grapher page…

ProPhoto is big, covering unseeable colors, but all cameras I’ve compared in xyY are larger in the directions I show above…

1 Like

Thanks for taking the time for all that. I understand all that, which is why I was curious about the answer, which made no sense until Thanatomanic and Agriggio pointed out that the box wasn’t about “gamut” but rather “processing range”. Now the box makes sense, although whether having the option makes sense is a different matter.

2 Likes

I think that for clarity , in this context, it might be better to refer to colours being “out of range” rather than ”out of gamut”. I would also be a bit surprised since internally the program works with floating point so ought to be able to cope. However that is not really my field.

Yes Glenn, Lab it is.

@RichardRegal This clipping is done in most raw processors (often the only option) because it is simple and effective for what it is. How much of that has to do with range, gamut or math, it is a bit of a mystery, or at least, not simple to understand let alone explain.

If you are interested, search the forum for unbounded, unclipped, linear, HDR and scene-referred. You would find the discussion to be all over the place and sometimes controversial but if you persist you would get a better understanding of what happens behind the scenes.

As a matter of interest Glenn, can you ping me a link where I can look at the dcraw camera values myself - I’d be grateful :+1:

Iirc, the option not to clip the values was introduced shortly after the option to export 32bit float tiffs. Without that option (to export 32bit float tiffs) the data would have been clipped anyway (to the [0;65535] range of a 16bit-integer tiff when exporting to tiff.

@Andy_Astbury1 RawTherapee/camconst.json at dev · Beep6581/RawTherapee · GitHub

Here is a visual demonstration of the effect of Clip out-of-gamut colors control. It demonstrates that a particular RawTherapee tool can work well with out of gamut colors.

The starting point - Neutral profile applied to a RAW file.

+3 EV Exposure compensation is applied. This multiplies the image with 2^3 = 8. Some of the colors inevitably become out of gamut with respect to the Working Color Space (ProPhoto).

Color Toning (method Color correction regions) is applied. This multiplies the image with 1/2^3 = 0.125. The result is an image without sky because the out of gamut colors are clipped.

The control Clip out-of-gamut colors is switched off. The result is the same as the starting point.

The used RAW file is taken from PlayRaw. It belongs to Alessandro Amato Del Monte.

3 Likes

@teplit Hmm, looks well, but the blue spike in the histogram of your last screenshots, which should be not there (The spike, not your screenshot), tells me that we may have still an issue here.

@age, with reference to this:

https://bitbucket.org/agriggio/art/wiki/Pipeline

All tools before tone curve do not clip and work with unbounded data. From tone curve onwards, tools will clip (except for the output profile conversion if you use a v4 profile). To have no clipping on output, disable all those tools. Tone curve uses filmlike_clip, the other tools simply clamp

2 Likes

A rather convoluted approach, but here goes: 1) open an D7000 raw in rawproc, add a colorspace tool and assign the dcraw primaries. rawproc builds an internal profile from that. 2) save to .png with that profile embedded. 3) use exiftool to extract the icc profile’s fields from the image. Here are the relevant exiftool values:

Red Matrix Column : 0.68758 0.26758 0.01503
Blue Matrix Column : -0.03157 -0.30205 0.98991
Green Matrix Column : 0.3082 1.03447 -0.18004

These are XYZ coordinates.

1 Like