Hyperspectral Imaging With A DSLR


It’s a relatively simple task to find evidence of helium by just looking at the sun; all you need is a prism, diffraction grating, and a web cam. DIY spectrometers have been around for ages, but most of them only produce a spectrum, not a full image complete with spectral data. Now it’s possible to take an image of an object, complete with that objects spectra using a DSLR, some lenses, a PVC pipe, and the same diffraction grating from your DIY interferometer.

The idea behind a hyperspectral imager is to gather the spectral data of each pixel of an image. The spectral data is then assembled into a 3D data cube, with two dimensions dedicated to the image, and the third dimension used to represent wavelength. There are a surprising number of applications for this technique, ranging from agriculture and medicine to some extremely creepy surveillance systems.

The authors of this paper (freakin’ huge PDF) used a piece of PVC pipe, three camera lenses, a diffraction grating, and a small paper aperture to construct their hyperspectral imager. Images are captured using a standard, multi exposure HDR method, assembling the raw data from the camera into a hyperspectral image with MATLAB.

There’s a ton of awesome info in the PDF, covering how the authors calibrated their system for different lighting conditions, interpreted the RGGB Bayer sensor in the camera, and a few examples of what kind of image can be constructed with this kind of data. That’s a recommended read, right there.

Thanks [Yannick] for the tip.


  1. S says:

    The paper PDF is 13 MB but only 10 pages long.

  2. BotherSaidPooh says:

    Another use for old otherwise junk DSLRs, a lot of the time even ones with CCD damage can be used by simply mapping out the bad pixels.

  3. Okian Warrior says:

    The paper is quite interesting – using a camera they can reproduce the accuracy of a commercial spectrometer (Ocean Optics HR4000), within the visual range of the camera sensor.

    The system can also take spectrographs of a 2-d image using a cross grating – a specialized grating that will refract in two directions at once. Sort of like two gratings at right angles to each other.

    Anyone know where a hobbyist can get a cross grating? Is it known by another name?

    • Quin says:

      Should be able to go beyond the visual range of light (haven’t read the paper yet, maybe they do). Most DSLRs have a visual spectrum bandpass glass in front of the sensor, and when it’s removed it allows the sensor to pick up any photon of enough energy. If they have a stable enough platform for HDR, they could possibly swap in a few other bandpass filters (>UV, UV only, visual, IR, <IR) and, with a bit of math in post, expand the spectrum.

      Works even better if you get a black&white only sensor, or if the Bayer layer isn't baked on. More filters, but lots more detail.

    • Michael says:

      If you look at the images they’re taking it looks like they’re really wasting a ton of pixels, unfortunately.

  4. Kris Lee says:

    It is amazing when two of my favorite sites have an article about the same topic at the same time http://www.gizmag.com/exelis-hyperspectral-imaging-explosive-chemical-detection/32093/

  5. schobi says:

    A nice idea – but this is really old news. Engadget had an article in 2011 with very much the same images http://www.engadget.com/2011/12/15/researchers-turn-a-dslr-into-hyperspectral-camera-using-pvc-and/

    This re-publication is sufficient for getting accepted into the EUROGRAPHICS conference?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,660 other followers