Raw Histogram, or Display Histogram

Hi @afre , and my apologies for taking so long to reply.

The relevant ACES profiles from my profile pack are ACES-elle-V4-g10.icc, and the V2 version of the same profile. The ACEScg profile has a smaller color gamut, close to the Rec.2020 color gamut.

If you compare the matrices for the XYZ profiles:

  • My XYZ profile has the identity matrix for the Red/Green/Blue colorants.
  • The dcraw XYZ profile also has the identity matrix for the colorants, but it’s been Bradford-adapted from D50 to D65.

I don’t know why the dcraw XYZ profile is the way it is. I had Marti Maria look at my own XYZ profile and he said it seemed fine (https://sourceforge.net/p/lcms/mailman/message/35693996/). I also had some people with access to image editing software that can process XYZ profiles check my XYZ profile, and again, nobody found any problems. I did these checks several months ago, precisely because a person using dcraw sent me an email saying that my XYZ profile isn’t the same as the dcraw XYZ profile. And obviously it’s not!

The dcraw profile-making code uses the D65 white point in a somewhat odd way, producing somewhat non-standard profiles with varying amounts of deviation from normal D50-adapted ICC profiles and color space conversions.

Given what you want to do, I would recommend the following, which allows you to bypass using dcraw’s ICC profiles:

  1. Use PhotoFlow to export to disk a sample interpolated raw file from your camera, with the embedded color space profile still being the default dcraw input profile for your camera. @Carmelo_DrRaw can explain how to save a sample image to disk with the default camera input profile still embedded.

  2. Using the image produced by step 1, use whatever program you like to extract the embedded default camera input profile and save it to disk. Perhaps the easiest to use is GIMP, which has an option to save the image’s ICC profile to disk.

  3. Use these command line options to process images using dcraw:

dcraw -o 0 -4 -T <whatever white balancing and other options you want> file-name.raw-extension

  1. Assign the extracted camera input profile from step 2 to the dcraw output.

  2. Convert the dcraw output to your chosen RGB working space.

The first two steps only need to be done once. For steps 4 and 5, various programs can assign/convert from the command line, and of course just about all GUI editing software can assign an ICC profile and then convert to another ICC profile.

Regarding which RGB working space to choose, G’MIC doesn’t concern itself with ICC profiles, but many G’MIC operations do use hard-coded sRGB matrix values and/or TRC. So depending on the image colors and the precise G’MIC command you want to use, you might want to convert from the camera input profile to the regular sRGB color space.

Just be aware that image colors outside the sRGB color gamut will be clipped upon conversion to sRGB, if your destination sRGB profile is a matrix sRGB profile. This is true even if you use perceptual intent, because matrix ICC profiles don’t have perceptual intent tables, so if you ask for perceptual intent, what you get is relative colorimetric, which clips.

My sRGB profiles are matrix profiles, as are sRGB profiles from GIMP, RT, dt, PF, ArgyllCMS, LCMS, dcraw, and so on. The only LUT sRGB profiles I know of are from color.org, and are designed for use in a very specific print-oriented workflow.

1 Like