process

Camera Modification

The first step towards DIY near infrared photography is modifying a camera. The conversion processes, or at least a list of successful modifications for a number of cheaply available cameras are documented on this page. The modification is a relatively simple one, but none-the-less involves risk. If done incorrectly, the camera can cease to function. The goal is to remove a filter on the inside section of the lens which blocks IR light from reaching the CCD (Charged-Couple device or essentially the camera light sensor).

This is the video that we used as a basis for our process:

IMG_20140201_144207372IMG_20140201_144117257IMG_0935

Here we are, modifying our cameras in Tech’s GVU lab.

IMG_20140201_150932942_HDR

Kristjen successfully removes the IR blocker from his camera. If you intend on returning your camera to normal operations, try not to touch the IR blocker with your fingers! Fingerprints will effect the bending of light and alter the look of your photos.

IMG_20140201_145224072

Beth tests the camera before complete reassembly.

We modified three cameras in total – two Canon A495s, which allowed us to follow the video step-by-step, and one Canon a810, which is listed on the PLOTS page, but which has no how-to video. We created a tutorial for the A810 on Instructables that shows the step-by-step process as well as potential difficulties.

For our trials, we used four cameras with varying methods of NIR photography in hopes of determining the best method, or at least pros and cons of each:

  • an unmodified point-and-shoot camera (control)
  • a camera with IR-blocking filter removed
  • a camera with IR-blocking filter removed and “infrablue” or “NGB” filter added
  • a camera with IR-blocking filter removed and exposed negative color film added

Produce Photography

We obtained produce from four grocery stores in various neighborhoods of Atlanta, hoping to see a variation in plant health through NIR photography based on the location they were purchased in the city — this would hypothetically be due to average income within the vicinity of the stores:

  • Wal-Mart in Vine City
  • Publix in Buckhead
  • Your Dekalb Farmer’s Market in Decatur
  • Kroger in Buckhead

The produce was purchased and gathered on the same day to ensure as normative of a sample as possible. A lightbox was constructed in order to control the amount of light on the produce so that there would be as little variation from day to day as possible. A tutorial for building the lightbox with household items was created and placed on Instructables as well.

KristjenPlacingBroccoli

Kristjen places broccoli in the lightbox on day 1

The intention was to create 5 days worth of images with each of the four cameras and have them all be framed, lit, and positioned the same from day to day. For these reasons, photos were taken at roughly the same time each day, as we had no lighting equipment and had to instead rely on natural light, and a tripod was set up. Unfortunately, the tripod did not function correctly and couldn’t be used. The amount of produce was often too large to fit in the lightbox, and placement varied from day to day due to the constant necessity of produce swapping.

IMG_0927

Taking photographs of the produce. Kristjen was resting the camera on the tripod to try and remain consistent with angle and framing.

cillantrogridd2grid

An example of a day’s cilantro photos with each method labeled.

NDVI Science

PLOTS has a great wiki page that goes in-depth on the science behind NDVI photography. What follows is a brief summary along with how we used the this knowledge in our project.

The light spectrum that cameras are sensitive to is roughly broken down into these categories (from lowest wavelength to highest): blue, green, red, infrared. When light hits a healthy plant, green and infrared light are reflected back.

reflectir

Normally, cameras have an IR-blocker that stops infrared light from being recorded. Removing this blocker allows the infrared light to be recorded, but because the light is converted into a digital signal of only red, green, and blue light, the IR is perceived as extra red light (tinting IR reflective materials as red).

ndviformula

NDVI is an index that was devised to measure plant health with camera data. Because plants theoretically absorb blue and red light equally fully, we can substitute blue for red with similar results.

In order to calculate the NDVI we need infrared data and blue data. There are three main methods to get this data:

  1. Infrablue photography. By removing the IR-blocker from a camera and using a special blue filter that blocks all red light, we can measure IR light in the red channel of an image (the blue channel remains unchanged). The main advantage of this method is that it allows you to use a single image to create an NDVI image.
  2. IR-blocker removed and control camera. Removing the IR-blocker from a camera adds the infrared light into the red channel of our image. If we take an additional “control” image with the blocker in place, we can subtract the two red channels to obtain the IR data. The blue channel can be taken from either picture.
  3. Exposed film and control camera. An alternate way of retrieving IR data from a camera is taking a camera without an IR-blocker and using a piece of exposed film as a filter. This film blocks all visible light, so the resulting picture is purely infrared light. The blue data must come from the control picture.

This is why we chose to use the 4 cameras, so that we could experiment with different methods of obtaining NDVI images.

Post-Processing

Once we had the images of the produce and the science behind the NDVI process down, we could begin post-processing the images into NDVI. PLOTS has an easy to use tool, Infragram, which allows you to upload an infrablue image and get an NDVI image back, but it has some limitations that we needed to work around given the scope of our project.

In order to produce images using all of our cameras, we decided to develop our own plug-ins for GIMP. Not only did this give us the flexibility to tailor the calculations to our needs, it also allowed us to contribute back to PLOTS (only manual methods were previously available for GIMP).

gimp1gimp2

The plug-ins operate on a per-pixel basis, using the previously described methods of calculating the NDVI value. This value is then used to index into a gradient similar to those used by Infragram (further development may include the use of custom gradients).

Some advantages of our plug-ins:

  • Offline. Can be used without an internet connection.
  • Arbitrary resolution. Your pictures can be any resolution, and the NDVI picture will maintain that resolution.
  • Multiple image processing. You can use both the “exposed film” and “no IR-blocker” methods to generate NDVI pictures.
  • GIMP compatible. You have access to the useful image editing tools included, which can aid in aligning pictures

To download the plug-ins and learn how to use them, head over to our contributions page.

Continue onto our data.

Advertisements