You are on page 1of 37

Hands-on Tutorial on How to Access and Work with

Remote Sensing Images Using ImageJ


Cyndy Erickson and Janet Campbell

Contents


I. Introduction to I mageJ
Launch ImageJ and examine Gulf of Maine satellite images downloaded from the
GoMOOS website. Become familiar with several tools and learn about the
different images available.

II. Activity One: The Year of the Ocean
Compare, stack, and animate monthly composite images of sea surface temperature
and chlorophyll in the Gulf of Maine.

III. Activity Two: Working with Real Satellite Data
Explore and calibrate digital satellite data in an image format. Determine the
temperature ranges within the Gulf Stream and over Georges Bank.

IV. Activity Three: How do the sea surface temperatures in an image compare to
the temperatures measured on GoMOOS buoys?
Overlay a map of buoy locations onto a sequence of SST images and extract the
SST at each buoy. Compare these with SST measured at GoMOOS buoys at the
time of the satellite overpass.

V. Activity Four: The Coccolithophore Caper
Import raw data and enhance the images to see a coccolithophore bloom in the
Gulf of Maine.

Appendices:

A. I mageJ Tools. Excerpts from ImageJ documentation describing the software and
different tools.

B. Keyboard Shortcuts. Excerpts from ImageJ documentation describing the
different keyboard shortcuts.

I-1
I. Introduction to ImageJ
From www.cooa.unh.edu/tutorial.html download "ImageJ for Windows" and the "Tutorial
and Data Files." During this session, we will be working with the Windows version of
ImageJ. After downloading the files, you will need to move the ImageJ_Win and ImageJ
Tutorial folder onto the desktop of your computer, and create a new folder on the desktop to
save images and other results created in ImageJ. Create a desktop folder and label it
Workshop Data. If the "ImageJ Win" and "Image J Tutorial" folders are still zipped,
you will need to double-click on them to decompress the files.
Open the ImageJ_Win folder and double-click on the ImageJ shortcut icon:
The following ImageJ window will appear containing a menu bar, tool bar, and status bar.
Move this window to the upper right corner of your screen so it will still be visible when
images are open. The tool bar contains tools for making selections, for zooming and
scrolling images, and for changing the drawing color. Click on a tool to display a
description of each in the status bar.
I-2

As you proceed through the remote sensing activities, you will be learning more about
the tools and their functions. Appendix A describes each of the tools in detail.


Opening and Exploring Satellite Images

From the File menu, select Open, and you will see a dialog box showing the folders on your
PC. Open the ImageJ_Tutorial folder and double-click on the GoMOOS_Images folder.
Now select any one of the images beginning with an n, and click Open.






These are sea surface temperature (SST) images acquired by one of NOAAs weather
satellites, and processed at the University of Maine. GoMOOS serves several SST images
each day. The format is always the same: the land is white, clouds and missing data are
black, and temperatures are color-coded according to the scale shown on the left side of the
image. The temperature scale is Celsius. The image shown here was a particularly good
one because there were few clouds. Can you explain the black area on the lower left corner
of the image?
I-3


The names of the images tell you something about their content:


Since Greenwich Meridian Time (GMT) is 5 hours ahead of Eastern Standard Time, this
image was acquired at 0408 EST, but day 152 is June 1
st
, and thus the local time would have
been 0508 EDT.

These SST images are based on infrared radiation emitted by the ocean surface, and thus
they can be sensed at night as well as during the day. Each of the NOAA satellites comes
over the Gulf of Maine twice a day, once during the night and again during the day. Later
we will examine the SeaWiFS images found in the GoMOOS Images folder. They are
examples of ocean color data which require sunlight, and thus the SeaWiFS images are
always collected during the day. But before exploring those images, lets take a closer look
at the SST image.

The Gulf Stream appears along the lower edge of the SST images as a warm meandering
body of water. Surface temperatures in the Gulf of Maine are generally cooler than those
elsewhere, and there are often cooler waters nearshore or over Georges Bank. Examine the
image you have opened to see if you can identify variations in the SST associated with
Georges Bank and the Gulf Stream.

Move your cursor over the image. Notice that information appears in the status bar
located beneath the tool bar. Specifically, you will see the x and y coordinates of the
cursor relative to the origin (x=0, y=0) located in the upper left corner. In some images, you
will see an 8-bit index ranging from 0 to 255, and the RGB values associated with the red,
green, and blue color intensities, respectively. The RGB values define the color of each
pixel. White pixels have an index of 0 and color values 255, 255, 255, indicating that all
three colors are set at their maximum intensity.

What are black pixels? Select pixels that appear blue and note the dominance of the blue
intensity. Do the same for red or orange pixels, and note the dominance of the red color.
How does the index change from blue (cold) to orange (warm) waters?

n12.01152.0908
NOAA-12
satellite
Year: 2001 Day: 152
Time: 0908 GMT
I-4
Select the magnifying glass located on the tool bar and click on the image.
Click several times to zoom in and look at pixels up close. As you continue to zoom, you
will see that the image becomes pixelated that is the individual picture elements
(known as pixels) appear as squares. The spatial resolution of this image is 1.1 km.
This means that each pixel covers an area of approximately one square kilometer. The
concept of spatial resolution is fundamental to all remote sensing, and varies from
satellite to satellite. You cannot resolve features in an image that are smaller than its
resolution. Land remote sensors have much finer spatial resolution (~30m) whereas a
resolution of ~1km is considered adequate for most oceanographic applications.

Unzoom using the same tool while holding down the Ctrl key. Try out several other tools.
(Hint: if you mess up the image, just go to the File menu and select Revert to recover the
original image.)

The next thing to note about this image is the information at the top directly beneath the
image name. On the SST image, you should see: 700x700 pixels; 8-bit color; 478K.
This image is 700x700 pixels, and most importantly each pixel in the image has an 8-bit
index (ranging from 0 to 255) which might be related quantitatively to the temperature at
that pixel. Fortunately, this is true of the SST images in the GoMOOS Images folder.
Later, we will delve into this subject and the differences among image types in more
detail. This is a very important aspect that determines what students will be able to do
with the satellite data. Take home message: If it says 8-bit color then the image might
actually contain real data!


SeaWiFS Images: Composites, Climatologies, and Anomalies

All SeaWiFS images downloaded from GoMOOS begin with seawifs and then have
information about the dates on which the data were collected. GoMOOS serves both 8-day
and monthly composite images. Composite images are formed by averaging all data for a
period of time (either 8 days or a month).

From the File/Open menu, select the image seawifs2001_153-160_GOM. The name tells
us that this is a Gulf of Maine image acquired in 2001 by averaging all data from days 153
to 160 (June 2 to June 9).

The SeaWiFS image you have opened depicts the surface ocean chlorophyll concentration
(CHL) in varying colors. The scale shown on the upper left is logarithmic with values
ranging from 0.1 mg m
-3
to 10 mg m
-3
. Note that Georges Bank stands out very clearly as a
region of high chlorophyll, whereas it was a region of cool surface temperatures in the SST
image acquired at approximately the same time of year. Likewise, the warm Gulf Stream
has very low CHL levels.

By comparing SST and CHL images acquired at the same time, it is possible to investigate
the relationship between SST and CHL in this region. Can you explain why there is often
an inverse relationship between CHL and SST?
I-5

























Some of the images served by GoMOOS are climatologies. These are derived by averaging
the satellite data over several years for the same dates. For example, the file in this folder
seawifs_clim_153-160_GOM corresponds to the same dates as the 2001 image, but it
shows the average chlorophyll on those days from 1997 to 2004. Finally, a third type of
image is an anomaly image which shows the difference between the measurement in a
specific year versus the climatological average. The SeaWiFS anomaly image for this
period is also found in the folder: seawifs_anom_153-160_2001_GOM.

Open both the climatology and anomaly images and consider what information is conveyed.

Compare the climatology image for the days 153-160 to the one from 2001 that you opened
first. How do they differ? Can you explain why they are different?

Now consider the anomaly image. Places where CHL was below average in 2001 appear in
shades of blue, while places where CHL was above average appear as shades of red. White
areas were average in 2001.

GoMOOS also serves SST climatology and anomaly images, allowing one to determine
whether SST was higher or lower than average in a given year.

I-6
I-7
Not all Images are Alike!

While the SeaWiFS images are still open, run your cursor over the images and look at the
information that appears in the status bar. You will see that the index is now missing.
Next, look at the information appearing under the image name. This information will be:
700x700 pixels; RGB; 1.9MB.

The physical dimensions of the CHL and SST images are the same (700x700 pixels), but the
CHL images are 3 times larger (if you compare their sizes in the folder).
1
The CHL images
have been stored as 3 data layers: one layer for each of the red, green, and blue intensities
defining the color of each pixel. ImageJ recognizes this RGB format, and displays the color
combination as a single 700x700 image. The number of possible colors in an RGB image is
256 x 256 x 256 = 16,777,216.

In contrast, the SST image data have been stored as one layer containing an 8-bit index for
each pixel, and there is a color lookup table (LUT) that tells ImageJ what RGB color
combination to use for each index. The number of possible colors is only 256!

But there is a much more important difference between these two types of images! The
index saved with the SST images is linearly related to the sea surface temperature. In
Activity Two you will learn how to calibrate these images, thus converting the 8-bit color
index to a temperature in degrees Celsius. Images in this format have less color resolution
but they are much more valuable in that they can be treated as real data for many
quantitatively analyses.

So far, your examination of the satellite images could have been done with any program
capable of displaying JPEG or GIF images. You have not really exploited the power of
ImageJ for performing quantitative analyses with satellite data.

The activities contained in the remainder of this tutorial will demonstrate several powerful
features of ImageJ, some of which require that the data be 8-bit color images.

1
The sizes shown on this line 478K and 1.9MB indicate 8-bit and 32-bit images, respectively, but the
actual sizes of the images are smaller. The RGB color images are, in fact, 3 times larger than the 8-bit
color images. You can split the RGB image into its 3 layer! Under Image/Color select Split RGB. Voila!
II-1
II. Activity One: The Year of the Ocean

Purpose: To compare, stack, and animate monthly composite images of sea surface
temperature and chlorophyll in the Gulf of Maine.

What you will need:

SST_03 Folder Twelve sea surface temperature (SST) monthly composite images from 2003.
Chl_03 Folder Twelve chlorophyll (Chl) monthly composite images from 2003.


Public domain Java image processing program inspired by NIH Image
for the Macintosh. Downloadable distributions are available for
Windows, Mac OS, Mac OS X and Linux.


Background

In the folder marked SST_03 are twelve images derived from data gathered in 2003 by an
Advanced Very High Resolution Radiometer (AVHRR) instrument aboard a National Oceanic
and Atmospheric Administration (NOAA) polar orbiting satellite. These images show the Gulf
of Maine, Nova Scotia in the upper right, and the coastal regions along New England. The
images were derived using data from thermal infrared (IR) bands and converted to a surface
temperature. Colors over water represent sea surface temperature (SST) in degrees Celsius
according to the color scale shown on the left of each image. These images have a spatial
resolution of ~1.1 km and were produced by averaging all the data available for a particular
month. Because weather is often cloudy or foggy over the Gulf of Maine, averaging produces an
image with more coverage than is possible on any given day. Such images are known as
composites. Monthly composite images are useful for monitoring the ocean on seasonal and
longer time scales.

In the folder marked Chl_03 are twelve composite images derived from data gathered in 2003
by the Sea-Viewing Wide Field of View Sensor (SeaWiFS) instrument aboard the Orbview
satellite. These images are the same resolution and cover the same area as the SST images.
Each of the images was produced by averaging all the data for a particular month. The colors
represent phytoplankton pigment concentrations -- or "chlorophyll" in mg per cubic meter in
surface waters according to the color scale shown on the left of each image. The reds and
oranges are the highest levels, and the green, blues and purples are progressively lower. Images
such as these allow us to estimate the amount of phytoplankton in the ocean -- and relate this
information to biological productivity of the waters and the rate of photosynthesis that is carried
out by the phytoplankton.



II-2

Opening the SST_03 Sequence of Images

To open a sequence of images, they all need to be the same size and type. The sea
surface temperature data that you will be opening are jpeg images downloaded from the
GoMOOS site. We have renamed them so that the months in 2003 appear alphabetically
from 01 through 12. In the menu bar go to File/Import and select Image
Sequence. A dialog box will appear. Open the SST_03 folder and double-click on
01mcsst_2003_jan_GOM.jpg which is the first image in the stack that you will be
developing.

A second dialog box will appear with sequence options. Make sure the settings are the
same as those indicated in the Sequence Options box below. Click OK. This dictates
how your stack will appear. Since the image files are numbered 0112, these files will
be stacked in chronological order.

Note: If your Options box specifies that there are 13 or more files, no need to worry.
The counter may be tallying invisible files in the folder. Change the number to 12!







II-3
Comparing the Images

The images have been imported into a stack similar to the one below. Notice at the top
of the stack, there is a 1/12. This indicates that you are looking at the first image in a
sequence of twelve. The image has been colored so that purple and blue represent the
lowest sea surface temperatures (SST), while orange and red represent the highest. The
land and clouds are white.




Click the left arrow at the bottom of the Stack window. This allows you to browse through the
sequence of images. The images and their corresponding information will change with each click
you make. You can also slide the bar at the bottom of the stack or tap the = key to manually
animate. As you travel through the year by viewing the images, notice the temperature changes
that occur in the Gulf of Maine.

Sequence to the July image and note how clearly you can see Georges Bank. It appears as a cool
thumb-shaped region east of Cape Cod. Nantucket Shoals is also visible as the cool area
southeast of Nantucket Island. Nantucket Shoals and Georges Bank are separated by the Great
South Channel, which appears in this images as a narrow pinch in the cool waters. Can you
explain why Georges Bank and Nantucket Shoals are cooler than surrounding waters?

Next, sequence through the other months. How does the temperature over Georges Bank vary
seasonally? What about temperatures in the Gulf Stream? over the Gulf of Maine basins?
II-4


Viewing All Twelve Images At One Time

In addition to viewing the images in a stack sequence, you can display them all on the screen
at once. This can be useful for visual comparisons. To do this, under Image select Stacks/Make
Montage. An option window will appear that allows you to place the images in a specific
number of rows and columns. Enter 4 for columns and 3 for rows. Make your selections and
click OK. The twelve images now appear in a new window as one image in a grid format.

Note: Keep the SST montage open, as you will need it later in this activity.


Animating the SST Stack

Animating the stack is another useful tool for visualizing the seasonal cycle of SST in the Gulf
of Maine. Click on the Stack window to make it active. To set the animation speed, select
Stacks/Animate Options under the Image menu. Check the Animation box and then OK to
start animation. To stop the animation, select Stacks/Stop Animation under the Image window.
Observe the seasonal changes of SST patterns in the Gulf.

The suns energy warms the surface waters and accounts for the general seasonal patterns seen in
this animation. However, incoming solar radiation is the same at all latitudes, but the surface
ocean apparently heats and cools at different rates along any given latitude (horizontal) line.
What other factors affect the spatial variability that you see in the SST patterns?

The stack can also be saved as a movie to your desktop. Under File in the Menu bar, go to
Save As/AVI and save as (SST_03.avi) in the Workshop Data folder. Note: The animation
speed needs to be set before you save the movie. This will save the stack of SST images as a
movie file that can be viewed using a Windows movie player. To launch the movie, double-click
on the SST_03.avi file. The movie player will then "flip" through the images in rapid
succession giving the sequence of images a sense of motion.

Exploring the Chl_03 Sequences of Images

In the Menu bar go to File/Import and select Image Sequence. A dialog box will appear.
Open the Chl_03 folder and double-click on 01seawifs_2003_jan. Follow the same opening
instructions as you did for launching the SST stack. Be sure the number of images is 12!

The first image of the Chl_03 stack will appear. The colored areas in the ocean represent the
average chlorophyll concentration in the surface waters during the month. Chlorophyll is the
pigment present in all photosynthetic plants, and in the ocean, it is found in phytoplankton. Thus
the chlorophyll concentration is a measure of the phytoplankton biomass. The chlorophyll
images have been colored so that purple and blue represent the least amount of chlorophyll,
while orange and red represent the greatest amount. Like the SST composite images, these
images were derived by averaging all data within each month.
II-5
Phytoplankton are single-celled algae that form the base of the food chain for entire ocean
ecosystems. These organisms are the primary producers of biomass upon which zooplankton,
fish, and other animals feed and depend for their existence. Browse through the sequence of Chl
images observing the seasonal cycle of ocean chlorophyll in the Gulf of Maine.

A rapid increase in chlorophyll is called a phytoplankton bloom. There is usually a spring bloom
in the Gulf of Maine, and sometimes a fall bloom. What conditions give rise to a bloom?
Remember that phytoplankton need nutrients and light in order to thrive.

Some areas of the Gulf of Maine seem to be productive (high in chlorophyll) all year around.
Where are these areas? Why do they remain productive?

Viewing All Twelve Images At One Time

View all the images in the Chl sequence by selecting Stacks/Make Montage from the Image
menu. In the option window that appears, enter the number 4 for columns and 3 for rows. Upon
clicking OK, the twelve images will appear side by side in a new window. Observe the seasonal
change of ocean chlorophyll.

If the SST stack that you made earlier is no longer open, in the menu bar go to File/Import in
the menu bar and select Image Sequence. Open the SST_03 folder and double-click on
01seawifs_2003_jan_GOM.jpg. View all the images in the SST sequence by selecting
Stacks/Make Montage from the Image menu. In the option window enter the number 4 for
columns and 3 for rows.

You now should have two montages: one showing the seasonal patterns of chlorophyll and the
other showing the seasonal patterns of sea surface temperature. In the Chl montage, notice the
intensity of the spring bloom in April. The central areas of the Gulf of Maine become low in
chlorophyll during the summer. Why is that? Then in the fall, there is often a second, less
dramatic bloom.

Do you see a fall bloom in this series of images? What causes the second bloom to occur? What
information might you derive by observing the SST data from the same month?


Combining and Animating the SST and Chl Stacks

Make sure you have both the SST and Chl stacks open. Save each of the stacks to your
workshop folder by clicking on Save (not Save as) and you will be given an opportunity to
name the stack. Note: The stack you are saving needs to be the active window. Under
Plugins in the Menu bar, go to Stacks/Stack Combiner. A window similar to this will
appear:

II-6



Here we have selected the Chl stack from the drop-down menu for Stack 1 and the SST
stack from the drop-down window for Stack 2. Of course, you can reverse these if you wish.
Click OK.

This will position the two stacks of images side by side as one stack. Animate the stack
and observe how seasonal changes of phytoplankton in the Gulf of Maine relate to SST patterns.
You can save this combined stack in the same folder as the separate stacks.

In the April images, note that there are several eddies in the lower right corner of the images.
The large ones are probably Gulf Stream meanders, but the small one (between 41 and 42
degrees latitude) has apparently detached itself from the Gulf Stream. Gulf Stream meanders
that pinch off from the Gulf Stream form rotating eddies or rings. If they are north of the Gulf
Stream, their centers are warmer than the surrounding ring, whereas rings that form south of the
Gulf Stream have cool centers. The small eddy shown here is known as a warm core ring.

Note the chlorophyll concentration in the center of the ring. Can you explain why the
chlorophyll level is low there?

Sequence through the months again. When did that eddy form? How long did it last?

Which way are the eddies rotating? In the April chlorophyll image, there appears to be a
streamer of high chlorophyll water being drawn around the eastern edge of one of the eddies.
This phenomenon will transport waters great distances far from their original locations. What
might be the consequences for animals found in these waters?

Further Investigations: Explore the other options under Image/Stack.
III-1
III. Activity Two: Working with SST satellite data

Purpose: Learn to calibrate the SST images obtained from GoMOOS to convert the
8-bit index to a temperature in degrees Celsius, and compare temperatures in
various regions in an image.

What you will need:

n16.03232.0700 Two satellite images of sea surface temperature (SST)
20Aug03_SST in the Gulf of Maine that appear to be identical.

Public domain Java image processing program inspired by NIH
Image for the Macintosh. Downloadable distributions are available
for Windows, Mac OS, Mac OS X and Linux.


Background

The images are GIF images (Graphics Interchange Format, a standard image format) that
can be displayed using ImageJ. The first is an image downloaded directly from the
GoMOOS website (selecting the version with a standard cloud mask), and is based on
infrared measurements made by an AVHRR instrument onboard the NOAA-16 satellite on
August 20, 2003. The AVHRRs (Advanced Very High Resolution Radiometers) are
onboard NOAA polar orbiting weather satellites. The second image 20Aug03_SST is
derived from the first but is different as you will see later. These images show the Gulf of
Maine, Nova Scotia in the upper right, and the coastal regions along New England.
Colors over water represent sea surface temperatures (SST) according to the color scales
shown on the left of the image. You can see warm waters of the Gulf Stream along the
lower portion of the image, and cool waters over Georges Bank.


Exploring and Calibrating the n16.03232.0700 Image

If you havent done so already, create a folder called Workshop Data on your desktop
so that any data that you create can be saved to this folder.
Launch ImageJ by double-clicking on the shortcut icon: Next, go to File/Open
and open n16.03232.0700 located in the Aug_2003_SST folder.
Select the magnifying glass located on the tool bar and click on the image. Try
zooming in and looking at pixels up close. A single zoom will enlarge the image to full
scale. Unzoom using the same tool while holding down the Ctrl key. Try out several
tools. (Hint: if you mess up the image, just Revert to original image from the File menu.)


III-2
Select the straight line selections tool and draw a line from a cool area to a warm
area. Note: If you need to change the color of the line, under the Edit menu select
Options/Colors and change the color for Selections. Then from the Analyze menu,
click on Plot Profile. Note: A short cut to Plot Profile is Ctrl-K.

A new window will appear with a plot that looks something like this:

The horizontal axis is the distance in pixels from the beginning of the line, and the
values plotted on the vertical axis are the gray value.
1


The gray value is the 8-bit index appearing in the status bar as you move your
cursor over the image. It is linearly related to the temperature. This line started in a cool
area. The temperature increased steadily at first along the line, but then the line passed
over another cool area before ending in much warmer waters.

Try repeating this several times for different lines or transects drawn through the image.
Use Ctrl-K as a quick way to create a plot.

Next, draw a vertical line through the color scale from the coldest temperature to the
warmest, and make a plot. (Hint: Hold the Shift key down as you trace the line, and the
line will be strictly vertical.) If you pass through any of the letters on the scale, the plot
will jump up to black (index = 255) or down to white (index = 0). If you draw a line that
doesnt hit any letter, your line will be a straight increasing line. This shows that as the
temperature increases, the index also increases linearly. In this case, distance along the
line represents variation in temperature along the scale.

You are now going to calibrate the image. Calibrating is the procedure whereby you tell
ImageJ the actual temperature in degrees Celsius associated with each gray value or
index.

1
If you dont see this window, look behind the image window. Sometimes it is hidden if you clicked on
the image window before the plot appeared.

III-3
You will need to determine the temperature associated with several (at least two) gray
values by using the color scale. Run the cursor over the color scale and observe the
index values appearing next to the temperatures shown. Estimate the index associated
with the temperatures 0, 6, 12, 18, and 24 C. Write these down.

From the Analyze menu select Calibrate. In the left-hand column of the Calibrate
window, enter the gray values, and in the right-hand column of the Calibrate window
enter the corresponding temperatures in degrees Celsius. Under None, select Straight
Line to choose a curve fitting method and then enter Celsius as the Unit. If you check
the Global Calibration box, then all 8-bit images you open during this session of ImageJ
will use this calibration. Save the calibration file for applying to the next image. Click
OK.

A Calibration Function window will appear showing the values of the pixels in the
image in relationship to degrees Celsius. This will be a line showing the linear relationship
between the digital index or pixel value and degrees Celsius. It should look like this:















Return to the image and draw another line similar to the first one. Select Plot Profile
from the Analyze menu (or Ctrl-K). Now the plot will show the temperatures along the
line you drew:













III-4
Now that the image has been calibrated, there are many statistical and quantitative
analyses that can be done. In the next section, you will learn some of them.

Histograms and Statistical Measurements

Select the rectangular selections tool and draw a box on the image. Then select
Histogram from the Analyze menu. A Histogram window will appear showing the
distribution of temperatures inside the box:

As you move the cursor over the
Histogram window, the value of the
temperature along the horizontal axis is
displayed, and the count or number of
pixels inside the box which have that
temperature are shown. Below the
histogram is a color scale corresponding
to colors in the image, and statistics are
also shown. In the example shown at the
left, the mean temperature in the box was
19 degrees Celsius, the standard
deviation was 3 degrees, the min and
max were 8 and 30 degrees, respectively.


Other statistics can be determined within a box or within any area described by a
polygon or the freehand selections tools.

Once an area is outlined, select Set Measurements under the Analyze menu. The Set
Measurements window will appear.



III-5

Different options can be selected to specify which measurements are recorded when
measuring and analyzing enclosed areas in an image. Choose some different options and
click OK.

Select Clear Results from the Analyze menu. Then select Measure from the Analyze menu.
A Results window will appear with the measurements requested in columns. This can be
repeated to measure other areas. If your image is calibrated, the values will be temperatures.

The crosshair tool can be used to measure temperatures at selected points in the
image. Double-click on this tool located on the tool bar. The following window will
appear:


Mark Width is the size of the crosshair. If you click on the image with this tool, a mark
will be left on the image showing where you clicked. If you set Mark Width to zero, no
marks are left, or marks can be cleared simply by reverting to the original image (click on
File/Revert).
To make a table of temperatures at selected points with the crosshair tool, first select
Measure from the Analyze menu. Clear Results if any values appear there. Then using the
crosshair tool, click several times on the image with the Results window open. A table of
temperature values will appear along with their horizontal (X) and vertical (Y) coordinates. If
needed, these measurements can be saved by clicking on the Results window and going to Save
As under the File menu. The saved measurements then can be imported into a spreadsheet.




III-6
Thresholding

Under the Image menu, select Adjust/Threshold. A Threshold window will appear on
your desktop which displays the histogram of the image. Sliders are located under the
histogram that interactively set the lower and upper threshold values of the image,
highlighting features of interest.














Using the sliders, adjust the upper and lower limits of the histogram until the red area
fits the Gulf Stream, making sure not to include more than just the range found there. The
numerical range of the threshold temperatures will appear on the right in the Threshold
window. Now that the image is calibrated, the values you see are temperature in Celsius.

1. What is the range of temperatures in the Gulf Stream?
2. What is the range of temperatures over Georges Bank?

How does the temperature over Georges Bank compare to temperatures in the waters
next to the Bank? Why is there this contrast?

Exploring other features of ImageJ

Under Image/Lookup Tables, try Grayscale and other Color Tables. Under LUT
options, select Invert. To return to the original image, select Revert from File menu.

Under Image select Surface Plot. Experiment with the different settings in the Surface
Plotter window. What information does the surface plot provide?


Exploring the 20Aug03_SST Image

Next, open the 20Aug03_SST image from the File menu of ImageJ. Dont close the
first image yet because you will need to compare the two images. At first glance, these
two images appear identical.

III-7
Select the straight line selections tool and draw a line from a cool area to a warm
area as you did with the first image. Then type Ctrl-K to plot values along the line. If the
scale is gray values then repeat the calibration using the saved calibration file. From the
Analyze menu select Calibrate. Open the saved calibration values and then under
None, select Straight Line and again enter Celsius as the Unit. If you checked the
Global Calibration box earlier, then this image will have automatically been calibrated.
Click OK.

Next, run the crosshair tool down the temperature scale on the 20Aug03_SST image.
What difference do you observe?

What is the range of temperatures in the Gulf Stream? What was the range of
temperatures in the first image? How are they different?

Under Image, select Colors/Show LUT. Do this for both images. Compare the two
look-up (LUT) tables. You will see that the digital values stored with the images are
entirely different.

In the Introduction chapter, we stated that 8-bit images might contain real data. But not
all 8-bit images do. The 20Aug03_SST image looks identical to the n16.03232.0700
image, but the index values are not related to temperature in the 20Aug03_SST image.
Unfortunately, many 8-bit JPEG or GIF images downloaded off websites are simply
graphics and do not allow the quantitative analyses that was possible with the
n16.03232.0700 image illustrated here. Fortunately, images downloaded from the
GoMOOS Sea Surface Temperature (standard cloud mask) site do contain real data!
2

They can be analyzed quantitatively. In Activity 3, you will learn how to extract
temperatures from these satellite images at GoMOOS buoy locations and compare them
with temperatures measured by the buoys at about the same time.


Further Investigations: From the GoMOOS site (www.gomoos.org/buoy/satellite.html)
download some of the other standard cloud mask images derived at the same time of
year as the n16.03232.0700 image. Download an image with the Enhanced cloud
mask and compare it with the standard cloud mask image.

2
The GoMOOS SST data with the Enhanced cloud mask are RGB images without real data! The
Enhanced cloud mask expands the standard cloud mask so that suspicious pixels on the edge of the
clouds are classified as clouds.
IV-1
IV. Activity Three: How do the sea surface temperatures in an image
compare to the temperatures measured on GoMOOS buoys?


Purpose: To validate the AVHRR temperatures by comparing them with
temperatures measured on the GoMOOS buoys.

What you will need:

GoMOOS_Buoy_Map Image showing the locations of GoMOOS buoys.
June_2004_stack Stack of SST images from June 2004 downloaded from
GoMOOS website (standard cloud mask). Both of these
may be found in a folder labeled June_2004_SST.

Public domain Java image processing program inspired by NIH Image
for the Macintosh. Downloadable distributions are available
for Windows, Mac OS, Mac OS X and Linux.



Background

GoMOOS_Buoy_Map is a black and white image showing the positions of the
GoMOOS buoys (A, B, C, E, F, I, J, K, L, M, N). The buoy locations are white pixels
surrounded by a black border and labeled with a letter. This map is the same size and
projection as the SST and CHL images that are served by GoMOOS.

June_2004_stack is a series of 7 SST images downloaded from the GoMOOS website
for several cloud-free days in June 2004. The stack was formed from individual days
according to the procedures described in Activity One. The stack and map are in a
folder called June_2004_SST and the individual images comprising the stack are in a
folder inside this folder.

Overlaying the Buoy Locations on the SST Images

First open June_2004_stack and sequence through the 7 images in the stack noting
the dates and times of the images. Note that they are all from the NOAA 12 satellite, but
their overpass times vary. You should also notice that these images have been calibrated
(How can you tell? Answer: the value in the status bar is the temperature in Celsius
followed by the corresponding digital number in parentheses). Now position the stack
at the beginning.

Next open the GoMOOS_Buoy_Map image using ImageJ. To determine the satellite-
derived SST at each buoy, you will first need to overlay this map on each of the SST
images in the stack. To do this, click on the map to make it active and select Copy
under the Edit menu. This automatically copies the content of the entire active image.
Click on the first SST image in the stack to make it active, and Edit/Paste the map on

IV-2
top of the selected SST image. As a result, you probably can no longer see the SST image
since youve pasted the map on top of it. But dont panic!

From the Edit menu select Paste Control. The Paste Control window will appear which
controls how the map image being pasted is transferred to the SST image.



In the Paste Control window switch the pop-up menu from Copy to Add. The pixel
values in the map image are now added to the SST image. Since the black pixel values in
the map image have a value of 255, adding these to the image values results in a value of
255 (black). The white pixels of the map are 0, and so adding these to the SST image has
no effect. The result is that only the black lines and buoy labels are now pasted onto the
SST image.

Repeat this same Paste command for each of the images in the stack. A quick way to do
this is to type Ctrl-V after sequencing to each image.

Measuring the Satellite-derived SST at Each Buoy

The next step is to measure the temperature at each buoy. You will need to zoom several
times to enlarge the box surrounding each buoy. Using the magnifying glass tool, click
on Buoy A about 5 or 6 times.

Next, double-click on the crosshair tool.

The following window will appear:




IV-3
Make sure the Mark Width is set to zero to disable marking. This is important so as not
to write over the buoy data inside the box.

Under Analyze, select Measure. If the Results window doesnt appear, go to the
Window menu and show Results. If necessary, Clear Results from the Analyze menu.
Now, using the crosshair tool, click on the pixel inside the box at Buoy A in the first
image of the sequence to measure the temperature at that location. You should see the X
and Y positions and the temperature appear in the Results window. If extraneous
measurements appear, Set Measurements from the Analyze menu, and select only the
mean gray value.

Sequence to the next image by clicking on the right arrow at the bottom of the stack (or
type > on the keyboard). Measure the temperature at Buoy A in the second image, and
continue sequencing and measuring the temperature in all the images. When you get to
the end of the stack, you will have a table of results numbered 1 through 7 with the
temperatures at Buoy A. The X and Y values should be the same for every point, and the
table should look like this:

While the Results window is active,
select File/Save as from the File
menu. Save the measurements as
Results_A. The output will be saved
as a tab-delimited text file which can be
opened in Excel. Or, it is easier to open
an Excel worksheet and copy the table
directly into Excel. The first column of
the spreadsheet should have the buoy
label (A) in every row, and then these 4
columns should be columns 2-5.


Clear results and then repeat this for other buoys, always starting with the first image in
the sequence. [Recommendation: For starters, we recommend that you only do buoys A,
B, C, L, and N, or a subset of these]. Put the buoy label (letter) in the first column of the
spreadsheet and then copy the Results into columns 2-5.

Accessing the GoMOOS Buoy Temperatures

The purpose of this exercise is to compare the satellite-derived SST values with surface
temperatures measured at the GoMOOS buoys. The buoys measure temperature at
various depths and every hour throughout the day. Thus, the first step will be to
determine the surface buoy measurement closest in time to the satellite overpass.

The satellite times shown on the images are GMT, whereas the GoMOOS buoy times are
EST. Thus, you need to subtract 5 hours from the GMT times to determine the nearest
GoMOOS measurement time.


IV-4
In the spreadsheet containing results, you should add columns for date and times (GMT
and EST) for each of the images (1, 2, , 7). The easiest way is to sort first by image
number (column B) and then by Buoy (column A). Then you can enter the information for
each image (date and times) and fill down for all buoys on that date.

For the remainder of this exercise, you should have access to the GoMOOS website:



The above figure shows the page you will see if you click on one of the buoys on the
Hourly Buoy Data page. The Massachusetts Bay buoy (Buoy A) was selected. Next,
you should click Select a history and you will see:









IV-5
Here the date of the first image has been entered, and the times bracketing the overpass.
Also, Water temp has been selected, and the Massachusetts Bay (A) buoy. The table at the
bottom of this figure shows the temperature measurements. Note that there is no value
shown for the surface temperature. In this case, you might choose the one nearest to the
surface (11.3 C) at 5 a.m. (the overpass being at 5:06 a.m. EST). It is now a simple
matter to change to another buoy using the Change buoy: drop-down menu. After
selecting each new buoy, then click on the Change Buoy button to see corresponding
values at the next buoy. By doing this (and its easiest just to write them on a piece of
scratch paper first), you can determine the sea surface (or near-surface) temperatures
measured at the buoys at the time of each satellite overpass. They can then be entered
into the speadsheet to make plots of satellite vs. buoy temperatures.

The figure on the next page shows a fancy Excel graph depicting a plot of the GoMOOS
buoy measurements plotted against the satellite measurements.





IV-6
What trends do you notice about this comparison? Which measurement do you think is
closest to being right -- the satellite or the buoys?

Can you think of reasons why the two should differ by about 1 degree Celsius?

Further Investigations: From the GoMOOS site (www.gomoos.org/buoy/satellite.html)
you can plot time series of SST measurements at the various buoys, and download the
data into a spreadsheet. After doing this for a month or more, download the SST data and
extract values at the same buoy and plot them on the buoy time series plot.
Satellite vs. Buoy SST (June 2004)
4.0
6.0
8.0
10.0
12.0
14.0
16.0
18.0
4.0 6.0 8.0 10.0 12.0 14.0 16.0 18.0
GoMOOS Buoy SST
S
a
t
e
l
l
i
t
e

S
S
T
Buoy A (20m)
Buoy B
Buoy C
Buoy L
Buoy N
1-1
V-1
V. Activity Four: The Coccolithophore Caper


Purpose: To learn how to import raw data and enhance gray-scale images to bring
out hidden features.

What you will need:

01C_Jun27_88 Raw image series of a coccolithophore
02C_Jun28_88 bloom occurring in the Gulf of Maine.
03C_Jul7_88
04C_Jul15_88


Public domain Java image processing program inspired by NIH Image
for the Macintosh. Downloadable distributions are available for
Windows, Mac OS, Mac OS X and Linux.


Background

Coccolithophores such as Emiliania huxleyi shown on
the right are marine phytoplankton, which are covered
with white calcite platelets called liths. From time to
time, these species will undergo extensive growth spurts,
called "blooms," in many of the world's oceans. When
coccolithophores bloom, they have a dramatic effect on
the color of the water. Large numbers of loose plates
suspended in the water reflect sunlight and give the water
a bright appearance that can be seen from space.

In the late spring and early summer of 1988 such a
coccolithophore bloom occurred within the Gulf of
Maine. The folder marked "Bloom" contains four images which detail the bloom
development from 27 June to 15 July. These raw images were collected from two
National Oceanic and Atmospheric Administration (NOAA) satellites each equipped with
a scanner called the Advanced Very High Resolution Radiometer (AVHRR.) The images
are 512 X 512 and are 8-bit.

Importing the Raw Images as a Stack

Launch ImageJ by double-clicking on the icon. Next, in the File menu select
Import/Raw. A dialog box will appear. Open the Bloom folder and double-click on
01C_Jun27_88. The following Import option box will appear:



Scanning electron
microscope image of
Emiliania huxleyi cell

V-2


You will need to specify the parameters for the image you are importing. Change the
pixel width and height to 512 x 512 and in the Image Type drop down menu, select
8 bit. Select the Little-Endian Byte Order box to indicate how the images are to be
imported. Make sure the Open All Files in Folder is selected then click OK. All of
the raw images in the Bloom folder are now opened as a stack.

Exploring and Enhancing the Images

Since the images are raw data, there is no look-up table (LUT) associated with them so
they are imported as grayscale images. The images show the Gulf of Maine from Cape
Cod to Nova Scotia, with the land areas and clouds black and the ocean areas in shades of
gray. Browse through the sequence of images. Notice that the images lack contrast and,
therefore show no detail of land areas, but also show little detail of the Gulf of Maine.
Enhancing the images will bring out details of the bloom.

The images are 8-bit images in which the values stored for ocean pixels relate to the
brightness or radiance detected by the AVHRR sensor. There is a land mask applied to
the images whereby all land pixels are assigned a value of 1. The land is outlined in white
(value = 254).

To see the range of brightness values in an image, select Histogram from the Analyze
menu. The shades of gray range from black to white as the image values range from 0 to
255. In the histograms, you will see that the pixel values are all crowded near the low
end. This is why the ocean appears nearly black everywhere.

The images can be enhanced as a stack or individually. Since the images have a similar
range of data, enhancing them as a stack is not only efficient but just as effective as
working with them individually.

V-3

To enhance the stack of images, select Adjust/Image Contrast under the Image menu.
Slide the different levers to emphasize the water features. The bloom will appear as a
bright swirl in the Gulf of Maine. As you experiment with the different enhancement
controls, browse through the stack to see what combination of brightness and contrast
best highlights the coccolithophore bloom.

When you are satisfied with the result, click on Apply to apply the LUT to all the slices
in the stack. Note that the digital values in the image have been changed. Experiment
with different LUTs to see which one best shows the coccolithophore bloom. Try some of
the other enhancement features under Adjust in the menu bar. When you have finished
experimenting, close the stack (but dont save).

Automatic Contrast Enhancement

Open the raw images again as a stack. In the File menu select Import/Raw, open the
Bloom folder and double-click on 01C_Jun27_88. As before, enter 512 X 512 for
pixel width and height and 8-bit for the Image Type. Check the Little-Endian
Byte Order and Open All Files in Folder boxes.

In the Process menu select Enhance Contrast.

The following enhance contrast box will appear:



Check the Equalize Histogram and Process Entire Stack boxes and click OK.
Voila! Select Analyze/ Histogram and observe the new histogram for the first image in
the stack.

Further Investigations: Look for a more recent coccolithophore bloom that might be
found on the GoMOOS site (www.gomoos.org/buoy/satellite.html).
A-1
Appendix A: Introduction to I mageJ
1


ImageJ is a public domain image processing program inspired by the popular NIH Image
software originally created for the Macintosh. It runs on any computer with a Java 1.1 or
later virtual machine. Downloadable distributions are available for Windows, Mac OS, Mac
OS X and Linux at: http://rsb.info.nih.gov/ij/download.html.

ImageJ can display, edit, analyze, process, save, and print 8-bit, 16-bit and 32-bit images. It
can read many image formats including TIFF, GIF, JPEG, BMP, DICOM, FITS, as well as
"raw" data. It supports "stacks," a series of images that share a single window, that can be
animated to show, for example, seasonal changes in satellite images.

It can calculate area and pixel value statistics of user-defined selections. It can measure
distances and angles, create density histograms and line plots. It supports standard image
processing functions such as contrast manipulation, sharpening, smoothing, edge detection,
and median filtering.

It does geometric transformations such as scaling, rotation and flips. Images can be zoomed
up to 32:1 and down to 1:32. All analysis and processing functions are available at any
magnification factor. The program supports any number of windows (images)
simultaneously, limited only by available memory. Spatial calibration is available to provide
real world dimensional measurements in units such as millimeters. Density or gray scale
calibration is also available.

Full documentation for ImageJ can be found at: http://rsb.info.nih.gov/ij/. The author,
Wayne Rasband (wayne@codon.nih.gov), is at the Research Services Branch, National
Institute of Mental Health, Bethesda, Maryland, USA.


On the next few pages, the
function of each of the
tools shown on the tool
bar is defined.

There are five area
selection tools, three line
selection tools, and the
remaining tools perform
other functions such as
zooming, scrolling and
writing text.

1
This description of ImageJ and the descriptions of the tools borrows liberally from descriptions found on
the ImageJ website. We have paraphrased it slightly to be more appropriate for this tutorial.

A-2
Tools

Area Selection Tools
Use these tools to create area selections that will be operated on separately from the rest
of the image. The contents of an area selection can be copied to the internal clipboard,
cleared (to white), filled with the current drawing color, outlined (using Edit/Draw),
filtered, or measured. Use the backspace key as a shortcut for Edit/Clear. Use
Image/Colors to set the drawing color. Double click on any line tool to change the line
width used by Edit/Draw. Use the arrow keys to "nudge" a selection one pixel at a time
in any direction.

Rectangle
When creating the selection, drag with the shift key down to constrain it to a
square. Use the small "handle" in the lower right corner to resize. Use the arrow
keys with the alt key held down to change the width or height one pixel at a time.
As a selection is created or resized, its location, width and height are displayed in
the status bar.

Oval
Creates an elliptical selection. Holding the alt key down forces the selection to be
circular. Use the arrow keys with the alt key pressed to change the width or
height. As the selection is created or resized, its width and height are displayed in
the status bar.

Polygon
Creates irregularly shaped selections defined by a series of line segments. To
create the selection, click repeatedly with the mouse to create line segments.
When finished, click in the small box at the starting point (or double-click), and
ImageJ automatically draws the last segment.

Freehand
The freehand tool lets you create irregularly shaped selections by dragging with
the mouse.

Wand Tool
Creates a selection by tracing objects of uniform color or thresholded objects. To
trace an object, either click inside near the right edge, or outside to the left of the
A-3
object. To visualize what happens, imagine a turtle that starts moving to the right
from where you click looking for an edge. Once it finds the edge, it follows it
until it returns to the starting point. Note that the wand tool may not be able to
reliably trace a one pixel wide line unless it is first thresholded. Use the
WandAutoMeasureTool macro to outline and automatically measure objects.

Line Selection Tools

Use these tools to create line selections. Use Analyze/Measure to calculate the length of
a line selection. Use Edit/Draw to permanently draw the line on the image. Change the
drawing color by clicking in the Image/Colors window. Double click on any line tool to
specify the line width. Use the arrow keys to "nudge" a line selection one pixel at a time.

Straight Line
Use this tool to create a straight line selection. Holding the alt key down forces
the line to be horizontal or vertical. To spatially calibrate an image, create a line
selection corresponding to a known distance (e.g. 10mm), then enter that distance
in the Analyze/Set Scale dialog box. PlugIns/Draw Arrow will draw an arrow
based on a straight line selection.

Segmented Line
Create a segmented line selection by repeatedly clicking with the mouse. Each
click will define a new line segment. Double-click when finished.

Freehand Line
Select this tool and drag with the mouse to create a freehand line selection.

Angle Tool

Measures the angle formed by two lines drawn through a point. The angle is displayed
interactively in the status bar as the lines are drawn. Select Analyze/Measure to
display the angle in the Results window.

Crosshair Tool (Mark and Count)
Use this tool to count objects. Clicking on a point in the image records its location and
intensity and draws a mark in the current foreground color. The marks modify the image
so it may be wise to work with a copy. Double-click on the crosshair icon in the tool
bar to change the size of the mark. Set the mark width to zero to disable marking. Note
that this tool marks the image immediately, unlike the other selection tools which require
A-4
that you use the Draw or Fill command. Also note that color marks are only available
with color images or grayscale images that have been converted to RGB.

Text Tool
Use this tool to add text to images. It creates a rectangular selection containing one or
more lines of text. Use the keyboard to add characters to the text and the backspace key
to delete characters. Use Edit/Draw to permanently draw the text on the image. Use
Edit/Options/Fonts, or double-click on the text tool, to specify the typeface, size and
style.

Magnifying Glass
Click on the image with this tool to zoom in. Alt-click (or right-click) to zoom out. The
current magnification is shown in the image's title bar. Double-click on the magnifying
glass icon to revert to 1:1 magnification. There are 11 possible magnification levels:
1:32, 1:16, 1:8, 1:4, 1:2, 1:1, 2:1, 4:1, 8:1, 16:1 and 32:1.

Scrolling Tool
Allows you to scroll through an image that is larger than its window. When using other
tools (except the text tool), you can temporarily switch to this tool by holding down the
space bar.

Color Picker
Sets the foreground drawing color by "picking up" colors from images. The color of this
tool's icon changes to match the drawing color. Colors can "picked up" from the
Image/Colors window using any tool. Alt-click in the Image/Colors window to change
the background color. Double-click on this tool to display the Image/Colors window.
The icon for this tool is drawn in the current foreground color and the frame around it is
drawn in the current background color.

B-1
Appendix B: Keyboard Shortcuts holding the Ctrl key down

Command Shortcut Description
New N Creates a new image or stack
Open O Opens a TIFF, GIF, JPEG, BMP, DICOM or FITS
Open Samples Shift-B Opens "Blobs" example image
Close W Closes the active window
Save S Saves active image in Tiff format
Revert R Revert to saved version of image
Print P Print active image

Undo Z Reverses the effect of the last operation
Cut X Copy image to clipboard and clear selection
Copy C Copy image to clipboard
Paste V Paste clipboard selection into active image
Clear backspace Erases selection to background color
Select All A Select entire image
Select None Shift-A Delete selection
Restore Selection Shift-E Restores ROI
Fill F Fills selection in foreground color
Draw D Draw selection
Invert Shift-I Invert image or selection

Adjust Contrast Shift-C Adjust brightness and contrast
Adjust Threshold Shift-T Adjust threshold levels
Show Info I Displays information about active image
Next Slice > Advance to next stack slice
Previous Slice < Backup up to previous stack slice
Start Animation = Starts/stops stack animation
Duplicate Shift-D Duplicates active image or selection
Scale E Scale image or selection

Smooth Shift-S 3x3 unweighted smoothing
Find Edges Shift-F Performs Sobel edge detection
Repeat Command Shift-R Repeats previous command

Measure M Displays statistics about active image or selection
Histogram H Displays a histogram of the active window or selection
Plot Profile K Displays density profile plot of current selection
ImageJ enter Brings ImageJ window to front
Put Behind tab Switches to next image window


B-2
Alt Key Modifications

Image/Adjust/Threshold: Adjusting Min also adjusts Max
Image/Stacks/Add Slice: Insert before current slice
Image/Stacks/Next Slice: Skip nine slices
Image/Stacks/Previous Slice: Skip nine slices
Image/Duplicate: Don't show dialog
Image/Colors: Alt-click to "pick up" background color
Process/Equalize: Do classic histogram equalization
Process/Subtract Background: Show background image
Analyze/Plot Profile: For rectangular selections, generate row average plots
Analyze/Tools/Analyze Line Graph: Show intermediate image
Plugins/Utilities/ImageJ Properties: List all Java properties
Plugins/Utilities/Monitor Memory: Simulate 640x480 frame grabber
Any User Plugin: Load using new class loader


Space Bar Modifications

Any Tool: Temporarily switch to the "hand" (scrolling) tool
Moving through a stack: Automatically adjust min/max display values


Function Keys

Use the function keys to switch tools. F1 selects the rectangle tool, F2 selects the oval
tool, etc.


Arrow Keys

Use the arrow keys to move selection outlines one pixel at a time. Resize rectangular and
oval selections by holding down the alt (option) and while using the arrow keys.

You might also like