# Strange encounter in the red channel/RPi HQ Camera

**URL:** <https://forums.kinograph.cc/t/strange-encounter-in-the-red-channel-rpi-hq-camera/2748>\
**Category:** Research\
**Created:** [April 4, 2024, 11:51am UTC](https://forums.kinograph.cc/t/strange-encounter-in-the-red-channel-rpi-hq-camera/2748 "2024-04-04T11:51:42Z")\
**Posts on this page:** 1\
**Showing post:** 80

<div class="post-metadata">

**Author:** ![cpixip](https://forums.kinograph.cc/user_avatar/forums.kinograph.cc/cpixip/32/852_2.png) [@cpixip](https://forums.kinograph.cc/u/cpixip)\
**Post date:** [November 10, 2024, 8:44pm UTC](https://forums.kinograph.cc/t/strange-encounter-in-the-red-channel-rpi-hq-camera/2748/80 "2024-11-10T20:44:07Z")

</div>

> [@npiegdon](#):
>
> With a monochrome industrial camera, I’m not sure how many layers of calibration I have to fight against. My impression was that–outside of dead pixel correction (which the API also gives me control over)–the raw 16-bit values I was getting back in my frame buffers are straight from the ADC (with a gain of 1.0) and the response I’m getting is more or less identical to the curves shown on the Sony Pregius datasheet.
> 
> For color science, the profile I generated from the IT8 target can transform the linear light captures (with each channel’s exposure times set for maximum SnR) into something that looks indistinguishable from looking at the film directly through a loupe held up to sunlight.

Well, with a monochrome camera, you do not have any color science at all - you need to come up with your own, which you obviously did by calibrating with a known color target. Great! (And that probably did involve quite some work).

When I was using a narrowband LED setup, I did not like the dependence of the result on the center frequencies of the LEDs used. Combined with the unavailablity of a Kodachrome or Agfachrome target in S8-format, I decided that would not be my way of scanning film (I remember faintly that you used a 35mm calibration image and mounted that at several positions to get your calibration.)

> [@npiegdon](#):
>
> Indeed, my Kodachrome footage requires virtually no change to look excellent. This is despite narrowband illumination and different exposure times for each channel. The calibration works great and there’s plenty of head- (and floor-)room to bring things up or down in the event that the original footage was shot under less than ideal conditions.

That is certainly an advantage of your approach. As I mentioned earlier, I tend to simply cut out offending footage which can not be recovered…

> [@npiegdon](#):
>
> There are no color tone variations. The color on this film is produced by exactly three dyes. If you can capture those three, you’re done.

Well, it’s slightly more complicated. You have the spectrum of the illumination (was normally a Tungsten lamp in the old days of projection), this is folded with the absorption spectrum of the film’s dyes; neglecting the projection screen’s influence, the resulting spectrum is interpreted via the (broadband) dyes in your eyes into a single color perception (XYZ). Obviously, the space of all spectra is way larger than the three numbers each pixel is carrying - so there is a lot of redundancy here: a lot of different spectra must yield the same color perception.

Let me repost the following image which shows the result of a camera looking at a scene (it’s not totally equivalent with our situation). Here, the calculations were done with the full spectral data, and several different illuminations were tested. For each illumination, the best color matrix was calculated and used to arrive at the final color impression:

 ![Unbenannt](https://forums.kinograph.cc/uploads/default/original/2X/a/a343706a4d6b77978b9b06075ffad752956276ac.png)

The centers of each patch show the true color, “Bottom-left” corner of each color patch shows the result with a broadband illumination. Of specific interest is the “Top-left” corner of each patch - these are indeed the colors obtained with the Swiss’s paper suggested narrowband illumination. The mean broadband error is 1.08 (a perfect result; everything below one unit is not noticable by human observers) with the maximal deviation on patch 14 (“red”). The narrowband Swiss illumination achieves (again, with separately optimized color matrix) only a mean error of 3.75, with the maximal deviation of 9.31 at patch 12 (“blue”). Given, without a direct reference like on this sheet, no observer will notice the difference. (That one can optimize even narrowband LED setup shows the “Bottom-right” corner patch - the maximal error reduces here to 4.14. The “Top-right” corner patch “Camera LED3 Reelslow8” shows the results with the listed LED-setup in the [backlight thread](https://forums.kinograph.cc/t/the-backlight/966/171).

Well, without sufficient calibration material, I opted for the approach to use a broadband lightsource close enough to the light source in a projector and optimized the color science of the sensor in such a way that with usual illumination (specifically black body radiation of a given color temperature) the colors which would end up as RGB-values are close to the expected ones.

You started with a calibration target - which is certainly a more precise way of doing color science. However, that calibration is in principle tied to a specific film stock. For another film stock, you’d would want to redo that calibration to keep that precision. I do think that due to the rather broad curves of normal film dyes, the calibration from one film stock should transfer also to other film stocks. Even in the case the signals are captured with narrowband sampling. In fact, that is what you are observing. I am certain that you did not calibrate with Kodachrome, but you claim to get good results. Great!

---

_[View the full topic](https://forums.kinograph.cc/t/strange-encounter-in-the-red-channel-rpi-hq-camera/2748)._
