Public Lab Research note

Engineered Histograms

by cfastie |

Image above: An infrablue photo from a little camera Jeff converted. The histograms of a bright area of tree foliage show that the red and blue channels are very similar, probably because they are recording lots of infrared light.

The infrablue photos from Jeff's current test CMOS camera are a challenge. The red and blue channels seem to be recording the same thing for vegetation, which is likely a lot of infrared light. With little difference between the red and blue channels, NDVI calculations will yield very low values. An example of the type of histogram we want is below for one of Brenden's recent test shots. The red, green, and blue histograms are well separated. This photo yields a biologically meaningful NDVI image.


Upper: An infrablue photo taken by Brenden with an A490 with an Apollo 4400 filter, and the histograms of the lawn. Lower: The resulting NDVI image and histogram of values for the lawn.

The histograms of Jeff's infrablue photo can be manipulated in Photoshop with the color balance tool to resemble the histogram of Brenden's infrablue photo. But the resulting NDVI does not show the desired pattern with higher values for vegetation than for buildings. In fact, the building has higher values than the plants, I guess because the Photoshop manipulations did the same thing to the building pixels as to the plant pixels. It looks like you have to start with an infrablue photo that has a particular type of difference between plant and non plant parts of the scene.


Upper: Jeff's infrablue photo after the histogram was tugged around in Photoshop. The histogram is for the selected area of tree top foliage. Lower: The resulting NDVI image and histogram of the tree top foliage. The building is still growing faster than the tree.

near-infrared-camera ndvi infrared infragram infrablue tests

response:8190 response:8261 response:8353


where might I find files for this, I am needing it to create data for a science project, I would also like to keep in contact via email or other means

The only files used here are the photos themselves. You can right click and "open in new tab" and then "save image as" to get these images.

im talking about the histogram for the infrablue, so I can make a histogram from an image

The histograms were made with Fiji:

Ey @plndestroyer you can find some Fiji (ImageJ) video tutorials here ;)

alright thanks guys, I will try it

@cfastie did you use a plugin to get the color histogram for the ndvi, because I am creating ndvi images from infrared but I need a histogram from that

I used Fiji (ImageJ) to make the histograms of the NDVI images. Fiji will make a couple of different kinds.

where can I find how to do so, I looked through the tutorials and did not find anything on making custom histograms, I am able to make a b&w histogram but I need to make it so that is makes a histogram for ndvi values/colors

Fiji made that histogram of the color NDVI image. The NDVI image is not an RGB color image (it is a single channel image with a color look up table applied), so you can't use "Color Histogram" under "Analyze." Use "Histogram" and it will make a histogram of the values between 0 and 255. Use the cursor to marquee an area in the image and click "Live" in the Histogram window.

Ah okay got you, I was ultra confused,but how would that work, since its only putting the values on the histogram as just the brightness of the pixels, did you make the color lookup specifically for that, sorry for all the questions but im a noob!

What Fiji does is a bit confusing. In a normal histogram the x-axis is brightness so 0 (at the left end) is black and 255 (at the right end) is maximum brightness. When you make an NDVI image with the Photo Monitoring plugin and apply a color look up table (LUT), the NDVI values (-1 to +1) are converted to values between 0 and 255 and then a color is assigned to each of those 256 values. The colors are determined by the LUT. So the histogram shows how many pixels (y-axis) had each of the 256 values (x-axis).

okay, yeah I understand it way better now, I just need to figure out how to get the LUT on it, that was my main confusion, well and still is a bit, just trying to play around to get it

Okay I have everything ready to go but I have to ask you for the LUT file that you are using for your image then I'm set!

The lut file for use in Fiji is available for download here:

In a comment to that note, there is a txt file version of the lut.

the file in that one shows a different Lut than the one you are using in these images

Oh, you're right. The older lut used in the images above can be found here:

You must be logged in to comment.