Hyperspectral Imaging With A DSLR

spectral

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.

7 thoughts on “Hyperspectral Imaging With A DSLR

  1. 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.

  2. 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?

    1. 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.

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

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