Initial Publication Date: May 6, 2012

Week 2: Analyzing Change Over Time

top of page

Getting to Know Measuring in ImageJ

Small Color Landsat Photo of Lake Mead May 2004 with scale bar

In the Intro to ImageJ section, you learned that a digital image is a string of numbers, displayed in a rectangular array, according to a lookup table. You also learned about the three dimensions of an image width, height, and bit depth. The power of image processing is its ability to make measurements in these dimensions:

Spatial measurements Measurements of distance, area, and volume. These involve the first two dimensions of the image, its width and height.

Density measurements Measurements involving the third dimension, the pixel values. Pixel values can represent temperature, elevation, salinity, population density, or virtually any phenomenon you can quantify.

Before you can make meaningful measurements, you need to calibrate the image that is, "tell" the software what a pixel represents in real-world terms of size or distance (spatial calibration), in terms of what the pixel values mean (density calibration), or both. In this section, you will learn how to spatially calibrate digital images.

  • 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).
  • Choose File > Open..., navigate to your Week 2 folder or directory, and open the lake_mead_2004_color.jpg image that you downloaded in the Intro to ImageJ section.

This image is a Landsat view of Lake Mead, Nevada, taken in May 2004.

Spatially calibrating an image is commonly called setting the scale, and an image that has a scale set so that distances and areas are in units other than pixels is called a spatially calibrated image.
top of page

Select What You Want to Measure

ImageJ can collect a number of measurements for you. Before you begin setting a scale and making measurements you need to decide on your measurement options.

  1. Choose Analyze > Set Measurements....
  2. The Set Measurements window opens. Check Area and Perimeter (length) to collect those measurements. Then click OK.

    Analyse set measurements lgr


top of page

Find the Image Scale

If you measure distances or areas on a digital image, your results will be expressed in pixels and square pixels. ("Wait," you say, "Aren't all pixels square?" Actually, no. But that's a topic for another time...) If you want to measure image features in units like meters or square miles, you need to convert pixels to their equivalent "real world" units. You could do this yourself with a calculator, or you could have ImageJ do the work for you. ("Yesssssss!") Giving ImageJ the information it needs to convert from pixels to other units is called setting the scale.

To set the scale in ImageJ, you need to know what the scale is. Here are some ways you can find the scale of an image:

  • A scale bar is printed on the image.
  • There is a known distance in the image, such as the distance between two landmarks.
  • A written statement of scale exists, usually in the image documentation. In this case, the scale may also be called the image resolution. For example, if the image documentation says the resolution is 30 meters, then the scale is "1 pixel = 30 meters."
  • Copy the scale from another image of the same scale that has a scale bar or known distance in it.

top of page

Set a Scale Using an Existing Scale Bar

Someone was kind enough to put a scale bar on this Lake Mead image, so we'll use it to set the scale.

Small Color Landsat Photo of Lake Mead May 2004 with scale bar

  1. Use the straight line selection tool Straight line selection tool to drag out a line across the scale bar. Select Analyze > Set Scale... The Set Scale window opens. The distance you measured in pixels will be displayed. Enter 45 for the Known Distance and km or kilometers for the Unit of Length. To redo your line, click on the arrow tool, then re-click on the line selection tool. This effectively resets the tool.
  • Using the straight line selection tool Straight line selection tool , click on one end of the scale bar, drag to the other end of the scale bar, and click again. (Tip: If you hold down the shift key while selecting with this tool, it forces your selection to be perfectly horizontal.)

    straight line selection cropped
  • Choose Analyze > Set Scale....

    analyse set scale drop down
  • The Set Scale window opens. The distance you measured in pixels will be displayed. In this case, we got 261 pixels. Your mileage, er pixelage will vary, but it should be close to this. Enter 45 for the Known Distance and km or kilometers for the Unit of Length. For reference, the scale (in this case, 5.8 pixels per kilometer) is displayed at the bottom of the window. Then click OK.

    set scale drop down
 
Movie Icon

 
 
Movie Icon

top of page

Set a Scale Using a Known Distance

Some images don't have scale bars. However, if you know the distance between two landmarks that are easily visible in both images, then you can use that distance to set a scale. Good landmarks are clear, relatively small, as far apart as possible, and obvious. You can use any landmarks you want, but since we already know the distance, we'll use the two small islands we measured in the previous section.

  1. Download the image below by right-clicking (Win) or control-clicking (Mac) the link and saving the linked file to your Week 2 directory or folder.
    lake_mead_2004.tif (TIFF 2.9MB Jan27 10)
  2. Choose File > Open, navigate to your Week 2 folder, and open the lake_mead_2004.tif image.
    This satellite image is a larger version of the one you just worked with. It has a higher resolution which means that it contains more pixels, allowing us to see greater detail.
  3. Use the Straight Line selection tool Straight line selection tool to select the distance from one small island to the other.
  4. Choose Analyze > Set Scale....
  5. Enter 25.4 for the Known Distance and km for the Unit of Length. Compare the scale, in pixels per kilometer, to the scale of the smaller image.
  6. Now that you have a scale set on this image, zoom in to one of the small islands and measure across it. Being able to make this measurement demonstrates the value of high resolution images.
  7. Close the lake_mead_2004.tif image.

top of page

Set a Scale Using Image Resolution

 

Often you will have to learn more about an image so you can set the scale by directly entering the image resolution. You might find the resolution in a ReadMe file or in the image metadata. (Metadata is loosely defined as the data about the data). The resolution might be right there in the name of the file, or you might even get the resolution in a phone call to the person who provided the image to you. (As a last resort, of course!)

  1. Click the thumbnail image to the right to open the full size version of the lake_mead_250m.jpg image in a new window. Then right right-click (Win) or control-click (Mac) the full size image and choose File > Save Image As... and save it to your Week 2 directory or folder. Close the image window after you have downloaded its file.
    lake MEAD 250m
  2. Choose File > Open, navigate to your Week 2 folder, and open the lake_mead_250m.jpg image.
  3. Choose Analyze > Set Scale.... Enter the known resolution. In this case, the resolution is in the name of the image file 250m per pixel. Set the scale to 1 pixel equals 250 meters. Enter 1.0 for the Distance in pixels, 250 for the Known Distance, and meters for the Unit of Length. The reported scale is 0.004 pixels per meter, which is the same as 4 pixels per kilometer.
  4. Next, measure the distance between the same two islands. Compare your result with the result from the first image, the one with a scale bar.
  5. Your results should be about the same as the earlier measurements, 25400 m (25.4 km). However, since the resolution of this image is lower than the previous image, it's hard to tell exactly where the small islands are.


top of page

Add a Scale Bar

With the scale set, ImageJ can now print a scale bar on the images for you.

  1. Choose Analyze > Tools > Scale Bar... and enter the settings for your scale bar. The scale bar on the image updates automatically to show you the results of your changes.
  2. Choose File > Save As and save the file, with scale set and scale bars added, to your Week 2 folder, in TIFF format. This is important because other image formats do not store the scale information with the image. Remember the name of the file - you will need to open it in the next activity.

TIFF (Tagged Image File Format) is the only file format used by ImageJ that supports spatially calibrated images. In other words, if an image is spatially calibrated, the TIFF format saves the scale with the image so the image is already calibrated any time you open it. (JPG, GIF, PNG, and other formats you are familiar with don't save this information in the file.)

What are the tags in a Tagged Image File anyway?

 
top of page

Explore Image Scale and Measurement

Visit one or more of the Image Data sources listed below and look for an interesting image - particularly one that might fit into your curriculum. Look for an image that has a scale bar printed on it, a feature or landmarks of known distance, or descriptive information that tells you the scale or size of the image. Download the image to your Week 2 folder and use the techniques you learned here to set a scale for the image. If the image does not already have a scale bar, add one. Save your image with your scale bar added, if it did not originally have one, to your Week 2 folder.

Gateway to Astronaut Photography
The Landsat Image Gallery
MODIS Image Gallery
NASA Earth Observatory Image of the Day Collection (scale bars are on the preview images only - not full resolution)
NASA Earth Observations (NEO)
Image pairs from Earth Obervatory
Earth Observatory: World of Change
EarthKam Images for Investigation

 

Post the image you chose with a scale bar added, if it did not already have one to your discussion group in JPEG format, with an explanation of why you chose the image and what you would have your students do with it or how you would use it in your classroom.

Key point: If an image has not been spatially calibrated, as long as you know the spatial resolution or the distance between two landmarks on the image, you can set a scale.
 
top of page

 

Resources

top of page

Movies on This Page

How to download movies

  1. Click the link to go to the SERC media library listing for the movie. The record will open in a new window.
  2. On the SERC media library page, right-click (Win) or control-click (Mac) the link (below the movie on the Flash version pages) to download the movie file to your hard drive.

top of page

Flash video versions

Download this version to play on your computer. You'll need an appropriate movie player to view the file, such as Flash Player, Real Player (Mac / Win), or Adobe Media Player.

Movie Icon Set Scale Small

Movie Icon Measure Landmarks

top of page

iPod versions

Download this version to play on your iPod or iPhone.

Movie Icon Set Scale Small

Movie Icon Measure Landmarks


« Previous Page      Next Page »