Jump to content
UltravioletPhotography

Modelling UV camera response from Bayer filter meaurements


Jim Lloyd

Recommended Posts

Andrea: ....the camera assigns the same RGB value to two different spectral wavelengths.

Andy: Wait, does that really happen? I did think that kind of one-way mapping was not an issue. Assuming you meant the hue, not the literal RGB value.

 

Andy, I went into Mathland there. I was thinking that there are infinitely many wavelengths in any vis or UV interval, but only (256)3 RGB values.

 

Edit: added "in any vis or UV interval"

Link to comment

Excellent discussion. I love re-reading that thread many times. The comments by JCDowdy always put the brakes on my buying a spectrophotometer, or a usb spectrometer. They will not give me what I want to know. I would love to see the real spectral curve for the Baader venus, with the IR light leak level. These "cheap" ones don't indicated it.

The only way I could come up with is buy a usb one and use a strong Hallogen light source to boost the IR.

The spectrum for the Canon 199a is here:

http://www.ultraviol...__fromsearch__1

 

This was my favorite image by Cadmium with 1000 lines/mm grading and sparticle:

http://www.ultraviol...2424#entry12424

The spectrum for the 1000 lines/mm grading is here:

http://www.ultraviol...ng/page__st__20

 

I had 10 minutes of sun today at 2pm and was able to test the grading quickly with SD14, and Em1. I think this will be the easiest way to show and compare camera, len and filter spectral profiles. Its just as inaccurate as more expensive spectrometers, but the colors are great.

Once I run every thing I have I will post it and the full method.

I think posting full details is most helpful to everyone, even yourself. As then any possible issues in method can be brought out.

If I could just calibrate my spectra, this method would be better. Also I don't like sun light, too variable, so still also thinking of best light source.

 

 

EDITOR'S NOTE: This topic was split. Some posts were split. Post paragraphs remaining in this topic are added where appropriate to other posts.

 

ANDREA B.'s RESPONSE:

Back in 2006 or 07 our member Shane Elen measured the old Baader Venus filter and the new BaaderU. You can see a transmission chart in the following link on the upper right of the page which shows the IR leakage curve of the two filters. In the new BaaderU the IR leakage is minimal. Some actual values are given.

http://www.beyondvis...BV3-filter.html

 

Shane wrote under one of the charts that the old 1.25" Baader Venus filter had IR leakage as follows:

  • 0.15% at 737nm
  • 0.30% at 813nm
  • 0.10% at 872 nm

Eyeballing the IR leakage on the new BaaderU, I would say it has max 0.025% in peaks between 880 - 1000 nm.

At 737nm there is a tiny patch of IR leakage which I don't think I can estimate properly - I would say

maybe between 0.005- 0.010% ?? (Look at it and see what you think.)

Link to comment
Andy Perrin

Andrea: ....the camera assigns the same RGB value to two different spectral wavelengths.

Andy: Wait, does that really happen? I did think that kind of one-way mapping was not an issue. Assuming you meant the hue, not the literal RGB value.

 

Andy, I went into Mathland there. I was thinking that there are infinitely many wavelengths, but only (256)3 RGB values.

Heh. Ok, yes, that’s called quantization error, but it’s usually not an issue because the 14 bits per channel in the RAW would usually give plenty of headroom, and we don’t really have infinite wavelengths either since the spectrometer has finite resolution also.

Link to comment

This has moved on some since I went to bed last night. With regards to the 'colours' in the UV this is my take on it. In the visible spectrum the Bayer filter has three nice distinct bands with nicely spaced transmission characteristics. In the UV we don't have that, we have three bands which overlap each other to a greater or lesser extent based on where we are in the UV band. Couple that with the narrow bandwidth of something like a Baader U filter, and there isn't much to play with in terms of ratios of red to green to blue.

 

Sorry to sound like a broken record here, but I come back to my measured data. This was the measured spectral response of the red, green and blue channels of my multispectral 5DSR with a Rayfact 105mm UV lens and Baader U filter, measured on my monochromator/integrating sphere device. This is from the RAW composite in RawDigger.

post-148-0-72107500-1527842476.jpg

 

This is before forming into a RGB composite and before any white balancing - as close as I can get to RAW data without hacking the sensor. There are differences in the red to green to blue ratio, so there will be different final colours in the image. But the bands are nowhere near as distinct as in the visible region. Will the camera be a wonderful spectrometer? No. Will it be expected to give different colours depending on wavelength? Yes, as it does. We've also got to consider most of what the folks on here are interested are flowers. They don't have nice well defined reflection bands with lovely 10nm bandwidths and sharp transitions. Couple these two factors together and best we can hope for is a rough guide to 'is this area reflecting primarily in the higher or lower wavelength part of the UV'. Perhaps in other research areas there is UV being emitted with much sharper bands. Could the camera be more use in predicting wavelength from the RAW file in that situation? Hypothetical question, of course, until the application comes along to be tested.

 

This is all without the complexity of the intensity of the light source as a function of wavelength, and the issue of white balance, which adds further uncertainty as has been mentioned above.

 

I can see why this topic has caused some passionate discussion over the years. It is such a complex situation and it's easy to get focussed in one part of it.

 

At the end of the day, my device and the Sparticle give a range of colours across the UV region. At some point it would be great to tally those up and see whether they match. I hope to be putting together a Sparticle in the not to distant future - filters on order, so at least I can test it against my setup. I will continue to work this are in the background, as I haven't got all the data I need yet, so will provide more as I find it.

Link to comment

Jonathan does have a great point. Looking at his invisible filter centered at 308nm, you don't see much difference. So the camera color response will be different, but our subjects still will look monochrome. Maybe this was the issue with the IR band test already done and will be predicted a UV one if created.

The 308nm filter Jonathan tested is expensive, they gave me a quote of $1000, when I contacted the company. But if you wanted a 3 filter combo, that 308nm, the U340, and the SEU maybe the best.

 

Looking hard a the second link I provided in post 28 above, from Cadmium tests with the grading. He does show what looks like post 400nm blue leakage in the Baader U filter. This may explain in practice what Jonathan is seeing. A 440nm bump in signal.

Link to comment

Jonathan does have a great point. Looking at his invisible filter centered at 308nm, you don't see much difference. So the camera color response will be different, but our subjects still will look monochrome. Maybe this was the issue with the IR band test already done and will be predicted a UV one if created.

The 308nm filter Jonathan tested is expensive, they gave me a quote of $1000, when I contacted the company. But if you wanted a 3 filter combo, that 308nm, the U340, and the SEU maybe the best.

 

Da Bateman, the issue with going down as low as 308nm is more than just cost. If taking a picture in sunlight there is virtually nothing there. The camera sensitivity down that low is virtually nonexistant, and that was with my monochrome camera. With a Bayer filter it will be worse, much worse. Then you get the problem of IR bleed. If the there is virtually nothing at 308nm then you have to extend the exposure. Any tiny IR bleed will be accentuated.

 

So, taking some rounds numbers as an example. If OD4 is fine for blocking IR in normal UV imaging up around 360nm, what happens when you go to 308nm and you now have 10 times less UV and 10 times lower camera sensitivity. Do you now need OD6 for blocking the IR as a minimum?

Link to comment

Ok - a lot been said on here and I haven't had time to read it all in detail, but here are my thoughts ...

 

Firstly, if you look at my aims at the start they were to derive a model (i.e. analytical curve) for the RGB channels of UV camera (from existing data, until I can get my own) and use this to predict false colours UV photgraph. i.e its

about the forward problem - what colours would you get with this particular input spectrum.

 

If you follow my above methods and results I stopped short of showing the final results as they didn't look quite right but here are a couple of examples:

 

post-175-0-04632300-1527858424.jpg

 

So these are the false colours predicted for these flower petals (tips) using the reflectance spectra from FReD database combined with Cadmium's sparticle results above and assume the illuminating source is the Canon 199a and white balancing using the same camera, lens, filters and software as used for the Sparticle image. Note there is no inversion here - this is a forward prediction. The colours look sort of in the right ballpark (OK not very good, but I am trying to illustrate the principle), but this is rather speculative. This is work in progress - I hope to repeat with my own system - but this is early days, I need to make a sparticle and explore the monochromator I have access to.

 

So that is one direction in what I am doing, the other is to use the modeled responses to compare with bee vision (and later birds). Again I stopped a bit short of this before as I thought maybe its too speculative - but here it is ...

 

post-175-0-17538100-1527859122.jpg

 

This shows the Bee short wave receptor convolved with sun spectra and the average R and G response combined and the blue response (nb, this is not ideal as we have two different illumination sources, but I think the main conclusion will be the same). We see that if we want to model this bee response using the R+G channels is about as good as we can hope for - certainly we don't want to add in the blue channel.

 

So If we want to produce image that relates to the bee S sensor that we can simply make a grey scale image showing the sum of the R and G channels - a similar effect can be found by using a simulated photographic yellow filter (in this context this means that yellow is passed and blue blocked).

 

Here are some examples with a yellow iris - sorry not very good quality as I was doing this outside in a hurry and it started raining ..

 

Images taken outside in sunlight with full spectrum conversion D3200 with Nikkor EL 80 mm f/5.6 (old type) UG1 2mm +BG40 2 mm, WB in Lightroom against suitable target in image,

 

UV image

 

post-175-0-50344300-1527860097.jpg

 

UV image - desaturated in Photoshop

 

post-175-0-34462400-1527860157.jpg

 

UV image - R+G monochrome as described above

 

post-175-0-51426500-1527860197.jpg

 

UV - image - yellow filter

 

post-175-0-56314200-1527860226.jpg

 

I like the final example, although it veers away from a strict definition of the bee S response - but it does this in a way to signal to the viewer that something is going on here - this is not a colour or monochrome image as we normally understand them.

 

PLEASE NOTE - This is work in progress shared here in a friendly fashion ... ( I went to art school for 2 years and the "crit session" was one of the main modes of learning ... i.e. show your work and have it hammered by the rest of the class!)

 

Anyway this thread has veered into the area of the inversion problem, so here's my take on that for what it is worth ...

 

At each pixel with with an incident spectrum of light and an output of just three numbers - RGB - we can express that in another way as HSL - but its still just three numbers (RGB -> HSL is a transformation in the same 3D colour space). There are no hues in nature ! they are in our eye/brain. So what does this inversion problem even mean? To obtain a full spectrum from just three numbers - no chance! So I think we think of UV photographs in three ways:

 

1. "What we would see if we could see UV"

A somewhat fanciful notion, but this is essentially what the standard white balanced UV photograph is - there is no inversion problem to solve, since we are modelling the imagined human in "UV land" if there are multiple ways the same perceived colour can result - so be it - that's how it would be in UV land

 

2. What the bee (or bird or animal or alien ...) sees

Umm - more tricky as we don't really understand (Ok maybe that should be I rather than we) these other systems. The lack of understanding increses as we go from input level to combination level to perceptual and behavioral level. But we probably have some idea about the first input level - so here's something we can solve - sort of inverting the data from 3D to 1D - which is what I have attempted above. Again the fact that many different spectra can give the same response doesn't matter - provided we can find a way to match the camera and bee response - something like the above

 

3. What are the properties of the reflectant (flowers for example) ?

We have a little hope here if we can have a very simple model of the underlying "basis spectra" - e.g these could be the spectra from certain pigments. This would have to be very crude and we can only have a maximum of three (two more stable) - we would be able to make an image colour coded for the relative amounts of pigments in different parts of the image. This would only work if we knew of the existence of these in advance.

 

I better stop now -its sunny but thunderstorms predicted so get out while I can ...

Link to comment

Oh I forgot to say something about white balancing ...

 

I think there are two elements to this - one is physical the other human.

 

For conventional unmodified camera the three sensors RGB need to be calibrated to have balanced output in response to a flat spectral source. Then the software needs to adjust the true RGB signal to account for human colour constancy (i.e. we see something as white even when it isn't - within limits). In the UV camera case we have the complication that the three channels are not properly calibrated in the first place and then we have to account for different sources. Whether we need the white balance step depends on what we are trying to do out of the three options described above ...

Link to comment
I'm hesitant about correcting various typos in the above two posts as I lost the whole post once before while editing ...
Link to comment

Jonathan: Will the camera be a wonderful spectrometer? No. Will it be expected to give different colours depending on wavelength? Yes, as it does.

We've also got to consider most of what the folks on here are interested are flowers. They don't have nice well defined reflection bands with lovely 10nm bandwidths and sharp transitions. Couple these two factors together and best we can hope for is a rough guide to 'is this area reflecting primarily in the higher or lower wavelength part of the UV'. Perhaps in other research areas there is UV being emitted with much sharper bands. Could the camera be more use in predicting wavelength from the RAW file in that situation? Hypothetical question, of course, until the application comes along to be tested.

 

Jonathan, this summary reassures me that you -- and Jim, too -- fully understand the problem. I know I have rambled on at length about all this. That has been because I have had two concerns - first, that nobody "embarasses" themself "scientifically". :D And second, that none of the perhaps less experienced readers of this forum get the wrong idea about what can and cannot be done.


 

Jim, I'm hesitant about correcting various typos in the above two posts as I lost the whole post once before while editing ...

 

Jim, here is how to protect yourself against text loss.

  • Bring up the edit box.
  • Place the cursor in the post.
  • Select all the text in the post with your mouse or with Command-A (Mac) or with Control-A (Windows).
  • Copy the text with Command-C or Control-C to your Clipboard.

If your text suddenly disappears while editing and the Command-Z Control-Z trick does not restore it, then you can restore the original text with a paste from the Clipboard. Paste is Command-V or Control-V. You can also copy/paste the original post text to a file made with whatever text editor you like using. Please do practice with the Command-Z/Control-Z trick to convince youself it works and to gain confidence that you can recover from most editing fumbles.


 

 

Jim: There are no hues in nature ! they are in our eye/brain.

 

While I understand the intent of this statement, I basically disagree with it. We have the definition of a spectral wavelength, a spectral power distribution, in physics -- light is very real and very measureable. And in a very reasonable way, a spectral wavelength can be equivalenced to a hue. So certainly one can say that hues exist in nature in this equivlent way, granting some leeway perhaps because our RGB representation of hues has certain limits. We have to remember that nature's biological apparatus also operates on the principles of physics (even at the quantum level).

 

And -- before someone goes here --> I also happen to disagree with the notion that we all see colours differently simply because the brain is the final arbiter of what colour is seen. In the statistically normal set of human beings (yes, "normal", ha-ha!, I know, I know), we all have the same eye structures, neuron structures, and so forth. In short, presented with a red wavelength we all perceive it as a red wavelength. (In case anyone didn't get this, I was leaving out color-blindness and other physical vision anomalies.) You can even test for similar color perceptions neurologically in insects, animals and humans should you ever want to go through a rather gruesome wiring up of your brain.


 

 

Dabateman: He does show what looks like post 400nm blue leakage in the Baader U filter.

 

That is spectral violet leakage.

And how spectral violet is recorded by our digital cameras is worth a separate 4-page investigation. :lol: :rolleyes: :D Some cameras produce purple hues around 270° (128,0,255). Some produce blue-violet or blue-purple hues around (64,0,255). In the olden days, some digicams mapped spectral violet to blue. And some cameras then and perhaps even now block most spectral violet up to about 410 nm. Of course there have been huge improvements in color representation in the last couple of years.


 

Jim: What we would see if we could see UV

If we had only a UV visual receptor, what we would see would be like a greyscale image. But hmm......artistically dull. I like better the false yellows and blues and bits of dark cyanish green in my UV Wonderland.

What the bee [etc...] sees

Remember also that these animals might not "blend" the UV, blue and green signals into a trichromatic color. It has been postulated that bees are capable of receiving simultaneous visual signals but interpreting them individually. (Remember my chamber music analogy?) So if anyone assumes the notion of trichromatic vision in a bee or tetrachromatic vision in a butterfly (etc), it might be a good idea to investigate what is known about that. And to mention in any art posters that this is an assumption.

You don't want the odd scientist rambling by muttering under his/her breath about "these artists (said scornfully) who don't know a thing about biology". :lol: :lol: :lol:

On a personal note, it would be so amazing to to to an art exhibit and see some actual scientific references in the brochures or on the wall poster for this intriguing blend of art and science in which you are proposing to work. Go Jim! (That is an American cheer to encourage you.)


 

 

I always want to be told of any errors, misassumptions and just plain stupidity on my part. I will fix it or at least try to. ;)

Link to comment
We should collectively write Alice in UV Wonderland.
Link to comment
"a spectral wavelength can be equivalenced to a hue" - Yes, but only with reference to the human visual system ( or a model thereof ) - can we at least agree on that?
Link to comment

You could use any visual system, I suppose. Bee hue. Butterfly hue. :)

 

Hue is defined by its dominant wavelength.

Link to comment

 

We understand in a general sense that metameric and spectral color are not mutually exclusive. One cannot distinguish if a visualized color is one or the other because perception has processed it down to a single channel - the color we name. This is the case for a real seen object, a photograph in a book or an image on the screen.

 

We know spectral UV false-color exists because the Sparticle shows us so. What has not been shown to my knowledge is a clear example of a UV false-metamerism. That would be a fine experiment for one of us to try.

 

 

 

Good point - Just read this article by Chittka - in very broad summary flower reflection spectra fall into a small number (5 common, 5 less common) of types and these have broad peaks, dips and plateaus rather than fine structure. Given what we know about camera response I suspect actually that for flowers there are unlikley to be many metamers producing the same false colour images. Of course for other things, there may be other possibilities. Just a thought - I am still learning here !

Link to comment

Ah - so you do need to specify a visual system? - it's not purely a physical property then ?

 

? I don't understand ? A live visual system obeys laws of physics as well. Biological processes are not something apart from "physical properties". Color/hue is a human (or animal) visual perception. But the eye, the brain have their physical properties and operate on the usual principles. I don't see a dichotomy anywhere. At what point do you draw a line and say this is this and that is that? There is no point at which physics ceases to exist simply because we have moved into the human brain. But I might not be understanding your point here, so forgive me if I've gone off in the wrong direction.

Link to comment
Andy Perrin

I think he means that hue not a property of the light only, it's a property of the light and also the sensor (which might be any kind of eye: butterfly, bee, human, et cetera).

 

For example, 550nm light striking the retina of a tetrachrominant is not the same hue as for a trichrominant.

--

Note that I'm not sure whether the above is true or not - is that part of the definition of hue? But I that's what I understood the question to be.

Link to comment

I think he means that hue not a property of the light only, it's a property of the light and also the sensor (which might be any kind of eye: butterfly, bee, human, et cetera).

 

 

Hole in one !

Link to comment

Good point - Just read this article by Chittka - in very broad summary flower reflection spectra fall into a small number (5 common, 5 less common) of types and these have broad peaks, dips and plateaus rather than fine structure. Given what we know about camera response I suspect actually that for flowers there are unlikley to be many metamers producing the same false colour images. Of course for other things, there may be other possibilities. Just a thought - I am still learning here !

 

5 common and 5 less common seems rather a lot to work with, although the minor set seems merely a less saturated mapping if I read that plot correctly.

Link to comment

Those different patterns are across uv, b,g,r - so if considering just uv then less variation.

 

This is just my inexpert reading of one paper - of course there is far greater expertise amongst others here

 

But my over simple take on it is this - our uv systems measure obviously in the uv and there is a little overlap with blue ( reflectance spectra and bee vision) so we need to think of Chittka's uv + b - so really i think there are 4 possibilities:

 

(+ means reflecting, - means absorbing)

 

u+ b- - false yellow - often in yellow flowers

u- b- - false black (or some very dark colours)

u- b+ false blue depending on the degree of flower / system overlap often in white flowers

u + b+ - false white - with a range of possible subtleties

 

I know this is extremely simplified and there may be some exceptions, but from what he presents it doesn't look like there is that much variation within the broad u,b,g,r bands. By which I mean any given reflectance spectra doesn't appear to have much detailed structure within anyband, but changes happen at the borders between bands, say between uv and blue.

 

I also realise that this is quite an old paper now, so maybe new information has thrown new light on this (ha)

 

This oversimplifications helps me to get my head around what is going on - I haven't for one minute forgotten about the beautiful complexities of the arrangement of these colours in actual flowers and images ...

 

I'm going to go into "read only mode" for a while ...

 

Or even avoid altogether - I think I have overdosed!

Link to comment

Thanks Andrea

 

In my idioscincratic way I now think that what we are doing is not uv photography at all, but uv/blue boundary photography - which is good because the interest is at the boundary (maybe relevant in bee opponency?). So in spectral terms flat across the boundary gives us blacks, greys and whites; sloping down, yellows; sloping up, blues.

 

We don’t see pure green because that would require a step change within the uv band, rather than at the boundary.

 

Pure uv photography would have the cut point shorter ? 390. - or apply digital yellow (pass) filter .

 

Definetly going to be quiet now ...

Link to comment

UV/blue boundary --> UV/violet boundary

 

 

Jim, you can check your predictions against my initial efforts at categorizing the flowers in the botanical database. I have two charts posted. One for the Poppy family and one for the Buttercup family. The charts show the primary flower colour, the primary UV reflectivity or absorbance of the petal, and the false colours found on the petal.

 

CHARTS: http://www.ultraviol...dpost__p__21578

 

I have not added any info about the central style/stigmas or filament/anthers. I might do this later.

 

Everything in the charts has to be considered only an approximation, of course. Currently this chart effort is experimental. I don't know whether there's any value in producing such charts. Nor have I worked out the best ways to assess colour or UV reflectivity. If I go forward with this effort, I will need to recruit someone to verify my observations.

Link to comment

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...