Results 1 to 9 of 9

Thread: Color correction when photographing lasers

  1. #1
    Join Date
    May 2009
    Location
    UCSB
    Posts
    715

    Default Color correction when photographing lasers

    For those of you who do not know, I am big into nonlinear and ultrafast optics--both at work at at play.

    On a few occasions I have tried to photograph supercontinuum generating processes, even going so far as to try and take some video from the system at work https://www.youtube.com/watch?v=gzST4Uts6rA
    So far, all of my attempts to capture the beauty of the process have been largely unsuccessful, and I have always ended up with washed out images that do not reflect what is actually going on. I think people who try to photograph lumia run into a similar problem, here the color mixing just looks 'wrong' on camera.

    I think I have made a bit of progress sorting out why this is, and it has to do with the spectral response of the bayer filters on my cameras.

    I managed to capture this effect clearly when photographing the output of my supercontinuum laser (NKT SuperK) which has a singlemode fiber coupled output and continuous spectral coverage across the visible and into the IR. Because it is a supercontinuum laser, the output beam is a continuous spectrum not discrete lines like a whitelight argon laser.

    I collimated this beam using a reflective collimator (to avoid introducing chromatic aberrations--the endlessly single mode photonic crystal delivery fiber has a mode shape that depends on wavelength so there is some residual variation in the color across the beam--similar to the how whitelight argon lasers look) and dispersed it on a prism over ~10m to get a well dispersed 'rainbow'. I also have a IR block filter on the output mainly for eye safety (there is a significant fundamental component at 1064nm from the pump laser present at the fiber output), but also to ensure that there is no IR light that is interfering with the color rendition on my cameras. At first glance this looks very similar to the rainbows generated by dispersing sunlight, but if you look closer it does look a bit 'off' since the spectral power distribution is not that of a blackbody like the sun is.

    In any case, to cut to the chase here is what the beam looks like with a bit of fog
    Click image for larger version. 

Name:	rainbow.JPG 
Views:	3 
Size:	1.88 MB 
ID:	54663

    Instead of the expected continuum, we get instead 3 distinct bands of red/green/blue with almost nonexistant cyan and a very narrow band of yellow.

    That picture was taken with a samsung NX1 (S5KVB2 sensor), for which I was not able to locate a datasheet. There was however a paper published by Samsung in 2013 (1 year before the release of the S5KVB2 sensor) which included the attached QE plot
    Click image for larger version. 

Name:	bayer.jpg 
Views:	2 
Size:	105.8 KB 
ID:	54664
    from https://pdfs.semanticscholar.org/cb7...8834208d05.pdf
    This paper was for their cellphone sensors (1.5um pixel compared to 3.6um for the S5KVB2) but the spectral shape of the filters should be similar regardless.

    With a bit of squinting and hand waving one can now see where the problem is. Imagine a illuminating the sensor with a tunable monochromatic light source and estimating the measured r/g/b values based on the above responsivity plot.

    Below 450nm only B pixels are illuminated so we get pure blue
    Between 450-530nm there is a narrow band of cyan where both B and G pixels are illuminated so we should see a band of cyan
    Between 530-575nm there is nearly pure G pixels illuminated so we get pure green
    Between 575-630nm there is a mix of G and R so we should see a band of yellow
    And for wavelengths greater is only R pixels illuminated so we get pure R

    To further explore this, I took an image of the rainbow on a white card again at a ~10m range in a dark room to get a clean image. I then I tried creating a false color image with a highly nonlinear gain applied for each r/g/b channel, so that if there was any appreciable power detected in the channel, the drawn image is at full intensity for that channel.

    Click image for larger version. 

Name:	high_gain.jpg 
Views:	1 
Size:	172.2 KB 
ID:	54668

    The sharp edge in the red spectral response is clearly visible at the yellow/green boundary, as are the large gaps in the bayer filter spectral overlap as the regions of pure red green and blue. Also, a pink dot is visible in the middle of the red region where the blue filter response starts to pick up again, presumably this is the same behavior that causes near-IR lasers to show up as purple on camera.

    Compare this chart to an eye sensitivity chart (found at https://www.quora.com/Why-are-only-s...aked-human-eye where it was posted without attribution)
    Click image for larger version. 

Name:	main-qimg-b65ac8851681aca6e7fc9efccbc36a6c-c.jpeg 
Views:	48 
Size:	39.9 KB 
ID:	54665

    Here, we see that the green/red bands largely overlap, and most importantly there is always at least 2 cones giving appreciable response. The blue and green responsivity seem to match up roughly correctly with the bayer filter, but the red is completely off.
    That does not quite explain why the cyan went missing, but does at least explain why all of the orange/yellow colors are missing.


    Has anyone dealt with this before? I was contemplating schemes to correct for this in post, but it seems that in particular with the red channel the information needed is simply missing. Does anyone know of cameras that have RGB filters that have expanded overlap regions? Clearly it is a conspiracy from Big Camera to us laser enthusiasts down

  2. #2
    Join Date
    Oct 2012
    Location
    Germany
    Posts
    1,478

    Default

    ... AFAIK, for a "correct" colour representation you have to use BW cameras with colour filters and combine the single colour images ...

    Viktor
    Aufruf zum Projekt "Müll-freie Meere" - https://reprap.org/forum/list.php?426
    Call for the project "garbage-free seas" - https://reprap.org/forum/list.php?425

  3. #3
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default

    Call up Omega Optical and see if one of the 3-D multi-spike color projecting filters for true color anaglyph they have on Ebay just happens to have notches at all the right places? Long shot, but all I can think of is to add bandpass or notches. Omega Optical makes some crazy shit. If you find one let me know, or just order me one, I get clobbered with this in the lab all the time. Good luck finding a 3 sensor camera or 3 ccd camera these days. (or make one!)

    Seller: bjomejag or omega2 on Fleabay....

    FYI:
    http://www.labguysworld.com/TinyTriniscope_001.htm

    worth a read:
    https://www.bhphotovideo.com/explora...or-calibration




    Steve
    Last edited by mixedgas; 10-25-2018 at 13:37.
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  4. #4
    Join Date
    Nov 2008
    Location
    Cleveland Ohio
    Posts
    2,599

    Default

    Nice love the project

  5. #5
    Join Date
    Jul 2009
    Location
    Orlando, FL
    Posts
    373

    Default

    This is very cool! Totally addresses why some of those Kr+ lines have been photographic unobtanium. Thanks for sharing!

  6. #6
    Join Date
    May 2009
    Location
    UCSB
    Posts
    715

    Default

    Mixedgas - thanks for the lead with Omega, I had seen those filters in the past but never could figure out what they were for. Will give that route some thought, if nothing else it has the potential to clean up a 'less bad' camera that the NX1
    VDX - clearly the solution is to use a DLP style color wheel in front of a mono camera triggered appropriately... Comes with free gyroscopic image stabilization

    CountFunkula - For Ar/Kr lines, I have found that since they are mostly grouped into a 'red cluster' 'green cluster' and 'blue cluster' it was possible to get them looking about right by just tweaking the hues in post. This comparison roughly shows the results in hue correction from my whitelight argon (melles griot 643-RYB). Note - my tube is a red/yellow/blue tube, which has the green lines intentionally suppressed, so there is no green in the real beam. This makes the color correction easier since I do not need to separate out the green/yellow which has proven to much harder. I need to go through this more carefully when I have a color calibrated monitor and the laser in the same room to get it to look correct (or as correct as one can get, considering the variations in eye sensitivity vs brightness and finite color space of monitors...), but you get the idea. Since the red/yellow/blue bands are more or less independent there are enough degrees of freedom to make the beams all look correct. I am not sure if the tool I am currently using is the right one, but my workflow is to load the image in Gimp, and use the 'Hue-Saturation' tool to remap the observed colors of the beams (red/green/blue) to the actual colors of the beam (red/yellow/blue).


    image from camera:
    Click image for larger version. 

Name:	argon rainbow-untouched.JPG 
Views:	1 
Size:	1.20 MB 
ID:	54674

    image after color correction
    Click image for larger version. 

Name:	argon rainbow.JPG 
Views:	1 
Size:	1.32 MB 
ID:	54675

    I think this approach will fail if you try it on a scheme where there is color mixing (ex, for a lumia). In that case, I think a more advanced technique could work:
    1. Since you know there are a finite number of colors to start with (647/568/488), and they all map to a unique band of the bayer filter, you could view the image as basically the relative intensity of the 3 wavelength bands
    2. Because there is some crosstalk between the bands (488 will show up in both the blue and green filter), need to apply a linear transform to remove the crosstalk. In the case of my argon the only case where there is detectable overlap is the 488 which shows up in both green/blue, so it is possible to subtract a bit of the blue channel from the green channel (since 488 light only shows up in the blue channel, but both 488 and 568 both show up the green channel) to get back the relative intensity of the 647 (equals R) 568 (equals G-0.5B) and 488 (equals B). Note - the subtraction needs to be done in a linear color space to work right.
    3. From here, calculate the actual observed color (ex, as the Chroma tool does) for each pixel, based on the relative intensity of the 647/568/488 bands
    4. Generate the final image based on the result of 3.

    I think this would work almost perfectly for a RGB diode laser (since the R G and B are all monochromatic and fall in different bayer bands, so with the linear transform described in step 2 you can directly get back the relative intensity of the 3 source lasers), but with an argon it is not quite perfect because there are multiple wavelengths in each band, especially the 488 band, and all of the wavelengths in a band will get grouped together. In theory one could use the fact that the 488 band overlaps with both the B and G channels to work backward to get the wavelength of each beam, but as soon as you start mixing multiple beams the problem becomes underconstrained. Maybe some machine learning that figures out if the pixel is being illuminated by a single wavelength (use wavelength guessing method) or multiple wavelengths (use chroma calculation assuming only 647/568/488 illumination)

    Back to the case of photographing rainbows, I came across a some nice results of someone else who has used a variety of cameras to photograph monochromatic light. https://www.maxmax.com/spectral_response.htm My one concern with this technique is that depending on exactly what wavelengths are chosen from the monochromator, you might miss the cyan or yellow transitions of the bayer filter (they are quite narrow!) giving misleading results.
    In any case, looking at the 'synthesized' rainbow at the top of his images one can get a feel for how the different cameras perform. The Nikon D300 seems similar to my NX1 (very poor), but the Nikon D700 in particular seems to have a nice smooth and well overlapped spectral response, and and is able to resolve cyan and yellow nicely.

    D300
    Click image for larger version. 

Name:	Nikon_D300_SpectralResponse.jpg 
Views:	0 
Size:	51.2 KB 
ID:	54671

    =D700
    Click image for larger version. 

Name:	D700_ResponseCurveAdj4.jpg 
Views:	0 
Size:	49.9 KB 
ID:	54672

    Still, the response of these cameras is way off from human, and there are wide swaths of spectrum of the blue, green, and especially red bands where only 1 filter is illuminated.

    The Cannon 40D is particularly interesting because the B and R bands actually touch at 550nm, which implies that it should not have the 'green gap' where the rainbow is saturated in the green. This is somewhat visible in the synthesized rainbow, where the 2 green dots do have a slightly different hue, compared to the D300 where they are more or less exactly the same.
    Click image for larger version. 

Name:	Canon_40D_Response_CurveB.jpg 
Views:	0 
Size:	48.1 KB 
ID:	54673

    I am going to try and take a look around to see if I can locate a 40D for experiments. Due to their old age they are only about $100 but I do not have any cannon lenses nor a particular desire to own a 10 year old camera which can't record video... I also have a stockpile of machine vision cameras I want to try out and see if there are any winners.

    Stay tuned...

  7. #7
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default

    Camera correction filter group buy? Three steep band-passes on one glass?
    I know I'd love one for our undergrad robotics team's machine vision projects.

    Steve
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  8. #8
    Join Date
    May 2009
    Location
    UCSB
    Posts
    715

    Default

    I haven't had much time to keep working on this, but I came across an interesting paper that talks about a set of filters designed to help colorblind people. I need to think about it a bit more, but it does have some nice edges roughly in the right spots. Sadly, at about $300 a pair they are not exactly cheap, but with any luck now that they have been thoroughly debunked for helping colorblindness they will start to show on used for $5 a pair.
    https://www.osapublishing.org/oe/abs...oe-26-22-28693

  9. #9
    Join Date
    Feb 2007
    Location
    Fort Mill, SC USA
    Posts
    1,507

    Default

    Quote Originally Posted by krazer View Post
    I haven't had much time to keep working on this, but I came across an interesting paper that talks about a set of filters designed to help colorblind people. I need to think about it a bit more, but it does have some nice edges roughly in the right spots. Sadly, at about $300 a pair they are not exactly cheap, but with any luck now that they have been thoroughly debunked for helping colorblindness they will start to show on used for $5 a pair.
    https://www.osapublishing.org/oe/abs...oe-26-22-28693
    My optometrist told me years back that people without color perception problems were trying these glasses for better color range. Mostly artists and the like. My optometrist thought it might be relevant to laser-show viewers. At $300 a pair, I didn't try them myself, but it would be really nice if the lenses/technology helped my cameras and camcorders do a less-crappy job at discerning colors. All my 450nm stuff looks purple even with blue-shifting in post.

    -David
    "Help, help, I'm being repressed!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •