The Quest for Good Color - 2. Spectral Profiles "On The Cheap"

Dual illuminant can also have two luts that are interpolated

3 Likes

Iā€™ve been picking at variations, looking for why the red SSF separates from the rawtoaces reference. It would seem my assumption that, ā€œall tungsten-halogen lamps are created equalā€ is okay for an approximation, but doesnā€™t really account for all of the variation in spectral power distribution, or SPD.

Hereā€™s a link to a nice typical SPD plot, scroll down in the article to see it:

http://zeiss-campus.magnet.fsu.edu/articles/lightsources/tungstenhalogen.html

Of note is that these lights put the majority of their energy in the IR part of the spectrum, out of the range we consider for the SSF endeavor. And, of more significant note, the SPD in the visible range drops sharply from the upper end to the lower end of the visible spectrum. This is why power compensation is needed, or the per-wavelength sensitivity measurements wouldnā€™t be relevant to each other.

I created a few synthetic SPDs to see where the right data might reside. Since the DedoLight data I have is normalized from a value of 1 at 780nm down to 380nm, I plotted linear progressions from the same point. With the synthetic data, I couldnā€™t get SSFs that aligned throughout the spectrum; when low was good, high was off and vice versa. Indicates thereā€™s significance in both the low-end toe and the upper-end rollof of the nominal SPD. Hereā€™s a plot to illustrate:

The red Reference line is the synthetic SPD that gets good low alignment. This plot also shows the S-curve shape of the other measured SPDs, curvy enough to be relevant.

So, now Iā€™m cogitating on alternatives to actually measure SPD of the spectrum light source. Youā€™ll see a lot of cheap spectrometer setups using webcams and such, but using them for power measurement doesnā€™t work because of the bayer filter. There are folk whoā€™ve uttered, ā€˜just add the r,g,b numbersā€™, but that doesnā€™t ring right if you look at any of the SSF plots, but Iā€™ll still try it to confirm how wrong I think it might be. What Iā€™m also considering is scraping the bayer filters off the sensor of a cheap webcam I have; there are good results reported from using photoetch resist (from printed circuit board manufacturing) to dissolve the filters. Itā€™s a cheap camera I was going to throw away, so itā€™ll go down in fameā€¦ :smiley: Itā€™s just a 740px width sensor, but I donā€™t need 1nm wavelength resolution for this job, about 20nm should work fine. The goal is to get a consistent light measurement across the spectrum, unfiltered.

Iā€™ll report progress hereā€¦

2 Likes

Actually I completely forgot about a potential influence on the SPD and I donā€™t find a mention in your writings either: The grating itself usually hasnā€™t a perfectly uniform efficiency by wavelength. Did you get/find any information on that for your grating?

1 Like

This. You should measure the SPD at the same point of the optical path where the camera will be. This will take into account any non-flat contribution of the optics you use in the system. You could even leave the DSLR lens in front of the webcam and take into account itā€™s contribution.

1 Like

So a simple linear vs wavelength relationship, brings your SSF to better match the ā€˜referenceā€™ SSF? Interesting. And tempting to ā€˜justā€™ bend your data to the other datasetā€¦with all possible downsides that this could have.

But isnā€™t this what he is doing already? He kind of needs the SPD without the grating to see the effect of the grating (and whether this accounts for the differences to the Open Film Tools people).

Unit cost on these is about $3US. Unless thereā€™s generic characterization for holographic gratings I havenā€™t already found, I donā€™t think they spend the time finding it. Its primary purpose is to shine colors on grade school wallsā€¦

Only at the low end. The high end is bolloxed. I briefly considered crafting a SPD to fit, as the reference data is anchored to measured SPD, but that only helps me, doesnā€™t help make this a viable method.

No, actually I was operating on the assumption that tungsten-halogen lamp physics would be close enough to use another lampā€™s SPD. Really, it seems to work well enough to produce an image with overall rendition colors consistent enough with those from a matrix profile. Iā€™d use the profile Iā€™ve already built to mitigate extreme colors from my D7000, and Iā€™d use the same workflow to make a Z6 profile without benefit of a reference data set. Just want to take ā€œcheapā€ as far as it can reasonably goā€¦

1 Like

I found a cheap (~$26US) monochrome camera that connects to a Raspberry Pi:

With it and one of my Pi boards, Iā€™m going to make a spectrometer that can do SPDs. While still ā€œcheapā€, this sort of vexes my intent to make a way for average folk to do SSFs, as the whole RPi thing is a bit ā€œcomputer-geekishā€. What Iā€™m thinking of doing with it is to measure a collection of plain old tungsten incandescent and tungsten-halogen light bulbs to see if there is validity in developing a representative SPD dataset.

I also got the IT8 target yesterday, so Iā€™m going to set up a session on the south-facing front walk of my house to shoot it in straight-up daylight with all my cameras, to start working on the next threadā€¦

2 Likes

Been loosely following. A thought came into mind just now: I have a halogen lamp that seems to change in colour and intensity with age. It is also a dimmer.

That is rather normal. The halogen is in the lamp bulb to mitigate this but cannot completely prevent the metal wire to slowly evaporate onto the lamp bulb itself. This likely changes transmission of the generated light to the outside and also the temperature of the metalwindings itself (a different radiation equilibrium is achieved inside to compensate for the loss of transmission to the outside).

Point is would this denaturing affect @ggbutcherā€™s quest?

With respect to intensity, this is why a SPD measurement really should be taken at each SSF measurement. Iā€™m pretty sure the generic SPD data sets Iā€™ve used to date are the cause of the differences between my data an the rawtoaces data, which was adjusted with an associated power measurement at the time of the spectrum measurement.

With respect to ā€œcolorā€, Iā€™d be willing to bet that is a reduction in the black-body temperature.

That is my guess as well. :slight_smile: Weather is nice: donā€™t stay in your workshop too long. :stuck_out_tongue_closed_eyes:

Ha, Iā€™m outside right now, fixing a sprinkler leakā€¦ :tired_face:

Regarding the discrepancy between the two sets of SSF, I wonder if this could be caused by the fact that Nikon ā€œrawā€ data actually has black point scaling applied during the A/D conversion according to the white balance set in camera. So, if the in camera white balance setting was different for the two measurements then the color primary offsets would differ slightly. In this case it appears that the green primary is the same, while the R/G/B components of the red (615-650) and blue (440-460) are all boosted.

Iā€™d think the rawtoaces measurements would have had the same bias. My starting point was the out-of-file data, with only a demosaic and a horizontal flip.

Iā€™ve modeled some synthetic power calibration data, and it looks like thatā€™s the likely culprit. Iā€™m putting together a way to measure the lightā€™s power using a monochrome camera, so I should be able to implicate or exonerate that this week. Iā€™m also going to look at my wavelength calibration algorithm, as that might account for the premature downslope in the red curve.

1 Like

Be careful with this, as ā€œmonochromeā€ sensors (basically a silicon diode) have a sensitivity that is very wavelength dependent. You need a properly calibrated sensor for this.

I got one of these:

Essentially, Iā€™m going to put it in the same optical path as the camera-under-measurement, and collect spectrum and calibration images. There are no Bayer filters, but thereā€™s an IR filter I may remove in a subsequent test. Right now, Iā€™m just going to see if I can build a power calibration file from the raw measurements of this sensor, see if they come close to the results from the Dedolight files from the Open Film Tools project.

Any more progress? Been thinking more about the differences between your measurements and RAW to ACES and Iā€™m really thinking that it might at least partially have something to do with Nikonā€™s pre A/D processing. I canā€™t think of anything else that would cause that really odd spike in green/blue response AND a decreased red response at the same time. I believe that Nikon is amplifying the signal for the green and blue channels at the red color space primary position (via a matrix at some point in the analog to digital pipeline) to even out the noise floor across all three color primaries, purifying the primary red response after black point subtraction. It looks like theyā€™re lifted to about the same point as the minimum response at the other color primaries. Also, it looks like the minimum response point of the curves at the far end of the blue spectrum are also artificially lifted to the same level. What do you think? Maybe you could figure out the cameraā€™s native/uni white balance and try shooting the spectral image with the camera set to that?

With all the messing-around with variables Iā€™ve done, the emerging culprit looks like some sort of filtration commencing at the peak of the R (or C, in some circles) response curve, like an IR cutoff. I really donā€™t think its anything in the camera processing, as that would have also affected the rawtoaces data. My initial suspicion, power calibration, has more to do with where the B (or A) and R (or C) curves peak, and that still needs a bit of work.

So, the culprits for IR filtration that are unique to my optical chain would be:

  1. The diffraction grating. Cheap plastic hologram grating, no direct data on its spectral attenuation. I might go looking for generic materials dataā€¦
  2. The camera lens. I really donā€™t think this is the problem, as Iā€™d surmise the lens designer wouldnā€™t want to put IR attenuation in their mix that trumps the sensor IR filter.

This is pushing me toward spending the money on a lab-grade diffraction gratingā€¦


All that said, Iā€™m still messing with power measurement, which Iā€™ll write about here in a bit. With the cheap monochrome camera and some web code I wrote for the Raspberry Pi, Iā€™ve conjured up a nascent spectrometer with its own set of challenges. Thereā€™s a lot more written about these devices; publiclab.org has been a real go-to for my design trades. Thing is, making such a device in addition to a SSF spectrometer starts to become more challenging for the average photographer. So, I shot my initial set of IT8 target images this past weekend, which will be the topic of my next thread; this may yet be the more reasonable approach for the majority of photographers.

3 Likes