Eyes in the Sky II > GIT Web Course > Module 3 > Week 11 > Using ImageJ to Detect Change

Week 11: Using Satellite Data to Investigate Deforestation

top of page

Using ImageJ to Detect Change

amazon_deforestation_2009 Clearing of the Amazon rainforest in Rondonia in August of 2009.

Investigation questions:

  • How has deforestation in the Amazon rainforest changed over time?
  • What is the pattern of deforestation? Which areas were cleared first, later, and most recently?

One of the most deforested parts of the Amazon rainforest lies within the state of Rondonia in Brazil. The loss of the rainforest is primarily due to human activities such as raising crops and livestock. Unfortunately, although these activities have short-term benefits to people, over time, the loss of the rainforest can lead to the extinction of plants and animals as well as contribute to global climate change.

top of page

Download Images of Deforestation

Download three images of deforestation to your Week 11 folder or directory. These images show deforestation in the Amazon rainforest during the years 2001, 2005, and 2009.

  1. Click the thumbnail image below to open a full-size version in a separate window. Then right-click (Win) or control-click (Mac) the full-size image to choose File > Save Image As... and save it to your Week 11 folder. Close the image window after you have downloaded its file.
    • amazon_deforestation_2001 amazon_deforestation_2001.jpg
  2. Repeat the procedure for the 2005 image.
    • amazon_deforestation_2005 amazon_deforestation_2005.jpg
  3. Then repeat the procedure once more for the 2009 image.
    • amazon_deforestation_2009 amazon_deforestation_2009.jpg

top of page

Launch ImageJ and Import the Images as a Stack

  • 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).
  • Import the three images into ImageJ as a stack.
    1. Choose File > Import > Image Sequence...
      file import image 1
    2. Navigate to the folder where you stored the images and select the first one.
      file import image 2
    3. In the Sequence Options window that opens, set the Number of Images to 3, the Starting Image to 1, Increment by 1, do not scale the images, and make sure Sort Names Numerically is checked. Then click OK.
      file import image3

top of page

Animate and Explore the Stack to Observe Change Over Time

You can step through a stack one slice at a time, or you can animate it like a repeating movie loop.

  • Click and drag the scroll bar at the bottom of the stack window to move forward and backward through the stack. You can also use the Next Slice (>) and Previous Slice (<) keyboard shortcuts to move forward and backward through the stack.
  • Choose Image > Stacks > Start Animation [\] to watch the stack play as a movie.
    animate stack
  • Carefully observe the images in the stack. Notice the areas where trees have been cleared along with the position of smoke plumes.
  • Based on your observations, between which years do you think the greatest deforestation occurred?
  • In these images, it looks as if the greatest deforestation occurred between 2001 and 2005.
  • Set a scale for the images in the stack.
    1. Use the straight line selection tool to drag out a line across the scale bar in the lower left hand corner of any image in the stack.
      set scale measure
    2. Choose Analyze > Set Scale...
      analyze set scale
    3. A Set Scale window opens. The distance in pixels should be approximately 40. Set the Known Distance to 40 and the Unit of Length to km. Then click OK.
      set scale 1 40 pxl =40 km
  • Save the stack as Amazon.tif so that you can reopen a "clean" copy of it later.
top of page

Process the Stack for Analysis

  • Convert the color stack to 8-bit grayscale stack.
  • Make the stack binary.
    1. Choose Process > Binary > Make Binary.
      process stack make binary
    2. The Convert to Mask window opens. Make sure the Calculate Threshold for Each Image and Black Background boxes are checked. Then click OK.
      convert to mask dialog
  • This is what the stack looks like when converted to binary format. The cleared areas are white, while the forested areas are black.
    process stack make binary results
top of page

Measure the Area of Deforestation Each Year

  • Use the Threshold feature to highlight all the white pixels in red.
    1. Choose Image > Adjust > Threshold.
      image adjust threshold
    2. When the Threshold window opens, be sure that Dark background is checked. Adjust the threshold as needed so that all the white pixels are highlighted in red. When you are finished, do not click apply. Just close the threshold window.
      image adjust threshold dark background
  • Select the measurements that will be recorded in the Results window.
    1. Choose Analyze > Set Measurements.
      analyse set measurements
    2. The Set Measurements window opens. Make sure Area and Limit to Threshold are checked.
      analyse set measurements 2
  • Measure the area of deforestation on each slice of the stack (all three images).
    1. Choose Analyze > Measure.
      analyse measure
    2. The Results window opens. Notice that the area of the first slice is 53814 km squared.
      anlayse measure results 1
    3. Advance to the second slice in stack and repeat the procedure.
      analyse measure results 2
    4. Here is the Results window showing all three measurements.
      analyse measure results 3
    5. When you are finished, choose Image > Adjust > Threshold and click the Reset button
      image adjust threshold reset
top of page

Create an RGB Color Image from the Stack

  • Choose Image > Color > Stack to RGB.
    image color stack to RGB
top of page

Interpret Results

  • This what the resulting RGB color image looks like.
    image color results
  • Open up the Amazon.tif stack that you saved earlier. Compare the RGB color image with the stack of original images. Animate the stack as needed to help you understand the colors in the RGB image.
  • To understand what each color on this final image means, reexamine the figure below. Remember the concept of additive colors; red, green and blue are the three primary colors which together add up to make white.


  • Make the 3-slice binary stack active again by clicking on it. The deforested areas appear as bright white in each slice of the stack.
  • Arrange the binary stack and the RGB color image so that you can see both side by side.
  • The RGB color image you created is a combination of three individual images that are displayed in three primary colors. Notice that in the RGB image, the four most prominent colors are black, white, cyan and blue.
    Given how primary colors add together, what is your interpretation of what the colors mean on the RGB image?
    • Black means that these areas are dark on all the three images. Thus, black represents areas that are forested in 2001, 2005, and 2009.
    • White means that these areas are bright on all the three images. Thus, white represents roads that were developed prior to 2001 and that continued to exist through 2009 and possibly beyond.
    • Cyan, which is a combination of green and blue, represents areas that were dark (forested) in 2001, but were cleared between the time the 2001 and 2005 images were acquired. These areas are bright in 2005 and were assigned to the green channel and are also bright in 2009 and were assigned to the blue channel. Therefore, these areas show up as cyan in the RGB image.
    • Blue shows the most recently deforested areas. Because the 2009 image was assigned to the blue channel, blue in the RGB image shows areas where deforestation took place after the 2005 image was acquired.
top of page