Public Lab Research note


Engineered Histograms

by cfastie | June 21, 2013 22:04 21 Jun 22:04 | #8358 | #8358

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.

A490_4400_NDVI_histos.jpg

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.

907_CB_NDVI_histos.jpg

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.


17 Comments

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

Reply to this comment...


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.

Reply to this comment...


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

Reply to this comment...


The histograms were made with Fiji: http://imagej.net/Fiji/Downloads

Reply to this comment...


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

https://publiclab.org/notes/xose/12-06-2016/afloss-collection-of-tutorials

Reply to this comment...


alright thanks guys, I will try it

Reply to this comment...


@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

Reply to this comment...


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

Reply to this comment...


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

Reply to this comment...


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.

Reply to this comment...


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!

Reply to this comment...


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

Reply to this comment...


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

Reply to this comment...


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!

Reply to this comment...


The lut file for use in Fiji is available for download here: https://publiclab.org/notes/cfastie/08-26-2014/new-ndvi-colormap

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

Reply to this comment...


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

Reply to this comment...


Oh, you're right. The older lut used in the images above can be found here: https://publiclab.org/wiki/photo-monitoring-plugin

Reply to this comment...


Login to comment.