GEOG 751: Digital Techniques of Remote Sensing

Exercise #04

Image Statistics Using the Spatial Modeler


Objectives


Part I. Introduction to Spatial Modeler

Images

 

Begin by opening the Spatial Modeler menu by selecting the Modeler icon in the Imagine icon panel. Review the function of each of the Model Maker's tools before going on.

Description of the Model Maker Tools
Use this tool to select items on the Model Maker page. Once selected, these graphics (or text) can be moved or deleted. Click and drag a selection box to select multiple elements. Multiple selected elements can be dragged to a new location as a unit. You can also use the arrow to double click on any of the graphics below to further define their contents.
Creates a raster object , which is a single or layer-set of raster data typically used to contain or manipulate data from image files.
Places a vector object , which is usually an Arc/Info coverage or an Annotation layer.
Creates a matrix object , which is a set of numbers arranged in a fixed number of rows and columns in a two-dimensional array. Matrices may be used to store numbers such as convolution kernels or neighborhood definitions.
Creates a table object , which is a series of numeric values or character strings. A table has one column and a fixed number of rows. Tables are typically used to store columns from an attribute table, or a list of values which pertain to individual layers of a raster layer-set.
Creates a scalar object , which is simply a single numeric value.
Creates a function definition , which are written and used in the Model Maker to operate on the objects. The function definition is an expression (like "a + b + c") that defines your input. You can use a variety of mathematical, statistical, Boolean, neighborhood, and other functions, plus the input objects that you set up, to write function definitions.
Use this tool to connect objects and functions together . Click and drag from one graphic to another to connect them in the order they are to be processed in the model. To delete a connection, simply click and drag in the opposite direction (from the output to the input).
Creates descriptive text to make your models readable. The Text String dialog is opened when you click on this tool.
 

1. Create a binary image to separate water from upland

Now select the Model Maker button in the Spatial Modeler menu. Wait for the Model Maker dialog box and the model tools to appear. Select the raster object tool and place a raster object in the model window (towards the top of the window). It will have a question mark as a title for now, but you will assign the input raster file later. Repeat the process and place a second raster icon in the window (near the bottom center). If you make a mistake, use the Edit menu to cut the selected mistake out of the model.

Now select the function tool and place a function symbol near the center of the model window. Use the connect tool to connect the raster object on top to the function definition symbol by selecting a point inside the top raster icon and dragging a line to the center of the function symbol. Release the mouse and a connection arrow should appear. Now connect the function symbol to the lower raster object. The resulting function should look somewhat like the model depicted below:

Select one of the IKONOS bands that you think is the best to separate water from upland.  Then select an appropriate brightness value for the separation.
Now you will assign the input raster file.  Double click the upper raster object, then you get a new window (Raster window) like this:

Then select the file, cola_ikonos_2000_ms.img, and click ok.  Now double click the function definition symbol (a circle), and you get a new window (Function Definition window) like this:

The function to be used in the separation should be something similar to this:
"EITHER
the value that you want to assign (e.g., 1) IF ( the selected band < your selected brightness value (e.g. 20) ) OR the value that you want to assign (e.g., 0) OTHERWISE"
This function means that the pixels with the brightness values below 20 will have value 1 and the other pixels will have value 0.  Thus, you will get a binary file that consists of 0 and 1.  You can select the "EITHER" function in the Conditional Functions (upper right in the window).

Finally, you will assign the output file.  Double click the lower raster object, and you get a new window like this:

Determine the name and property of your output raster. Note that data type is set to "Unsigned 1bit" in the above picture. You only need 2 values (0 and 1; it should be changed if you select other numbers in the function definition), and you don't want the output file of large size.

Run your model (click run button in the process menu or just click  icon) and open your output file in a new viewer.

 

2. Create a NDVI image using Spatial Modeler

Select the Model Maker button in the Spatial Modeler menu. Now, create your own NDVI spatial model with your knowledge of NDVI (NDVI = (NIR -Red)/(NIR+Red)).  Run your model and open your output image.  If you didn't get the proper image, please make it sure that you declare the raster as float, not integer, in the input/output raster object windows.

There are built-in models of NDVI for several sensors (e.g., TM, MSS, and AVHRR) in ERDAS IMAGINE. Select the Indices button in the Spectral Enhancement in the Image Interpreter menu. Set Select Function as NDVI in the Indices window and click View button in the bottom, and you get the spatial model like this:

 

You might want to separate vegetation from the NDVI image.  You already know how to separate it in the Problem 1.  However, this time, you don't want it as a binary file. You need original NDVI values in vegetation but want to make NDVI values in the others (like water) 0. You can create this model by just adding one raster object and one function definition to your previous NDVI model.  Run your modified model and open the output image in a new viewer.

2c. Save your modified model as "NDVI_vegetation_only_yourname.gmd" and drop it in the DROP folder.

 

Part II. Computation of Image Statistics with Spatial Modeler


Images

 

In Part II, you will compute several image statistics with spatial modeler.

3. Design the Spatial Model that compute the skewness and kurtosis of cola_etm_2001.img band 1.

Before designing the spatial model, please read the textbook (pp. 137~139).  Then, design the spatial model that compute the skewness of cola_etm_2001.img band 1.  The resulting function should look somewhat like the model depicted below:

Double click the raster object and select cola_ikonos_2000_ms.img.  Don't forget to declare the image as "Float," not integer (you can set it in the lower right of the window).  Double click the function definition.  You can find the equation to compute the skewness in the page 137 of the textbook (Digital Image Processing 3rd ed.).  In order to compute the skewness, you will use "GLOBAL MEAN" function in the function definition (see the picture below.  you can get the mean and standard deviation values from Image Info.).

Double click table definition and set the output options as "Write To."  Note that the data type should be float in the bottom of the window (see the picture below).

Run your model and open the output file (you can use notepad, WordPad, or MS word to open it).

3a. What is the skewness value?  Is the value similar to what you expected?  How do you explain the histogram distribution of the band 1 based on the skewness value?

Similarly, create the spatial model that compute the kurtosis of the band 1. You can find the equation to compute the kurtosis in the page 137 of the textbook (Digital Image Processing 3rd ed.).  Run your model and open the output file.

3b. What is the kurtosis value?  Is the value similar to what you expected?  How do you explain the histogram distribution of the band 1 based on the kurtosis value?

 

4. Design the Spatial Model that compute the correlation between cola_etm_2001.img band 3 and band 4.

Now you have the equation that compute the correlation between bands (refer to the textbook, pp. 138~139).  Create your own spatial model that compute the correlation between band 3 and band 4. 

4a. What is the correlation between band 3 and band 4?  Is it high or low? Briefly describe it based on your knowledge of the correlation between NIR and Visible bands.

 

5. (BONUS 20%) Design the Spatial Model that compute the correlation between all 6 bands of cola_etm_2001.img (Do not use "Correlation" function directly).

5a. Create the table that show the correlation values in your report.  Briefly describe the correlation values between bands.
5b. Save your spatial model as "correlation_yourname.gmd" and drop it under the DROP folder (\\Black\user0\geog\751F04\drop).

You can get a correlation matrix by using "Correlation" function directly (see the model below).  In the model, the function definition should be like this: CORRELATION ( $n1_cola_etm_2001 ).  Note that it uses a matrix as an output instead of a table. The correlation values from your own model should be equal to those from the model below.

 







Back to GEOG 751 Home Page



Last Modified: September 16, 2004