Instructor: Brian Klinkenberg

Office: Room 209
Office hours: Tues 12:30-1:30
Wed 12:00-1:00

TAs: Katie De Rego and Leo King

Office hours in Room 115
Katie: Thur @ 9:00
Leo: Mon @ 10:00

Lab Help: Jose Aparicio

Office: Room 240D

Computer Lab: Rm 115

 

 

Lab 5: Introduction to Image Enhancement and Unsupervised Classification

Due: Next week, at the beginning of your lab.

Marks: 45 marks

Background

The objectives of this lab are to introduce you to image enhancement, which enables you to better visualize an image for interpretation, and to unsupervised image classification, where individual pixels are grouped and classified according to their reflectance values. You will first complete some of the Idrisi "Introductory Image Processing Exercises," where you will use datasets provided by IDRISI, and then you will be introduced to unsupervised image interpretation using some Landsat data from California. The exercises in Lab 6 will also use the same Landsat data.

Optional additional readings: Recall that there is a comprehensive IDRISI manual available (C:\Program Files (x86)\IDRISI Selva\Documentation\IDRISI Manual.pdf) that you can copy to a memory stick.

LOAD DATA information: For this lab, use Windows Explorer to copy, paste, unzip and zip the data:

  • Using Windows Explorer, go to: G:\courses\data\IDRISI_labs
  • In this directory, you will see a subdirectory called Lab5, in that subdirectory there are two zip files. One contains the tutorial data used in Part 1 of this lab (Image_enhancement.zip), while the other contains the California Landsat images used in Part 2 (Unsupervised Classification) of this lab (MorroBay.zip).
  • In order to complete Part 1 of this lab, copy the Image_enhancement.zip file to C:\data--you only need the files contained in the Image_enhancement.zip file to complete Part 1 of this lab.
  • Double-click on the zip file (Image_enhancement.zip) and then drop / drag the Image_ enhancement folder into C:\data.
  • You should now see a folder named Image_ enhancement within C:\data

Please note:

  • Please do not save these folders / files to H: without zipping them first.
  • You may not need to save any of your work if you answer the questions as you go through Part 1. Only save your data to H: if it is necessary. If you do need to save your work, first zip the file before copying it onto the H: drive.
  • Note that you will need to save your MorroBay data (Part 2) for the next lab, Lab 6: Supervised Classification.

Assignment

Part 1: IDRISI Tutorial: Introductory Image Processing Exercises

  • Launch IDRISI Selva from Start / All Programs / IDRISI Selva.
  • Ignore the message that may appear about a "Data path not found."
  • You can access the tutorial from C:\Program Files (x86)\IDRISI Selva\Documentation\IDRISI Tutorial.pdf (and copy it onto a memory stick, if you wish; also available here).

As always, at the beginning of an IDRISI exercise, you need to set your project and working folders to the appropriate C:\data folder name (for example, for this lab you will be working with two folders: Image_enhancement in Part 1 and Morrobay in Part 2).

  • Open IDRISI Explorer (either by clicking on File / IDRISI Explorer or by clicking on the [+] symbol that appears at the far left, immediately below the Idrisi toolbar.
  • Click on Projects tab in the Idrisi Explorer window.
  • Right click on the existing pathname and select Change projects folder.
  • Navigate to C:\data, click on the Image_enhancement folder, and then OK.
  • Right click on C:\data\Image_enhancement, select New project and again select the Image_enhancement folder.
  • You have now set both the projects folder and working directory. If you click on the Files tab you should see a list of the files stored in the Image_enhancement directory.

You will be completing the following exercises for this lab. Please ensure that before you do each exercise you read through the "Specific Instructions and Questions" section below before starting each new exercise.

  • Tutorial Part 4: Introductory Image Processing
    • 4.1 Image Exploration
    • 4.2 Image Restoration and Transformation (ONLY complete the first exercise, Removing Sensor Error using DESTRIPE)

Specific Instructions and Questions for each Exercise

Exercise 4-1 Image Exploration

You need not do the last exercise, Creating Colour Composites, as you have already done this in Lab 4.

Question 1: Hand in printed copies of your spectral response curves for water, forest and urban (sample pixels especially from the southeast part of the image). Print out a copy of TM4SAT5 and highlight on the printout the areas you selected for your sample pixels for spectral response curves. Why should you not use the values in TM4SAT5 when creating your spectral response curves / spectral reflectance curves? (5)

Question 2 : "Information vs Meaning": Explain in your own words, with examples, why you have to be careful with image enhancement tools. (2)

Exercise 4-2 Image Restoration and Transformation

Question 3: The SPOT images being used are comprised of SPOT bands 1 2 3, which produce a false colour image. What wavelength regions (also provide their 'common names', e.g., blue or red) of the electromagnetic spectrum do bands 1, 2 and 3 capture? How do the SPOT bands (1, 2 & 3) compare to the equivalent Landsat TM bands (described in the table below) (assume that the data was obtained from the SPOT 3 satellite)? Are they identical / how do they differ? (Use a table to present your comparison of the values for each sensor.) Could these differences make a difference--in terms of your ability to identify features in an image? (3)

Question 4: Does the DESTRIPE image enhancer alter the reflectance values of the pixels? Explain. (1)

Part 2: Morro Bay, California: Unsupervised Classification of Landsat data

For this part of the lab you will produce unsupervised classifications of some Landsat TM data, comparing two IDRISI unsupervised classifiers (CLUSTER and ISOCLUST) using a 512 x 512 pixel dataset of Morro Bay, California. Unsupervised classification takes pixels of similar reflectance values (actually, DNs) and clusters them into self-similar groups. Subsequently, the image analyst must associate each group of pixels with a meaningful category, such as urban, water or forest, that can be used in GIS-based environmental analysis, change detection, etc.

A detailed explanation of classification techniques is provided in the IDRISI documentation.

Loading the data

  • Using Windows Explorer, go to: G:\courses\data\IDRISI_labs
  • In this directory, you will see a subdirectory called Lab5, in that subdirectory there are two zip files.
  • In order to complete Part 2 of this lab, copy the MorroBay.zip file to C:\data--you only need the files contained in the MorroBay.zip file to complete Part 2 of this lab. (You will also be using this data in your next lab, so at the end of the lab you should zip the files and copy them to your H: folder, or onto a memory stick.)
  • Double-click on the zip file (MorroBay.zip) and then drop / drag the MorroBay folder into C:\data.
  • You should now see a folder named MorroBay within C:\data
  • Set your Idrisi project and working folders to the appropriate C:\data folder name (MorroBay).

Getting to know the data, creating image composites:

As you will be working with this data for both the unsupervised and supervised classification labs, you should become familiar with the area. In Google Earth, call up Morro Bay, California.

1. Use DISPLAY / DISPLAY LAUNCHER to view some of the 7 Landsat bands named ‘morr1’ to ‘morr7’ (make sure that you specify Greyscale for your palette). Lighten the image by checking the “autoscale” box under layer properties and lowering the maximum display level using the slider bar.

The following table gives you an idea of the utility of each thematic mapper band for distinguishing different features.

Landsat Thematic Mapper (TM) Spectral Bands
Band
Wavelength (um)
Nominal Spectral Region
Principal Applications
1
0.45-0.52
Blue
Designed for water body penetration, making it useful for coastal water mapping. Also useful for soil/vegetation discrimination, forest type mapping, and cultural feature identification.
2
0.52-0.60
Green
Designed to measure the green reflectance peak of vegetation, for vegetation discrimination and vigor assessment. Also useful for cultural feature identification.
3
0.63-0.69
Red
Designed to sense in a chlorophyll absorption region, aiding in plant species differentiation. Also useful for cultural feature identification.
4
0.75-0.90
Near IR
Useful for determining vegetation types, vigor and biomass content, for delineating water bodies, and for soil moisture discrimination.
5
1.55-1.75
Mid IR
Indicative of vegetation moisture content and soil moisture. Also useful for differentiation of snow from clouds.
6
10.4-12.5
Thermal IR
Useful in vegetation stress analysis, soil moisture discrimination, and thermal mapping applications.
7
2.08-2.35
Mid IR
Useful for discrimination of mineral and rock types. Also sensitive to vegetation moisture content.
Note: Bands 6 and 7 are out of sequence (WRT their wavelengths) because band 7 was added to the sensor late in the system design process.

2. Create three COMPOSITES that will be useful in the classification process.
  1. True colour:
    • combine bands 1, 2, 3 -- morr1 (blue), morr2 (green), morr3 (red); use the histogram equalization option (NOTE: using the histogram equalization on bands 1, 2, 3 eliminates the effects of water and surf which can cause problems; be sure to choose histogram equalization under ‘Contrast stretch type’). Call the composite morr123. Be sure to add an appropriate title when creating the composite.
  2. False colour:
    • combine bands 2, 3, 4; use the linear stretch with saturation, 24bit composite retaining original values and stretched saturation points, 1% saturated. Call the composite morr234.
  3. MidIR:
    • combine bands 3, 4, 5; use the linear stretch with saturation, 24bit composite retaining original values and stretched saturation points, 1% saturated. Call the composite morr345.

Question 5: Print out and hand in the true colour and midIR image composites. Add your name to each composite (as a caption) before printing it out. (Use Map Properties to add Caption text, and place the caption in the bottom right of the image.) What can you notice in the ocean areas of morr123? (Hint: Exercise 4.2) Why would a composite image be 24 bits? Would it make sense for the composite image to be 16 bits? (4)

For this dataset, the red (band 3), near infrared (band 4) and middle infrared (band 5) bands have been demonstrated to be the “most informative” bands, particularly for vegetation greenness, brightness and moisture content, and carry most of the information of the Landsat image.

Question 6: Why would this combination of bands be the “most informative?” for this area? Compare this composite to the true colour and false colour composites. (3)

Image classification:

There are a variety of options available for unsupervised image classification; in this lab we will compare two of the hard classifiers, CLUSTER and ISOCLUSTER.

1. Launch IMAGE PROCESSING / HARD CLASSIFIERS / CLUSTER.

  • Set the Number of files to 3
  • Click within the three boxes under Filename to select morr3, 4 and 5
  • Call the output image morrclusterall
  • Generalization: fine
  • Clustering rule: retain all clusters
  • Accept all of the other defaults.

  • Call up the histogram
  • Assess the clusters - look for 'true', or relevant clusters (based on the number of pixels assigned to each cluster [histogram bar]). Look for 'breaks' in the histogram. As well, by placing the cursor on a histogram bar you can determine how many pixels are associated with that class. A rule of thumb is that a valid class should include, at the least, ~1% of the pixels in the image.

Question 7: How many clusters do you see that appear to be relevant? (1)

  • Run the CLUSTER analysis again, but this time, under the clustering rule, specify the maximum number of clusters based upon your answer to question 9, and call the output morrcluster.
  • In the output image, if you click (and hold the button down) on a legend box, that cluster group will be highlighted in the image.

Question 8: Print out the results of your second cluster analysis (adding your name as a Caption to the image before printing it out). Set the (Other) Palette to Qual16. Comment on the ability of CLUSTER to distinguish unique groups of land features. Try to guess what classes could be assigned to each cluster. List them. (7)

Question 9: Compare the classified image to the colour composite image (using bands 1, 2, 3). What are the similarities/differences? (HINT : It might help to group these two images and then use the ‘Group Link’ tool to zoom into the same areas for both.) (5)

2. Launch IMAGE PROCESSING / HARD CLASSIFIERS / ISOCLUST--this is an iterative unsupervised classifier.

  • Set the Number of files to 3
  • Select morr3, 4 and 5 for the analysis (ISOCLUST takes several minutes, so be patient).
  • Call the output morrisoclust
  • Set the Number of clusters desired to 7
  • Accept the other default values.
  • View the output - you may need to reload your image with DISPLAY LAUNCHER, turning on the legend option, in order to see the legend (and to click on the results).

3. Create a landuse map with meaningful landuse classes.

  • In the Files tab, there is the option to display the Metadata for an image. Metadata is information about the data.
  • In the IDRISI Explorer, click on morrisoclust.rst - you should now see the metadata for this image displayed in the Metadata panel. (Make sure you are in the ‘Files’ tab, just to the right of the ‘Projects’ tab in Idrisi Explorer). If you don't see the metadata, right click in the gray Files space and you will see an option for metadata.
  • Scroll through the metadata until you see Categories - you should see the cluster numbers.
  • Double click on categories, or use the pick list, and you will be presented with a window in which you can enter text to replace the cluster numbers; replace the numbers with meaningful class names (e.g., water, urban, forest) where possible (i.e., some clusters may contain several distinct land covers, if those covers have similar spectral reflectance curves). You may want to include some 'mixed' class names given the ambiguity of some of the classes (e.g., Sand / Industrial Areas). Having Google Earth displayed alongside the classified image can help you select an appropriate class name.

  • NOTE:
    • You have to save your changes in the Metadata window (clicking on another filename within IDRISI Explorer will prompt you to save your results), and then close and re-open the image in DISPLAY LAUNCHER for the new legend to appear (use the default IDIRISI qualitative palette).
    • You can get the column and row location of a feature by moving the mouse over the displayed image and reading the column and row coordinates presented at the bottom of the IDRISI window.
    • You can get the actual value of the pixel by using “cursor inquiry mode” – click on the question mark icon cursor inquiry then click on the pixel.

Question 10: Print out the results of your image analysis (with your name added before printing out the image), with the legend showing the class names you identified for each cluster, and explain your choices in assigning meaningful class names to each cluster (refer to specific features in your image). (10)

Question 11: Compare the output of CLUSTER and ISOCLUST. Which routine do you feel provides the better output, and why? (5)

ZIP and SAVE your Morro Bay data to your home directory on the H: drive as you will be using it in your next lab.