Pages: 1 ... 34 35 [36] 37 38 ... 78   Go Down

Author Topic: DCamProf - a new camera profiling tool  (Read 767345 times)

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #700 on: August 12, 2015, 04:25:44 pm »

Done some experiments with Capture One again (it was a while ago). Anyway I've discovered an issue, well I kind of new about it but had forgot;

When using DCamProf profiles in C1 high saturation blues sometimes clips to black.

This doesn't happen when the same profile is used in RawTherapee.

I think I know what the reason is. The ICC profile defines colors with a LUT from Raw RGB to CIELab. Then C1 converts Lab (which is virtually boundless) to some sort of RGB for output. If the Lab color is outside the target RGB gamut it will clip, and for blue this seems meaning to go from 100% blue down to 0%. Why this happens in C1 and not RT (except if you artificially push it) is because C1 is using a small RGB space and RT is using ProPhoto.

This means that for Capture One the ICC profile must do some sort of gamut mapping to avoid clipping the output space.

The problem is that I don't know what Capture One's output RGB space is (so I don't know what to gamut map against), and if it's the same for all camera models. Anyone that knows?
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #701 on: August 13, 2015, 10:19:34 am »

The problem is that I don't know what Capture One's output RGB space is (so I don't know what to gamut map against), and if it's the same for all camera models. Anyone that knows?
do you mean that C1 does the final output in 2 steps : -> some unknown intermediate RGB space with smallish gamut -> RGB space designated by you, yourself, for output in C1's UI ?
Logged

brntoki

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 73
Re: DCamProf - a new camera profiling tool
« Reply #702 on: August 13, 2015, 11:54:16 am »

Done some experiments with Capture One again (it was a while ago). Anyway I've discovered an issue, well I kind of new about it but had forgot;

When using DCamProf profiles in C1 high saturation blues sometimes clips to black.

This doesn't happen when the same profile is used in RawTherapee.

I think I know what the reason is. The ICC profile defines colors with a LUT from Raw RGB to CIELab. Then C1 converts Lab (which is virtually boundless) to some sort of RGB for output. If the Lab color is outside the target RGB gamut it will clip, and for blue this seems meaning to go from 100% blue down to 0%. Why this happens in C1 and not RT (except if you artificially push it) is because C1 is using a small RGB space and RT is using ProPhoto.

This means that for Capture One the ICC profile must do some sort of gamut mapping to avoid clipping the output space.

The problem is that I don't know what Capture One's output RGB space is (so I don't know what to gamut map against), and if it's the same for all camera models. Anyone that knows?

I'm pretty sure that C1's native color space is ProPhoto, if that is what you're looking for.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #703 on: August 13, 2015, 12:11:22 pm »

I'm pretty sure that C1's native color space is ProPhoto, if that is what you're looking for.
what is the basis of being "pretty sure" though ?

for example http://help.phaseone.com/en/co6/output/learn-more-about-file-formats/colors-in-capture-one.aspx?p=1

Quote
Capture One works in a very large color space, similar to that captured by camera sensors. A large color space ensures that little clipping of the color data can occur. Clipping is the loss of image information in a region of an image. Clipping appears when one or more color values are larger than the histogram (color space of the output file).

At the end of the workflow, the RAW data has to be processed to pixel based image files, in defined color spaces. These spaces are smaller than the internal color space used by Capture One.

you can output to ProPhoto RGB for example, but it is claimed to be smaller ;) than whatever C1 is using...

so do we have any P1 people on record or something of the same quality ?

Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #704 on: August 13, 2015, 12:15:20 pm »

I'll back off a little from the claim that it's a RGB space clipping problem. The profile itself does clip to black in the blue area as it goes outside the valid XYZ range, for strange input like raw R = 0, G = 0, B = 100. I suspect that if I smooth away the "black hole" in the LUT it will work fine in C1 regardless of their output space. Still would be nice to know what it is.

Smoothing/interpolating away the black hole is easier said than done though... I'll experiment some more.
Logged

Alexey.Danilchenko

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 257
    • Spectron
Re: DCamProf - a new camera profiling tool
« Reply #705 on: August 14, 2015, 04:23:18 am »

what is the basis of being "pretty sure" though ?

for example http://help.phaseone.com/en/co6/output/learn-more-about-file-formats/colors-in-capture-one.aspx?p=1

you can output to ProPhoto RGB for example, but it is claimed to be smaller ;) than whatever C1 is using...

Not directly though I can see how that conclusion can be made. I would have thought that they talk about ERIMM (linearised ProPhoto eseentially proposed by Kodak). But if the above reading is correct then I guess they might just use LAB in some shape (normal LAB, UpLab etc) to have a "very large color space, similar to that captured by camera sensors".
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #706 on: August 14, 2015, 07:47:50 am »

Just released 0.9.2, which has a fix for the ICC blue-goes-black problem.

When fixing the "black hole" the problem in C1 indeed disappeared, the easiest way was to interpolate from defined neighbors. Thus my initial assumption was incorrect, I don't need to know the Capture One output color space is, fortunately.

I have now tested a complete workflow in Capture One 8 (as it was a long time ago I tested) making both linear profiles and with a tone curve using DCamProf's neutral tone reproduction operator. It all seems to work as intended.

I've updated the basic workflow docs both for the ICC and DNG workflow to show typical weighting parameters and the use of tone curves, that is making the basic workflows a bit more informative so the casual user can get more out of DCamProf.
Logged

Alexey.Danilchenko

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 257
    • Spectron
Re: DCamProf - a new camera profiling tool
« Reply #707 on: August 14, 2015, 08:03:28 am »

Just released 0.9.2, which has a fix for the ICC blue-goes-black problem.
The downloads section still references 0.9.1
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #708 on: August 14, 2015, 08:51:11 am »

The downloads section still references 0.9.1

Ooops! Fixed the link. Thanks for reporting.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #709 on: August 14, 2015, 09:30:14 am »

0.9.2 build for Windows (mingw = dcamprof.exe + libgomp_64-1.dll + HTML & PDF manual / = copy of Torger's web page and the same converted to PDF /) : https://app.box.com/s/xkiv79m5shimsrw7alq8cxdvvczjfh7x
Logged

brntoki

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 73
Re: DCamProf - a new camera profiling tool
« Reply #710 on: August 14, 2015, 12:25:53 pm »

what is the basis of being "pretty sure" though ?

for example http://help.phaseone.com/en/co6/output/learn-more-about-file-formats/colors-in-capture-one.aspx?p=1

you can output to ProPhoto RGB for example, but it is claimed to be smaller ;) than whatever C1 is using...

so do we have any P1 people on record or something of the same quality ?



I'm sorry. If I could remember I would have provided that information. If memory serves, and there is a real good chance it isn't in this case, I heard that from a C1 guy on a forum. I would have thought this one, but if no one else is sure, that probably isn't true.
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #711 on: August 14, 2015, 04:55:29 pm »

Played some more with Capture One tonight.

I wanted to make sure that their film curve really is a pure RGB curve, and indeed you can quite easily "copy" the curve by replicating it in the RGB curve tool. As we know RGB curves has some color shift issues. However they avoid the worst shift (and over-saturation) issues by not going below y=x in the shadow range of the S, the curve is above the linear curve throughout the range. It also seems overall a bit low on saturation (at least the P45+ which I used in testing), which does keep the colors more stable when applying an RGB curve.

It's still quite clear that the profile is designed for the standard curve, which causes some undersaturation and shifts when using the linear curve. Yellow-orange-red tones are good for spotting issues.

Today DCamProf will apply the curve to the ICC LUT, that is you must always use the "linear response" curve in Capture One (don't use linear scientific as it disables highlight reconstruction). I've done some tests and I haven't so far seen any disadvantages of the approach. I made some brief experiments to reverse the curve so you could have profiles designed like C1, that is no curve in the LUT but the right colors only appear when the intended film curve is applied. I didn't get it to work though, and I'm not sure it ever will, but I may try a bit more.

The thing is that C1, just like Hassy's Phocus, seems to have embraced the "RGB curve look" to some extent. If you like DCamProf have a different tone curve model then it means the RGB curve works very much against you, meaning that you need to "pre-distort" colors to quite much to make the intended look after an RGB curve has been applied. This may cause the profile look outright bad with a linear curve. The C1 bundled profiles still look fine with a linear curve as they haven't tried to work too much against the RGB curve quirks.

That is even if I succeed making DCamProf ICCs without tonecurve embedded for C1 it will likely still be a bad idea as it's not really an RGB style profile and is thus not as flexible as the bundled ones concerning changing curve. I will most likely not spend time on making an "RGB-friendly" tone reproduction operator as I'm not into the RGB look myself.
« Last Edit: August 14, 2015, 05:08:28 pm by torger »
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #712 on: August 15, 2015, 04:34:49 am »

Here's an example to show the differences between different type of tone reproduction. I've borrowed one of Erik's P45+ samples as it had a perfect strong but plain blue gradient sky for showing the differences more clearly.

The reference is a low contrast linear rendering, which shows the original color as is. I made it low contrast and brighter to make it more easy to compare with the S-curve renderings. Then we see how the RGB curve modulates the color, you get a bit of yellow into the sky. The reason is that blue is compressed more than the other channels that is the color gets less blue which means more yellow.

Adobe identified this problem and made a special variant of the RGB curve for Lightroom/ACR/DNG. It makes sure that RGB-HSV hue is kept constant. This way you don't get the color shift towards yellow. However if you make a gradient along RGB-HSV/HSL from blue to white it will not really look hue constant (see attached example), as it's not really a perceptually uniform space. This leads to that you typically get a little magenta feel to the sky.

DCamProf's tone curve (tone reproduction operator) uses CIECAM02 with some extra special tricks. Pure CIECAM02 will give you extreme highlight rendering issues. The camera clips so we must eventually blend into white which will be too abrupt with a too strong perceptual uniform model. With DCamProf I've tried to find a balance in the rolloff by mixing CIECAM02 with RGB-HSV. I'm thinking about adjusting the rolloff and actually make it non-uniform over tones. The skin-tone range seem to gain from a longer rolloff with more desaturation, while the sky blue range seems to gain from a shorter rolloff. For the blend-into-whitepoint-problem there's not much in color science models to find (as far as I know), so you have to come up with your own perceptual transition.

The examples here are rendered in RT but the RGB yellowish sky is also seen in Capture One's native rendering - that is Phase One uses the RGB color shift as a look feature and don't compensate for it that much, which makes their profiles work less bad with linear response than they otherwise would. Obviously if I make a DCamProf profile that "pre-distorts" the colors to end up right after applied RGB curve the colors will look bad with a linear response. Thus applying the curve directly to the ICC LUT is the right thing to do for every profiling software that doesn't embrace the RGB curve look.
« Last Edit: August 15, 2015, 04:51:39 am by torger »
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: DCamProf - a new camera profiling tool
« Reply #713 on: August 15, 2015, 06:18:27 am »

Here's an example to show the differences between different type of tone reproduction. I've borrowed one of Erik's P45+ samples as it had a perfect strong but plain blue gradient sky for showing the differences more clearly.

The reference is a low contrast linear rendering, which shows the original color as is. I made it low contrast and brighter to make it more easy to compare with the S-curve renderings. Then we see how the RGB curve modulates the color, you get a bit of yellow into the sky. The reason is that blue is compressed more than the other channels that is the color gets less blue which means more yellow.

Hi Anders,

I'm sorry that I do not have the time to analyze in detail, so what I'm going to say may be off the mark (if so just ignore).

All RGB manipulations of brightness/contrast, should be done in linear gamma space as a minimum safeguard against unbalanced shadow/highlight changes. So not linear tone curve, but linear gamma, which means that any tone curve must first be removed/reversed then brightness/contrast adjusted for all channels, then tone-curve reapplied.

That of course still does not decouple Chrominance and Luminance, which would require conversion from RGB to e.g. HSL or HSV or XYZ.
As long as calculations are performed in floating point precision, the round-off errors from multiple colorspace conversions should not become an issue.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #714 on: August 15, 2015, 06:42:27 am »

Not sure I follow completely, but in any case all the images above are rendered in floating point linear gamma space. I started with color stuff quite late after most things had already become linear floating point so I am quite unfamiliar with working in gamma spaces.
Logged

Bip

  • Newbie
  • *
  • Offline Offline
  • Posts: 42
Re: DCamProf - a new camera profiling tool
« Reply #715 on: August 18, 2015, 04:18:07 pm »

Hello,

First, thank you Torger, it is a very good job with Dcamprof, thank you also for the publication of AlterEgo with versions under Windows.
A question about to make a dcp profile, how do you do to make a “tiff“ of the  target for Lr? (The ideal is to generate a profile from a DNG file created with Lightroom, no?)
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #716 on: August 18, 2015, 04:41:23 pm »

A question about to make a dcp profile, how do you do to make a “tiff“ of the  target for Lr? (The ideal is to generate a profile from a DNG file created with Lightroom, no?)

what do you mean ? Torger suggests using dcraw binary or rawtherapee to make .tif for argyll utilities (you can as well use rpp or libraw utilities too) ... open http://www.ludd.ltu.se/~torger/dcamprof.html and search for example for text beginning with "Basic workflow for making a DNG profile using a test target"

I am using rawdigger (profile edition) as it is more convenient (for me).
« Last Edit: August 18, 2015, 04:44:17 pm by AlterEgo »
Logged

Bip

  • Newbie
  • *
  • Offline Offline
  • Posts: 42
Re: DCamProf - a new camera profiling tool
« Reply #717 on: August 18, 2015, 04:52:58 pm »

what do you mean ? Torger suggests using dcraw binary or rawtherapee to make .tif for argyll utilities (you can as well use rpp or libraw utilities too) ... open http://www.ludd.ltu.se/~torger/dcamprof.html and search for example for text beginning with "Basic workflow for making a DNG profile using a test target"

I am using rawdigger (profile edition) as it is more convenient (for me).

Yes for Dcraw or Rawtherapee, but it is better to make profil with the software (Lr for instance) that performs the "tiff" (or DNG), the color corrections are done better.
(I use Rawdigger to check clipping RGB values on the raw)
« Last Edit: August 18, 2015, 05:02:34 pm by Bip »
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #718 on: August 18, 2015, 05:40:02 pm »

Yes for Dcraw or Rawtherapee, but it is better to make profil with the software (Lr for instance) that performs the "tiff" (or DNG), the color corrections are done better.
(I use Rawdigger to check clipping RGB values on the raw)

If you're asking how to make a tiff file that Argyll scanin can read, then you can't use Lightroom as it cannot export a linear tiff without white balancing.

What can be desirable though if you intend to use the finished profile in Lightroom is that you convert to DNG first, and then use RawTherapee or DCRaw to make the tiff for Argyll's scanin. Usually this is not necessary, but some raw formats contain calibration data which may be applied differently by Adobe's DNG converter and DCRaw/RawTherapee
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #719 on: August 18, 2015, 05:48:31 pm »

I have now released v0.9.3.

I've made the neutral tone operator more flexible on the rolloff parameter so it can be specified per hue. I've seen advantages in subjective profiles to have a shorter rolloff for the skies range, and a longer rolloff for the skintones range. This maintains better sky color in landscapes, and render high key portraits with a more pleasing and nautral-looking transition to the whitepoint.

Then I've digged deeper down the Capture One converter and added some features required for making general-purpose profiles that work in the same way as their bundled.

C1's profiles are a bit messy, it seems like they apply the tone curve separately, which they do, but the also have a residual curve in the LUT. This means that "Linear Response" still means that you have some residual S-curve left. The purpose of this as far as I can tell is to minimize the RGB curve color shift. The separate curve is never a true "S" so it doesn't distort color as much, and then the LUT curve is probably added with some other technique, perhaps a Lab Lightness curve. This split approach makes the profiles work better than they otherwise would with different curves. It explains the mystery howcome C1 can produce good results despite using RGB curves as tone curves.

You can now design this type of profiles for Capture One using DCamProf, by following the workflow described in the docs. It will then get its look optimized for the default curve, but will look ok with the others, just as native profiles. Perfectionists should still design one profile per curve, as always.

What still may be left in terms of C1 support is gamut mapping. DCamProf currently doesn't do any, meaning that high saturation colors indeed get high saturation and may clip. There are ways in C1 to get them in gamut again but it seems like their approach is to have gamut compression in the profile itself. Context sensitive dynamic gamut mapping is a zillion times better of course, but the 1990s way to do it was in the profile, and it seems C1 is still there :-/.
« Last Edit: August 18, 2015, 06:12:36 pm by torger »
Logged
Pages: 1 ... 34 35 [36] 37 38 ... 78   Go Up