What does linear RGB mean ?

I just went back through the thread, and I think it started in post 18 (sorry, @Matt_Maguire:grin:) when Matt suggested that one could possibly use a colorchecker shot at different exposures to assess the effect of the color filters to sensor response (pipe in if I got that wrong)

I think there is a relationship, in that preservation of the linear tonality across the channels is essential to preserving the camera’s intent to capture representative color, especially the non-spectral colors…

Sorry for that post @ggbutcher, it was a bit naïve. When Aurélien mentioned that the camera sensor was “non-linear”, I thought he was talking about the response of the individual photosites with respect to different intensity levels. If you read the subsequent comments, they are saying that the response is pretty close to affine (proportional plus or minus an offset), and we can basically ignore any error there. The real issue is the shape of the colour filters on the sensor. If I shift the colour hue by a certain distance, it will affect the output of the RGB values by certain amounts. If I take another equal sized step in hue shift, then the impact of the RGB values will be different, because of the overlap and particular shape of the colour filters on the sensor. Basically, it is not possible to come up with a set of linear coefficients (aka matrix) that will accurately transform the RGB values into a standardised colour space. What was discussed was to use a lookup table (LUT) to make this mapping. To avoid exhaustively measuring every value, we could measure for a sample of values of the LUT and apply some interpolation techniques, but the measurements need to be done under well-controlled conditions.

At least, that was my takeaway from the remarks that followed my post :slight_smile:

2 Likes

Oh I didn’t think such, it looked to me a natural implication of the original discussion.

Sometimes we lose sight of the original purpose of a thread, but I don’t think that was the case here. I’m as big a hijacker as any, hard to keep my attention focused on… Squirrel!!!

2 Likes

In principle you don’t need a ‘real spectrometer’ to check the calibration, you only need more calibration lines (actually, the big spectrometer was probably calibrated like that, so you’re cutting one step :wink:). Depending on your sensitivity you can add several gas lamps (hydrogen and sodium are pretty standard, plus the mercury lamp has many more lines). And then you have the Fraunhofer lines on the solar spectrum…

1 Like

well you need calibration, I totally agree. But a hydrogen lamp, what does that cost? And a mercury discharge lamp with a low power output?

I am thinking of laserpointers (406nm, 532nm and that red wavelength that those solid state lasers diodes have :smirk: or a HeNe at 632nm but they are usually expensive) as well as some(?) intereference filters. The sodium lines (589nm) should be easy, and I’ve never tried to resolve the fraunhofer lines from the sun. Any old CD or DVD could be used as a improvised grating. With enough lines the calibration could be good enough.

ADD: dvd-laser diodes are 657nm and apparently there seem to be laserdiodes for 445nm, 473nm, 485nm, 510nm.
Source-google books

ADD2: discrete known-wavelength lightsource I jovially use interchangeably with ‘calibration lightsource’…ahem…oh well

I did some reading on LEDs this morning, and I think consistent intensity across the spectrum would be problematic, because of the different materials and structures needed to get various wavelengths. I read the interference filter paper also, and that sounds more promising, although those filters cost about $30US each at EdmundOptics.

Oh I was thinking single wavelength laser-diodes. Those should be consistent an small bandwidth enough for the purpose.
Yeah those IFFs are rather on the pricey side.

OK, this is getting REALLY out of topic now :laughing:

250 USD for the power supply, plus 50-100 USD per discharge tube. Not cheap, but certainly not prohibitively expensive if you’re really into it (prices from Spectrum Tubes, Magnetizers and Coils, there should be other suppliers).

The cheap versions are mercury lines from a fluorescent tube, sodium from street lighting or burning table salt, xenon from a high power car headlight, neon and other noble gases from color signs (all sources that are quickly disappearing, so act fast! :wink:)

The problem with diode-based lasers is that, unless you buy them calibrated from a reputable source (expensive), the wavelength is known plus/minus 10nm or worse. The exception are the 532nm and a couple of others that are derived from some non-diode sources (like Nd:YAG crystals), so the wavelength is always spot-on.

Good idea! (although breaking a DVD player to remove the laser is not cheap :laughing:)
Those lasers should have a pretty reliable wavelength.

CD-type lasers with a wavelength of 780 nm (within the infrared) were used. For DVDs, the wavelength was reduced to 650 nm (red color), and for Blu-ray Disc this was reduced even further to 405 nm (violet color).
Source Wikipedia

Neither did I (and I should have the equipment to do it). Sounds like a good reason to borrow the lab spectrometer for a sunny afternoon :wink:

1 Like

Wikipedia tells that automotive “Xenon” bulbs are actually metal-halide, so not suitable as calibration source? I can provide spectrum if interested as I’ve repurposed two 6000K bulbs for vestibule lighting :slight_smile:

Okay that is less expensive than I thougt. And I agree that is perfectly fine for calibration.

10nm off!!! okay, yeah that might be too much. The 406 ones are probably repurposed blu-ray sources…maybe the ones which didn’t make it into the drives? Those 532nm are frequency doubled 1064nm ones rigth?

I think I’d get killed if I take out the spectrometer out of the lab!

People are actually building their own DIY spectrometers btw.:
Youtube DIY spectrometer

every cameraflash should be a Xenon bulb…hmm.

I doubt it until I see a spectrum. The way they ignite when turned on, how quickly they reach maximum light output, looks a lot like Xenon to me.

Please beware of the UV! A cataract in your eyes is no fun at all.

Short summary: a homebuilt spectrometer with decent calibration is in reach. So there is nothing really stopping one from acutally spectrally characterizing CFAs on cameras. Which is needed to build a AtoB0 LUT. Someone correct me if I missed something.

Worst case scenario for a cheap pointer, yes. Most are probably closer to specification, but you can’t know it without calibrating them :wink:

Yes, they’re frequency doubled Nd:YAG lasers.

We have a couple of small portable ones. Besides, it would make for a nice demonstration for students :blush:

The Wikipedia article says that

they are actually metal-halide lamps that contain xenon gas. The xenon gas allows the lamps to produce minimally adequate light immediately upon start, and shortens the run-up time.

so, you’re both correct. I doubt the xenon in there is enough to give a meaningful spectrum.

Yeah! All my description about calibration lamps should have started/ended with a :warning: “Be careful! Many non-thermal lamps emit strongly in the UV (mercury, hydrogen) or in the near infrared (xenon), some of them more than in the visible. They’re dangerous to look at for extended periods of time without adequate protection” :warning:

(specifically calibration lamps, the ones sold for illumination should filter those wavelengths in the glass)

1 Like

exactly, that would be a catch22, trying to calibrate with something that needs calibration in the first place. I thought they could be 2nm off, which, if you have several for calibration is meh but not the end of days. We never used them in the lab because of mode-instabilities and such.

but they are the most trouble if they do not do this.

Off topic:

I had one in 2018, now fixed with a brand-new lens. During the procedure, when I temporarily had no lens in my right eye, I could see a lilac / light-violet glow around the ends of fluorescent lights. They said it was because the retina is sensitive to UV but this is normally filtered out by the lens.

The new lens is wonderful, but now I have a slight colour imbalance: a minor cataract in the left eye gives a yellower image compared to a bluer image in the right.

1 Like

DCamProf is a solid piece of software, a few years old, probably the best free tool out there to generate robust input camera profiles with widely available targets. Most people don’t need anything more than a DCamProf CC24-based profile. In fact, most times sampling the gamut solid more frequently than that can result in less stable profiles.

Lumariver Profile Designer is based on the same engine, has a decent GUI but costs a few pennies.

Jack

2 Likes

Yes, that’s why they call it a ‘compromise’ color matrix. Dense LUTs are a compromise too, because they introduce button-down discontinuities in what is in fact typically best rendered as a smoothly changing solid. Some disciplines call this overfitting. So often the truth is in the middle.

I don’t quite understand what folks here mean when they say that SSFs and pixels are not linear though, they sure have a linear response as defined upthread: twice the input, twice the output all else equal. It may not be the response of perfect color matching functions, but that’s a different issue.

Jack

2 Likes

I don’t quite understand what folks here mean when they say that SSFs and pixels are not linear though, they sure have a linear response as defined upthread: twice the input, twice the output all else equal.

Sure, with respect to changes in intensity changes, as long as you stay away from the noise floor and the saturation limit, the response is more or less linear; I don’t think anyone is debating that

It may not be the response of perfect color matching functions, but that’s a different issue.

But this is why people are saying the sensor response is not linear – stepping 3 units along the spectral axis will not cause 3 times the change compared to stepping only one unit along the spectral axis.

Right. But isn’t that true of any SSFs, including perfect LMS? They are all linear under a given illuminant: double the input, double the output. The fact that they don’t behave like CMFs is a different issue, no?

Jack

They are all linear under a given illuminant: double the input, double the output. The fact that they don’t behave like CMFs is a different issue, no?

Yes, you are right, they are two separate issues. One issue is that we talk about linearity with respect to imput intensity, holding everything else equal. The other issue is whether there is a linear mapping from the camera “RGB” values into a standardised colour space. In the former case we have linearity (in some sense), in the other case we do not.

Right, and color is perceptual thus subjective. I would argue that if one is being cantankerous about it, colorimetric color spaces are themselves compromises and non-linear with respect to my visual system (or yours): how many people were used in 1932 to determine CMFs and what was their variability? Surprisingly few and surprisingly high.

So the real question is how close to linear is close enough? I don’t have answers, just questions. All I know is that In normal outdoor conditions, with my Nikon digital cameras I typically do not have a preference for color produced via an appropriate 3x3 (or x4) matrix vs something more involved.

Jack

That is a bit surprising. Saturated colors in flowers will surely benefit at least in how they gently go into what I would loosly call ‘gamut clipping’ region. The comparison from @ggbutcher of the matrix profile vs. the AtoB0 LUT really sold the more involved process to me. And I am not saying it looks more like the real world, but more believable how it starts to ‘clip’.