Classifying Multispectral Imagery
The purpose of this assignment is to get some hands-on experience with the fundamentals of image classification. Multi-Band images of the Earth's surface are becoming a very important source of information about land cover and land use. Because satellites beam back information every day, this imagery can be a terrific source of very current information or historic (perhaps back to 1972). Of course, subtracting the historic from the current can provide an estimate of change in the landscape, provided one can be sure that the classification of the images yields consistent results.
We have an elegant tool for extracting information from images, which we train with samples of cleared, wooded and innundated areas on each image. The image classification software yields classified versions of our 1970 and 1990 images, which we can bring into our GIS.
Finally, we use a raster function to find areas that were (if we trust our classiciation) cleared and places that were (evidently) reforested between 1970 and 1990. The work we do training the classifier in a control area is carried out accross the entire image.
Remotely sensed data is very unstructured. It is in most cases simply a record of relative reflectances (sometimes emittances) of particular wavelengths of electromagnetic radiation. Therefore there is usually a lot of interpretive work that goes into extracting useful information from these images. There are many software programs that can assist in this task. This assignment has been written for a very good, very compact and very inexpensive image processing package called MultiSpec, from Purdue University.
In this project, we will investigate land use on Cape Cod, Massachusetts. This setting is interesting because of the sensitive landscapes which were under considerable development pressures in the latter part of the 20th century. This pressure led to the establisment of the Cape Cod Commission in 1990 and the Cape Cod National Seashore in 1961.
The overall goal of this assignment is to extract some useful information from a multi-band image. To extract information about forested and unforested areas from both September 18 1999 and July 6, 1976 to make an assessment of how much forest was lost.
The Overall Outline
- Introduce the datasets
- Open the satellite image, shape file and scanned map in arcgis.
- Get familiar with the MultiSpec interface.
- Isolate particular spectral signatures on the 1999 image using a supervised classification of a few features.
- Georeference the new classified image in ArcGIS.
- Repeat the procedure for the 1976 image for a change detection study
- Reclass the images, converting them to GRIDs
- Use a combine function to extract the specific differences between the two grids.
Introducing the Data
Right-Click here to download the zip file containing the sample databases for this lab. Open the ArcMap Document at the top level of this folder. The images in each of the grouped layers, mss_tifs and etm_tifs are the original tifs downloaded from The Global Land Cover Facility at the University of Maryland. Each of these represents a single band of the multispectral images returned by the MultiSpectral Scanner the first landsat satellite, active in the 1970s, and from the Enhanced Thematic Mapper, which is also known as Landsat 7. You can see the metadata for each of these bands on the Landsat Technical Documentation.
To prepare these images for import into multispec, a couple of models were created. YOu can find these in the toolbox, named Composite_Img Note that the cell size and the extent is set specifically for each of the models, using the Properties for each model. It is common practice to use the Red, Green, and Near Infrared bands to diferentiate vegeation and development, so we havge chosen the apropriate image bands to include in our tif files (which can only hold three bands).
Part of the problem of classifying an image, is making training samples based on some understanding of land cover in part of the image. To aid you in this process, we include a land use shape file of The Town of Barnstable from MassGIS.
You will also find a subfolder named "multispec" which contains the multispec program and its documentation which is named Intro5_01.pdf
Open the data in ArcGIS
Because ArcGIS is a more full-featured GIS than Multispec, we will use it as a reference for our GIS data. We will also use it to help analyze our results.
- Open the ArcMap Document, map1.mxd.
- Explore the images and the land use map.
- Take a look at the models in the Image_COposite toolbox. One version of the 1999 image was composited with bands 1,2 and 3 which allows us to make a "True Color" image. BUt first we should adjust the image symbology properties it so that the Red Green and Blue channels are in the correct order. For the Enhanced Thematic mapper imagery, the Red band is band 3, blue is recorded on band 1.
- When looking at the infrared imagery, such as 1999_ess_234 or 1977_mss_123, it is customary to display the infrred channel with red, the red channel with green and the green channel with blue. Check the assignment of spectral bands to image chanels in the Landsat Technical Documentation,
- Play with the image display proprties: Look at the histogram, which shows the frequency of pixels at each reflectance level for each band. Set the stretch to Histogram-equalize Notice the difference? Play with the different stretch options and choose the one that you think brings out different land uses.
- CLick around on the image and the land use layer with the information tool. Zoom in on a detail in the land use map that you feel has a spectral signature that is distinct from the area adjacent to it.
- Using the information tool, identify the land use for your selected area.
- Using the information tool, get the relative reflectances from each image band for your selected area and the area adjacent. consult the table of image bands, Landsat Technical Documentation, and think about the spectral signals that make these areas distinct in the image.
Get Familiar with the MultiSpec Interface
I have intended to be complete as possible in writing these instruction, but where not otherwise specified, follow these general rules:
- Save your work often. The "Project" contains all of the training samples and classifications you have done since opening MultiSpec, or opening a different project. Save these projects into your own folder each time you have accomplished something interesting and especially before you do new classifications or clustering operations. on top of old ones. This will prevent you from losing work (and patience.)
- When you are confronted by a list of options, and don't know what to pick, choose the defaults.
- Don't be afraid to look up things in the manual.
- When you take a break, or are finished, save your projects to your working folder. This will enable you to start from where you left off, instead of starting over.
Perform an Unsupervised Classification
- Start the Multispec application by double-clicking on the multispecw32.exe file.
- In MultiSpec, use File->Open Image, to open the 1999_etm image. YOu may want to adjust the stretch here. Linear Stretch in MultiSpec corresponds with ArcMap's Minimum-Maximum, Equal Area corresponds with ArcMap's Histogram equalize. Then click OK.
- Zoom in and out using the "mountain" buttons on the tool bar at the top of the multispec window. Recenter the image in the window using the scroll bars.
- From the Processor menu, choose Cluster
- Click Single Pass, accept the defaults in the single-pass options dialog. Then back on the cluuster dialog,click Image Area, if your image area parameters don't start at 1, click the little 'Full Image Area Icon' at the left side of the little image area section of this window.
- Text Disk FIle Unclick Text Window
- Then click OK to begin the clustering.
- Once the clustering is finished you can open the result as an image. You will have to set the Files of Type pulldown to All Files in order to find it. The file will have a .clu suffix.
Examine the results of the unsupervised clustering
The clusterer has found the modalities inherent in your data. Clustering is a good way to start an image classification because there are classes of pixels that are deciferable because of their distinct signatures. Some of these signatures will be readily identifiable as land cover classes (water for example.) But the clusterer has not done such a good job distinquishing certain other classes, such as Wetlands and Residential.
It will be useful to consult the land use data in ArcMap as a reference. We will find the cluster classes that worked well, and assign names to them, then we will delete the clusters that didn't work, and then we can help out the clusterer by adding our own classes.
Fine Tune your Cluster-Classes
- YOu can change the color of the clusters on your map to make them easier to associate with land-cover characteristics. Try to find good classes and ambiguous ones.
- Notice the Project Window that showed up on the right side of your screen when you did the clustering. It has some buttons on it, Classes, Fields or maybe Select.
- Put the project menu in Classes mode
- It will display a list of the classes that were found by the clusterer. These correspond with the classes on your cluster map.
- Rename the good classes that you found by shoosing their entry from the list and clicking Edit Class Name.
- Delete classes that are ambiguous by selecing their names and choosing Edit->Cut.
- Classes can also be merged together, by selecting a name in the Classes list, then selecting Cut Class from the edit menu. YOu can then select another class, and click Edit->Paste Class to merge the first class with the second one. Be careful, though because merging two classes that are very dis-similar in their signatures. Remember that the the outputs of your clustering and classification can always be merged with a reclass operation at the final step.
Perform a Supervised Classification
Now, we will add our own input to help the classifier distinguish features that we feel are important.
- Make your original image the active window
- Set your Project Menu in Select Mode
- Check the box in the Select Field menu that says "Polygon Enter" This will allow you to create irregularly shaped training samples.
- Notice that there are areas of wetland that are in the same class as other areas that are residential, we will delete this class, from our class list, and then use Select mode to define two training samples, one named Wetland and another named Residential.
- Now choose Classify from the Processor menu. In the Set Classification Specifications dialog, make sure to uncheck the box that says "Write Classification Results to Project Text Window" and do check the one that says "To disk File". The rest of the defaults should be fine. You will be asked whether you want to update statistics, say yes.
- You will be asked to name the file that will be your classified map. Use a name you will be able to remember. If you are smart, you will create a folder for this sort of thing, and you will give the maps and projects you save names that will make sense if you want to find particular ones later.
- After a while, the classifier will finish and you can use File->Open Image to open it. It will be a file of type "Thematic".
- Look at the image. You can also go to your Project Text window (bring it to the front by selecting it from the Window menu.) and look at the statistical summary of your classification. If you are curious about what all of these statistics mean, you can look at the MultiSpec documentation; but you will not be tested on this.
- If you want to understand the signatures that multispec has identified from your training samples, go to the project window, push the "Classes" button and choose "List Stats..." from the second pull-down menu. Statistics for each class will be listed in the project text window. YOu may need to go to the "Windows" menu to find this.
- To throw away a set of classes and start over, choose Project->Close Project, and then open a fresh project with Project->New Project. If you want to save your classes, then use Project->Save Project. Use a name that is meaningful, like "suprvised2.project".
- Save your MultiSpec project.
Open the classification result in ArcGIS
Now that you have extracted some new information from your satellite image, you may want to bring it into ArcGIS to use it with other datasets, including the results of other image classifications. Multispec makes this fairly easy, allowing you to save the thematic image as a geotiff format image, which, you probably know, is georeferenced and will automatically line up with your ArcGIS layers.
Georeference your Classified Image
- Use Multispec to save your new thematic image as a Geotiff file.
- Open the new image in ArcMap. It should align with the other data.
Repeat your classification for the 1977 image and calculate the change in development
- Start a new MultiSpec project with the 1972 image, and repeat the supervised classification.
- Georeference the new image and open it in ArcGIS.
Reclass your New Rasters and Combine Them
Now to systematically extract the differences between these two rasters. For this we wil use the raster function combine. Combine is a local function, which for each cell in the output grids, assigns a new value that represents the combination of the values for that location on the input grids. One of the zones on the combidned grid will be those cells that were forest in 1977, but unforested in 1999. But before we combine these two rasters, we should make the values for forested, unforested and water, consistent between the two.
- Choose values for your three types of land use.
- Reclass each classified layer appropriately.
- Make each of the layers a permanent grid with the names class70 and class90.
- Remove the classified tif images and the reclassed grids from ArcMap and open your saved permanent reclassed grids.
- Use the combine function in the Raster Calculator with the following
[combined77_99] = combine([class77],[class99])
- Check out the attribute table of your new grid. The rest should be obvious.