Extract source spectrum from JPEG?

Discussion in 'Digital Photography' started by David M. Wood, Nov 30, 2004.

  1. Howdy all!

    To what extent is it possible to extract the `spectrum' of a light source
    from, e.g., a digital camera JPEG, with existing freely-distributed software,
    such as the Gimp? Can someone point me to such a tool?
    (I've googled this group's archives but found nothing specific.)

    EG: I'd like to demonstrate that the newish green traffic lights
    using GaN-based semiconductors are more spectrally pure than the old
    incandescent light/filter combinations they replace. I intend to
    (i) deliberately defocus the camera, (ii) photograph each light source
    (iii) identify the spectral intensity of each light source and compare.

    Of course, this is vaguely what we are doing each time we *take*
    a digital photograph: from an unknown subject taken through 3 different
    color filters, we let the camera firmware reconstitute the full
    color content of the original scene. The only difference is that I
    want explicit information about the relative abundances of each spectral
    color in the form of a continuous spectrum, ranging over the visible spectrum.
    The R, G, and B intensity curves are only slightly useful, alas, and of
    course the DETAILS of the spectral intensity probably require knowledge
    of the details of the CCDs used to acquire the image...

    Many thanks!
    David M. Wood, Nov 30, 2004
    1. Advertisements

  2. David M. Wood

    Martin Brown Guest

    Not a price. The only way to do it is to photograph the spectrum of the
    light diffracted off a grating or refracted through a prism. Shovelware
    CDs (use an aluminium one) provide cheap reflection diffraction
    gratings. Or you could buy a Cokin 2 point spectrum star filter.
    The only way to do that is separate the light by wavelength before it
    hits the sensor. Examples on streetlamps at:


    Conventional coloured glass filters are very impure colourer light. LED
    technology is typically outputs most power in about 50nm bandwidth with
    a tail.

    Martin Brown
    Martin Brown, Nov 30, 2004
    1. Advertisements

  3. David M. Wood

    Bruce Murphy Guest

    In any more than a trivial sense, impossible.
    You're missing the point here. This isn't going to work.
    There are not '3 different spectral colours'. Visible light lives in
    about a 300+nm wide band. A 'spectrally pure' light source is going to
    be less than 1nm wide.

    Now, break that 350-odd nm into three slightly overlapping chunks,
    convolve an odd hump over each one and tell me precisely how you think
    you're going to make any useful observations about spectral purity
    with the final area-under-function integral numbers.

    If you want to do this, go and buy a spectrometer. They aren't
    particularly expensive and they'll do precisely what you want.

    Bruce Murphy, Nov 30, 2004
  4. David M. Wood

    Big Bill Guest

    David M. Wood wrote:
    This has *got* to be some governmental thing.
    Only governments could find a very complicated way to find out if a
    green light is green!
    How much simpler would it be to just put a few people in front of the
    light, and ask, "Does this look green to you?"
    The actual spectrum purity wouldn't matter. It would eithe rlook green
    or it wouldn't. yes, it could be altered by adding blue or yellow
    light, but that's easily done, too.
    Oh well, it's just my taxes. :)
    Big Bill, Nov 30, 2004
  5. David M. Wood

    RSD99 Guest

    Rent or borrow a spectrophotometer, and measure them directly.

    [Edmund Optics has one at a *relatively* low cost ...

    As "an aside" ... it's the "scientifically correct" way of doing this task,
    and it's probably the only way that "would stand up in court."

    RSD99, Nov 30, 2004
  6. David M. Wood

    Bruce Murphy Guest

    Governments or people with a clue, which you appear not to have.
    Since people perceive colour in a variety of ways, that's a stupid
    bloody idea. I know! let's fly in the face of many decades of colour
    Actually, the spectral purity *does* matter, particularly when you've
    got people with limit colour vision around who should not have
    suddenly unexpected results.

    Bruce Murphy, Dec 1, 2004
  7. David M. Wood

    Big Bill Guest

    That's why I said a *few* people.
    In a practical manner, I doubt that it matters that much.
    Using a *pure* color would mean that those with such problems would
    necessarily have problems; using a less pure color would spread the
    color spectrum wider, meanding more such people would be able to see
    the right color.
    If a persom has problems with one pure color, wouldn't making any
    light less pure mean a greater chance of that persom not having the
    Is a government not able to identify any of these people who have
    these problems, and put them in front of such a light?
    Just because something can be done in a hi-tech method doesn't make it
    Big Bill, Dec 1, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.