DIY spectroscopic analysis - General Chat - CHDK Forum
supplierdeeply

DIY spectroscopic analysis

  • 3 Replies
  • 2351 Views
*

Offline LjL

  • ****
  • 266
  • A720IS
DIY spectroscopic analysis
« on: 11 / July / 2008, 08:01:54 »
Advertisements
Unfortunately, my A720IS uses an old boring Bayer (GRBG) filter, and so do all other cameras I have access to.

But it occurred to me that if one has a camera with a different filter (and preferably, also one with Bayer), one should be able to perform some rough spectral analysis of a subject.

Let's assume we have a GCMY camera, for instance. We observe yellow. Is it pure yellow, or is it a composite of red and green wavelengths?

Well, we can look at the nearest G sensor element if its filter is narrow enough, and tell whether or not there's green.

Even better, if we have another camera that uses Bayer, we can take another photograph of the same subject with it, and determine both the red and green components.

Actually, if we have both types of cameras, we can do that for each of the six colors red, magenta, blue, cyan and green, can't we!


Looking at the dcraw source code, it appears that at least these cameras employ GCMY filters: PowerShot 600, PowerShot A50, PowerShot Pro70, Pro90 & G1, PowerShot A5.
« Last Edit: 11 / July / 2008, 08:03:30 by LjL »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: DIY spectroscopic analysis
« Reply #1 on: 11 / July / 2008, 08:05:43 »
forgive my ignorance, but what would be the benefit of having/making a spectroscopic analysis? for what kind of applications would it be useful?

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: DIY spectroscopic analysis
« Reply #2 on: 11 / July / 2008, 08:19:10 »
Not very many scientific applications at all, since it would be a very rough kind of spectrometry.

But what use is taking IR/UV photographs? For that matter, what use are 99% of the pictures people have on their memory cards or films? But we do it anyway, because it's fun, not because it's useful ;)

For instance, people often take IR photographs because it gives "unreal colors" that can result in an artistic effect. Plants tend to be very bright, because leaves reflect infrared light a lot.

In a similar vein, if you combine a GRGB photograph with a GCMY one, you should end up with very green plants (at least, I think the leaves' green is pretty much pure green), while other "green" things (such as the green printed by a - cough - CMYB printer) won't be green at all.

(What color will they be? Well, that depends on what you want to obtain. The only "logical" choice is green again, since that's the primary that our eyes sense.)

Generally speaking, you can create "false color" images that are, in a sense, more true color than any others, since you can tell colors that are composite apart from ones that are a pure wavelength.


The software/technical challenge would be to write a program that aligns two such raw images from the two types of cameras (much like the hundred image stacking applications there are around, except it much load BRGB and GCMY rasters directly) and then lets you decide how to filter your wavelengths.
It could probably also be done with a vanilla image alignment program, if you let the cameras also produce JPEGs and the program is able to give you a numeric measure of the misalignment; then you can align the raws manually using that data. Or you can do purely manual alignment.
You still need something convenient that lets you choose how to combine the colors, but that's easy.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: DIY spectroscopic analysis
« Reply #3 on: 11 / July / 2008, 08:57:07 »
okay now i understand. there is supposed to be a website with sample raw photos of hundreds of cameras. you could fiddle around with these images when they have some from the gcmy kind :)


 

Related Topics