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.

10 thoughts on “Hyperspectral Imaging With A DSLR

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

      1. They indicate that the calibration method can compensate for non-visual band edges to a degree. Most CCD’s have a IR block filter built in to help with focusing and false light intensity readings and the UV probably cuts off fairly fast also but I would guess you might squeeze out 100 nanometers or more at the band edges depending on the lighting used.

  2. This is really cool!
    I wonder if this can be miniaturized and automated suitably to take all the exposures fast enough to stabilize the image in a point-and shoot camera…
    Tricorder. anyone?

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