Strange encounter in the red channel/RPi HQ Camera

Thank you, here are the two files, the DNG generated by libcamera2 and the TIFF raw capture.

I want to summarize a little bit a few findings. I have two test films I use for experiments. One is a 1982 Kodachrome depicting a journey through Jordan, the other one an Agfa Moviechrome from the same time, showing images around Bozen in northern Italy. Here’s what I found out so far. Some of this is pure speculation, so feel free to correct me.

First, the setup. The scans I am doing are using the HQ camera with the IMX477 sensor. The illumination is done via an integrating sphere fed by Osram SSL80 LEDs, supposably with a CRI of around 95. The whitebalance needed for raw development is fixed and given by the power spectrum of the SSL80 LED. This whitebalance will never be OK except for an empty film gate - each scene requires a dedicated whitebalance to get things right.

Now onto some findings I came across:

  • Adjusting the exposure in such a way that the sprocket hole (or: empty film gate) burns out, but the brighest highlight areas of the film frame are not burned out gives me sufficient dynamic coverage that most scenes are captured faithfully. In dark areas of the image horizontal noise stripes might occur, but they are much lower in amplitude than the film grain in these areas.

  • The color gamut of the Moviechrome film stock exceeds the color gamut of the Kodachrome one. Especially the red channel of the Moviechrome shows a much larger range than the other color channels or my Kodachrome film stock.

  • The color gamut of the Kodachrome is surprisingly small. I’d bet that it basically fits into the sRGB color gamut. This is not the case with Moviechrome footage - here, colors end up out-of-gamut (see the example which started this thread).

  • One can recover these out-of-gamma colors somewhat if you set in the “Camera Raw” tab of DaVinci “Gamma” to Linear for example (more details above). You will need to add a “Color Space Transform” node in your graph to get the data back into your timeline color space. Be sure to uncheck the Apply Forward OOTF box - DaVinci does that occationally, for example when selecting as “Input Gamma” Rec.709. Simply uncheck it.

  • Color grading typically requires pushing the saturation up quite a bit. Again a hint that the color-gamut of our film stock is not really that large as we have that in memory.

  • I usually “adjust” whitebalance by adjusting the red, green and blue channel gains. Great if there is a brighly lid grey area in the frame, more difficult if not. In case of Kodachrome film stock there is a twist here: really burned out film areas where only the film base is visible obtain a slightly annoying magenta tint. This is difficult to handle. Not found a good recipe here. At the moment, I try to push these burned-out highlights toward the cyan corner of the color space by reducing the red gain. After this, I modify the red gamma in such a way that things look right. In the end, I go from the left input image to the right output image:


    The vectorscope display changes as well:

  • each scene is different in terms of color grading. I never was able to find an overall pleasing setting for a complete film. Supposably, one reason is the fixed color temperature of the S8 film stock (most of the time: “daylight”) which is nearly always not the correct setting. Another reason I have encountered with two different Kodachrome films: the development of the 15 m rolls was probably screwed up occationally - some rolls feature a quite prominent greenish tint.

  • to convert my timeline from DaVinci Wide Gamut to my required output space, I use a “Color Space Transform” as the last node in my timeline node graph. While I use as “Gamut Mapping Method” Saturation Compression,


    this barely affects the imagery of S8-footage. Only if I work with images of real scenes (not film frames) occationally that setting kicks in and very saturated colors are desaturated - the effect is barely noticable.

1 Like

Thanks! The DNG requires barely any work. Here’s what I obtained:


I imported the DNG into the timeline (set to DaVinci WG) and reduced in the “Camera Raw” tab the exposure to -2.01.

I than added the following nodes to the image’s clip node tree:


The CST is defined as:

Note that I forgot to switch the “Tone Mapping Method” to None - it’s still its default DaVinci. And I did not pick the right input color space. It should have been P3 D60… - well minor details which should not matter too much.

The actual grading on node 02 was this here:


As you can see, I pushed the shadows a little bit, reduced the highlights by about the same amount and increased overall saturation. I slightly pushed the contrast and reduced a little bit the red channel gain in order to get rid of a tiny magenta tint in the sky - I assume this is a Kodachrome frame?

(EDIT: I noticed that you have setup the CST node in the graph you posted above to output Rec.709. Be sure to set this to Use timeline. Or DaVinci WG - which is the same. Remember: my overall setup is working with DaVinci WG. To get back to rec.709 for grading and output, I use a single CST in the timeline node graph - for details, see the larger post above)

Colorgrading the .tiff-file is quite more challenging, as DaVinci does not really feature real channel multipliers (and your green is two times as large as is should be… :sunglasses:)

2 Likes

Thank you for taking the time to share the results with the street file.

I was doubting that it was matching your results based on the need to set the exposure to -2, and thereafter the offset in the parade, results.

The contrast setting erases deals with the offset, and I missed that before.

In the matching experiment between the DNG and the TIFF above, I made no changes to the DNG settings, to match and I think there is no offset coming out of the developer (plain 709 settings).

Here are the Color Match with Gamma settings node, and the overall match to the DNG (DNG without any corrections).

And how the picture looks on the scopes.

Since the results are encouraging, my next experiment would be to take your
xp24_full.dng and extract the values as a raw TIFF, and come up with a color match node that best approximate the color patches of the TIFF. If my thinking is correct, this will be a complete work-around the libcamera2 and based on the chart reference.

Take this opportunity to wish you and everyone a happy new years eve celebration, and may 2025 be a colorful wide-gamut year!.

2 Likes