Monday, November 7, 2016

GIS4035 - Lab 10 - Supervised Image Classification

Well, I finished off the kids' halloween chocolate while working on this final lab assignment; new proof that eating chocolate can reduce daily stress.   Module 10 was a continuation of last week's digital classification of images using ERDAS Imagine.   We performed three exercises prior to creating our final deliverable which was to create a supervised classification of land use consumption of Germantown, Maryland.

First we learned how to create or append signature files by drawing polygons around clusters of like pixels or by growing a signature from "seed" using the Drawing tab/Growing Properties dialog.  Adjusting the Spectral Euclidean Distance (SED) and/or changing the Neighborhood setting from 4-way to 8-way will adjust how a "seed" grows.  Next, we learned how to evaluate the signatures.  Using histograms and mean plots we could view the bands where overlap occurred between two or more signatures.  Determining which bands showed the greatest difference between signatures was important because those bands were chosen to Set Signature Colors in the Signature Editor.  Once colors were set, we could perform a supervised classification of our image using our signatures to "train" the classification.  Using the Maximum Likelihood Parametric Rule, pixels were classed based on the probability that a pixel belonged to a particular signature/class.  A distance output file was also created.  This file was another analysis tool.  Areas that appear very bright in the distance file indicate greater spectral difference which may predict misclassification.  Additional signatures could be added or existing signatures could be modified/replaced to include a larger pixel count.  Once the final supervised image was obtained, the classes could be recoded to merge together "like" classes.   The recoded image requires class names to be recreated; additionally, area calculations can be performed.

For our final deliverable we had to create a signature file using a new AOI layer and the Inquire button to either draw or "seed" polygons around AOIs.  I primarily used the drawing tool but a few times used the seed method.  I created three water body signatures and two road signatures.  Using an 8-way neighborhood setting and a SED value of 7 and 9 respectively I was able to create my road signatures.  After viewing and comparing histograms and mean plots for all signatures I determined that bands 4, 5, and 3 had the greatest separation between the signatures.  Using this R4,G5,B3 band combination I set the signature colors.  The first supervised classification I performed used the Maximum Likelihood Parametric Rule to determine which pixels were assigned to each specific class.  The classified image appeared fine in the viewer, but the distance image showed several bright areas indicating some pixels were misclassified.  I went back to my signature file and noticed that some signatures had pixel counts that were 10 or less.  I modified these polygons and replaced them in the signature editor.  I performed the supervised classification again and then recoded the image.  I noticed my colors did not appear correctly in my recoded image.   I went back again to my signature file and noticed my Deciduous Forest signature was out of place/order.  The Order and Value column values did not match in the Signature Editor.  I wasn't sure how I messed the Deciduous Forest signature up but I edited the Order values to match the Value column and then sorted the signatures based on their Order value.   This made things appear as they should except my Class # was still incorrect for Deciduous Forest (Class 8 instead of 5).  I could not figure out how to fix the Class #.  I recoded the image but again noticed my colors were not matching the 453 combination of the original supervised image.  I recoded the image again but this time in the Setup Recode dialog I assigned New Values based on the Old Values of each class category.  Instead of assigning new values of 1-8 as I had previously done, the new values were 3-Urban, 4-Grasses, 5-Deciduous Forest, 6-Mixed Forest, 7-Fallow, 10-Agriculture, 13-Water, and 16-Roads.   This recode setup did the trick and my image appeared with the classes distinguishable with 453 band combination colors.  Once I added the image to ArcMap I chose to change the symbology of each class to more clearly identify the type of land use/land cover.  This was a challenging lab as it was important to know the purpose of each step and how it affected the image output as well as to stay on top of where files were being saved.   This lab was most useful in learning about and understanding the Signature Editor.

Supervised Classification of Germantown, Maryland using ERDAS Imagine



Tuesday, November 1, 2016

GIS4035 - Lab9 - Unsupervised Classification

In Module 9 we learned about using ERDAS Imagine and ArcMap to perform unsupervised automated classifications.   In a previous labs, Modules 3 and 4, we had learned about manual land use land cover classifications.   Exercise 1 had us use the ArcMap Iso Cluster and Maximum Likelihood Classification tools which are part of the Spatial Analyst toolset.  

Exercise 2 required us to use ERDAS Imagine to classify a high resolution image of UWF’s campus.  The goal was to reclassify all fifty categories of the original image into 5 feature classes.  Using the ERDAS Imagine attribute table we zoomed into the image to view pixels of several features that were clearly visible.   Next, we changed the color of that feature in the attribute table to one of the specified four categories: Trees/Dark Green, Grass/Green, Buildings/Grey, Shadows/Black.  Using the Swipe/Toggle/Blend tools under the Home tab/View Group we could compare our classification category assignments to the original image.  Changing the color of one feature to make it stand out helped tremendously in assigning class categories.  Some features were difficult to classify because the pixels were split between impermeable and permeable objects.  For some pixels it was difficult to tell whether it represented a roadway, barren land, or grass.   The assigned pixel color might indicate any of those items.  Shadows on building rooftops were really part of the roof but also a shadow creating a darker pixel value than the other rooftop pixels.   Creating a “mixed” category class was needed for those pixels that were split among the impermeable and permeable classes of buildings/roads, grass, trees, shadows.

It was necessary to “recode” the image using the Raster tab/Thematic button and select Recode.  This is different than the Thematic tab/recode button.   The Recode dialog box enables you to sort columns in alphabetical order and create a New Value for each feature row.  After the recode we had to go back and add the Class Names column and add an Area column.

Lastly we calculated the total surface area of the image by adding the individual classification area values.  We had to determine the percentage of land surface that was permeable and impermeable.   In dividing the shadow and mixed categories between permeable and impermeable I chose to split their acreage 50/50.   Some shadows of buildings for example were fairly large in comparison to shadows of trees.  However, there were more trees with shadows than buildings with shadows.   It was hard to determine the exact split so I took the conservative approach and split it evenly.   I used the same assumption for the Mixed class.

Unsupervised Classification of the University of West Florida Campus

Tuesday, October 25, 2016

GIS4035 - Lab8 - Thermal & Multispectral Analysis


     For the deliverable assignment I scanned both composite images from the lab to look for unique areas of interest.  Ultimately, I chose to use the composite image of Northwest Florida as I am more familiar with that area.  I opened two views in ERDAS with a grey scale band 6 image and a multispectral image of the same location.  I adjusted the breakpoints of the gray scale histogram by using the Discrete DRA button.   This removed the “whitewash” appearance of the image and made features appear more distinctly by providing more contrast.  I chose to change the band combination of the multispectral image to be a false natural color or Thermal IR composite of 647 as we used in the lab Exercise 3.

After beginning with the setup described above, I began to scan the synced images.   I honestly used size, shape, and texture to notice my area of interest.   It appeared very bright in both images but had a distinct, unusual shape that was highlighted in the multispectral image.   The overall feature was a square shape that had a Star of David like symbol in the center of the feature square.   The symbol in the center was a square with a rotated 45° square on top.  The details of this feature could not be seen in the gray scale image.   I began displaying the image in various multispectral bands to see which band combination could display the feature the best.  Ultimately, the RGB 742 band combination made the feature stand out the most from its surroundings.   I used the Portland State University webpage (PDX) mentioned in the lecture to help me understand how this combination could provide more detail about the feature.   Urban areas in this band combination appear in different shades of magenta.   The symbol at the center of this feature area had two distinct shades of magenta.   The shape of the feature and width of the sides of the square and diamond comprising the center symbol resembled that of an airport runway.   I was confused by the shape of the symbol as most runways appear as an X or cross or as parallel long lines.  The PDX website described differences of reflectance responses depending on the terrain feature.   If this feature was a runway the square and the diamond may appear as different shades of magenta because one is concrete and the other is asphalt.   Another explanation for the color shade difference could be the age of the terrain feature.   Maybe the square and diamond are the same material but one was resurfaced or is older than the other surface.  To confirm my suspicion that this was some type of airport I used Google Earth.   The feature is a Naval Outlying Field that is used for helicopter training which explained the difference in the runway layout versus a traditional airport.


I feel less sure of my understanding of the relationship between bands and layers and how to know which band combination is covering what wavelengths.   I think some of my confusion is related to semantics and the interchanging of the words bands and layers.

Spencer Naval Outlying Field Used For Helicopter Training Displayed Best in R-7, G-4, B-2 Band Combination

Tuesday, October 18, 2016

GIS4035 - Lab 7 - Multispectral Analysis

In Lab 7 we learned four different steps to identify features in ERDAS Imagine and in ArcMap.   Each lab helps me better understand some basic EMR concepts as well as become more familiar ERDAS Imagine but I always feel a little overwhelmed with the amount of material and information covered.  The first four lab exercises explained how to view and use an image's histogram in order to identify features.  Spikes in the histogram indicate a cluster of pixels at certain brightness values.  If a spike is high/large then the frequency is high meaning there are a lot of pixels in the image with that same pixel brightness value or brightness range.   Conversely, a small spike indicates low frequency and there are a few clusters of pixels with that pixel brightness value.  Pixels with low brightness values (near 0) have a dark appearance and pixels with a high brightness value (maximum brightness depends on Data Type - Ex. 8 bit data type has a Max value of 256) have a light appearance.  Examining an image visually by displaying it in gray scale or various multispectral band combinations can aid in feature interpretation.  Features' reflectance properties usually vary across different bandwidths.  Using an Inquiry Cursor can let you look at the pixel values for that selected pixel (or coordinate if using Lat/Long) across all layers.

Exercise 5 required us to identify three different features with provided clues in the image.

Feature 1:

First I started off using Panchromatic view of the image displaying Layer 4.  I knew that pixels with values ranging from 12-18 would be dark.  Since the spike on the histogram of this layer was large/tall I new the frequency of pixels with this value was high.  This helped me deduce that the feature was a water body because what appeared dark all over the map was water bodies.  I verified that different water bodies in the image had the same pixel range in Layer 4.  I then chose a particular water body from the image to create a subset.  I then displayed it in a multispectral band combination using False Natural color RGB-543.   This band combo made the feature stand out in my subset image.




Feature 2:

I used multiple views in ERDAS Imagine to examine the image in different multispectral bands as well as in grey scale.  The information provided for this feature helped me deduce that the feature was very bright (light colored/white) in layers 1-4 and there was not a high frequency or a lot of pixels with this brightness due to the small spike.  This made me zoom in on the white areas on the image.  I could then use the Inquiry cursor and corresponding table to see the different pixel values for each layer.  I then compared the pixel values for these white areas on the mountains with smaller white areas in the image.   The smaller white areas did not have the same pixel values so I deduced these were cloud features.  Various band combos helped identify the larger white area feature more distinctly.   Probably the False Natural color combo displayed the feature best but I had used that combo for Feature 1 so I chose to display with Near IR band combo.  I deduced that these features were snow/ice because I looked at each layer in grey scale and could see that they appeared white/bright in layers 1-4 and dark in layers 5-6.




Feature 3:

This last feature stumped me even though at first look of the tm_00 image file I noticed something different in the bottom right of image.  I knew that the vast majority of water bodies were appearing very dark in the image and I scoured the image, or so I thought, trying to zoom in and see a different looking water body.  I finally found the area that I had originally noticed at the very beginning of the assignment.  I used the Inquiry cursor and table to compare the water body feature in the bottom right of the image with the bodies of water in the rest of the image.  I deduced that layers 1-3 appear more bright than normal because the body of water is shallow.  I googled and found that a 453 (RGB) band combo can help display the differences in water bodies.   I did change the band combo and liked the colors of the image; it reminded me of Klimt’s “Kiss” painting – sparkly/gold.   I didn’t have a name for this band combo like False Natural or Near IR so I didn’t use it but instead displayed the feature in True Color. 



I enjoyed the riddle if you will of this assignment in trying to solve/identify the unknown features.   I still do not fully understand which multispectral combinations are best for identifying certain feature types.  I also do not know what band number a layer is as the lab stated that an image's layer numbers do not always correlate to a band number.   I am hoping with more experience I will better understand these relationships.