Initial Publication Date: July 11, 2011

Part 2: Density Calibration and Measurement2

Explore Ocean Data with ImageJ

Download MODIS sea surface temperature (SST) data from NEO

  1. Click here to go to the NEO Web site.
  2. In NEO, below the map, click the Ocean tab.
  3. In the Ocean Datasets list, choose the Sea Surface Temperature (MODIS) dataset.
  4. Click the dark blue About this dataset link and read more about the MODIS Sea Surface Temperature images.
  5. Close the About this dataset window when you finish reading the description.
  6. Scroll down the page until you see the Next button at the bottom of the Search Results box. Click the Next button to display the next group of images.
  7. Click the + box in front of the September 1, 2008 to October 1, 2008 result to expand it.
  8. Click the View link.
  9. In the Download Options box:
    • Change the Full option to Resize.
    • Set the image format to GeoTIFF.
    • Select a fixed resolution of 0.25 degrees per pixel.
    • Click the Get Image button to download the file. A rendered image opens in a new window.On a PC, right-click on the image and on a Mac, control-click on the image to download and save it. Do not change the file format, keeping the image as a GeoTiff.
If you have difficulty downloading the September 2008 SST image file from NEO, download and use this one instead. Right-click (Win) or control-click (Mac) the link below and download it to your Day 3 folder or directory:

September 2008 SST GeoTIFF (TIFF 1020kB May7 10)

Density calibration in ImageJ


In Part 1, you learned how to spatially calibrate an image. In a spatially calibrated image, distances and areas in pixels are converted to real-world units of measure, like kilometers and square kilometers.

In Part 2, you'll learn how to density calibrate an image. In density calibrated images, pixel values are converted to real world measures such as reflectance, temperature, Dobson units, or whatever the detector was designed to measure.

  1. Launch ImageJ by double-clicking its icon ImageJ Icon Small on your desktop or by clicking its icon in the dock (Mac) or Launch Bar (Win).
  2. Open the September 2008 Sea Surface Temperature (SST) image you downloaded in ImageJ. It should look like this.
  3. Move your cursor around over the image, looking at the pixel values in different areas. What pixel value represents land? What value represents missing data?

Where do calibration values come from?


To density calibrate a digital image, you need to have at least two known measurements and their corresponding pixel values. You also need to know the mathematical relationship between the twois it linear? polynomial? exponential? With sea surface temperature, this translates into "What do you have to do, mathematically, to change a pixel value into a temperature value?" You also need to know the units of measure. Is the temperature reported in degrees Fahrenheit or degrees Celsius?

In a perfect world, this information would always be provided in a standard format. However, in the real world, you need to get the calibration information any way you can. The information is out there somewhere, but you can't always easily find it. Don't let that stop you from trying!

In this case, we will look at the legend below the preview image in the NEO interface. For the SST images, it's always the same, and looks like this:

Note that the units are degrees Celsius, and only two values are shown. The minimum temperature is -2 degrees and the maximum temperature is 45 degrees. Since only two values are shown, we are going to assume that the relationship between pixel values and degrees Celsius is linear. That means that we can change pixel values to degrees by simply multiplying the pixel value by a constant and adding another constant.

We'll assume that the lowest possible pixel value represents the lowest possible temperature, so a pixel with a value of 0 represents a temperature of -2 degrees Celsius.

We'll also assume that the highest possible pixel value (except for the Land / No Data value of 255) represents the highest possible temperature. In other words, a pixel value of 254 represents a temperature of 45 degrees Celsius.

Calibration information can also be provided by a mathematical formula or through descriptive text. In an image where pixel value represents elevation, you might get your calibration informationthe elevations of two known locations in the scenefrom Google Earth or a topographic map. Like spatial calibration, density calibration often involves a lot of detective work and intuition or "educated guessing."


Now you will use this information to calibrate the SST image.

  1. In ImageJ, choose Analyze > Calibrate.
  2. In the Calibrate dialog box, the left column is for entering pixel values and the right column is for entering the calibrated values or known measurements.
  3. Set up the Calibrate dialog box as follows:
    • In the left column, enter 0 (zero), press return, then enter 254.
    • In the right column, enter -2, press return, then enter 45.
    • For the units, enter C or Degrees Celsius.
    • From the Function menu, choose Straight Line
    • Click OK. A Calibration Function window appears.
  4. Close the Calibration Function window.
  5. The image is now density calibrated! Mouse around the image, reading the calibrated values from ImageJ status bar.
  6. Save your calibrated September 2008 SST image to your Day 3 folder as a .tif image.
  7. In case you have trouble with the calibration process, here's a calibrated version of the September 2008 SST file to download open and look at in ImageJ. Calibrated Sept 2008 SST (TIFF 1014kB May8 10)

Analyze Density Calibrated Images in ImageJ


Now that you have a calibrated image, let's take a brief look at some of the tools provided by ImageJ to analyze the image.


Choosing which measurements to make


Before starting any analysis in ImageJ, you need to choose which measurements you will make.

  1. Choose Analyze > Set Measurements to open the Set Measurements window.
  2. Turn on the following measurements: (Turn off the others.)
    • Area
    • Standard Deviation
    • Min & Max Gray Value
    • Mean Gray Value
    • Modal Gray Value
    • Median
  3. Close the Set Measurements window.

Making simple measurements


  1. Use any of ImageJ's selection toolsrectangle, ellipse, polygon, freehand area, or lineto select a region to measure. We used the Freehand Area selection tool to select part of the Indian Ocean.
  2. Choose Analyze > Measure.
  3. ImageJ will display the measurement results in the Results window. Distances and areas are in pixels and square pixels, other measurements are in degrees Celsius.
  4. Close the Results window. Don't save your measurements.
  5. Choose Edit > Selection > Select None to remove the selection you made.



A quick way to analyze all of the data in an image is to create a histogram. A histogram is a graph that shows the frequency (the number of pixels) of each value. The Histogram window also includes basic statistical values, such as mean, median, and modein calibrated units, if the image has been density calibrated.

  1. Choose Analyze > Histogram.
    Unfortunately, the statistics for the whole image are skewed by the large number of black (land or no data) pixels. To get around this, you can also create a histogram from the pixels in a selected area.
  2. Here's another handy trick. To restore the most recent selection (in this case, the one you removed at the end of the previous section), choose Edit > Selection > Restore Selection.
  3. Choose Analyze > Histogram again.
    You can see that the histogram and statistics now reflect only the data in the selected area.
  4. Close the Histogram window.

A related techniquesaving a region of interest (ROI)


What if we wanted to measure exactly the same area (called a Region of Interest, or ROI) on many images, especially on different days. You can save a selection as a region of interest (.roi) file in ImageJ.

  1. Use any of the selection tools to make a selection (a ROI) on the image.
  2. Choose File > Save As > Selection and save the file with an appropriate name into your Day 3 folder or directory.
  3. Use a selection tool to make a different selection on the image. You could restore your previous selection, but what if you needed to restore a selection you made two months ago?

  4. Choose File > Open and navigate to the .roi file you saved and open it. Your saved selection should be restored. This technique is invaluable for making identical measurements over long periods of times, with different students, and many images. 

Create density profile plots


A density profile plot shows how a quantity varies along a path.

  1. Use the Straight Line Selection tool to make a roughly north-south line selection through an ocean.
  2. Choose Analyze > Plot Profile. A profile plot window will open.
  3. Close the profile plot window.

CautionDensity profile plots can be misleading! A density profile plot shows changes in whatever quantity the pixels represent. If the pixels represent elevation, the density profile represents a topographic profile. However, if the pixel values represent temperature, the density profile is a temperature profile. A profile plot across an uncalibrated satellite image gives you a relative brightness profile. A common error is making a density profile across a satellite image of the Grand Canyon and assuming that the plot represents the topography of the canyon. You have been warned!


Add a calibration bar to an image


In Part 1, you learned how to spatially calibrate and add a scale bar to an image. You can also add a density calibration bar, or legend, to an image.

  1. Cancel your line selection.
  2. Choose Analyze > Tools > Calibration Bar.
  3. ImageJ creates a copy of the current image window and opens the Calibration Bar dialog box. In the Calibration Bar dialog box, enter your settings. Feel free to experiment. As long as you don't click the OK button, you can change any of the calibration bar properties.
  4. When you are satisfied with the settings, click the OK button.

Note: To density calibrate an image, it must be an 8-bit color or grayscale image. Notice that the new image with the calibration bar is an RGB color image. The moral of this story? You can density calibrate an image or you can print a calibration bar on it, but you can't have both at the same timeat least not this way!

Your Assignment: Density Calibrate an Image


This section is kind of a test to see if you can apply what you've learned on this page, but with a new wrinkle. Your task is to locate and download the September 2008 MODIS Chlorophyll Concentration image in NEO, then to density calibrate it. The new wrinkle is that the range of Chlorophyll Concentration values is so broadranging from about 0.015 milligrams per cubic meter (mg/m3) to around 64 mg/m3that a linear calibration would not show much color variation on the map.

  1. Using the NEO data tool, follow the same steps you used to locate and preview the SST image to find and preview the September 2008 MODIS Chlorophyll Concentration image.
  2. Download the chlorophyll image from NEO as a GeoTIFF, at 0.25 degrees per pixel (1440 x 720).
  3. If you have trouble downloading the image, here it is. September 2008 Chlorophyll (TIFF 1020kB May8 10)
  4. Open the chlorophyll image in ImageJ.
  5. Mouse over the land and no data areas and note that these pixels have a value of 255.
  6. Choose Analyze > Calibrate and enter the calibration values: (Remember, the list of pixel values goes on the left, and the list of corresponding calibration values goes in the right column.)
    • 0 = 0.015
    • 254 = 64
    • Function = Exponential
    • Unit = mg/m3
  7. Click OK to calibrate the image.
  8. Close the Calibration Function window.
  9. Mouse around the image and read the calibrated values.
  10. Practice making a few measurements on the density calibrated image.
  11. Save the calibrated image.
  12. Go to the Part 2: Share and Discuss page and post the image to demonstrate that you can density calibrate an image.


1Adapted from Earth Exploration Toolbook chapter instructions under Creative Commons license Attribution-NonCommercial-ShareAlike 1.0.
2Adapted from Eyes in the Sky II online course materials, Copyright 2010, TERC. All rights reserved.
3New material developed for Earth Analysis Techniques, Copyright 2011, TERC. All rights reserved.