Goals and Background
The main goal of this lab is to learn the skills involved in performing object-based classification in eCognition which is a top of the line image processing tool. The topics explored in this lab are fairly new to the remote sensing frontier, integrating both spectral and spatial information to extract land surface features from remotely sensed images which in this case is satellite imagery. The main objectives in this lab are as follow:
1) Segment an image into homogeneous spatial and spectral clusters
2) Select appropriate sample objects to train a random forest classifier
3) Execute and refine object-based classification output from random forest classifier
4) Select appropriate sample objects to train a support vector machine classifier
5) Execute and refine object-based classification output from support vector machine classifier.
1) Segment an image into homogeneous spatial and spectral clusters
2) Select appropriate sample objects to train a random forest classifier
3) Execute and refine object-based classification output from random forest classifier
4) Select appropriate sample objects to train a support vector machine classifier
5) Execute and refine object-based classification output from support vector machine classifier.
Methods
Part 1: Create a new project
The first portion of the lab is all about importing imagery into eCognition and setting up a new project. I imported the image set the resolution to 30m/pxl and made sure the geocoding box was selected. Next I changed the color scheme to false infrared by setting a 4,3,2 band combination in the image layer mixing window.
Part 2: Segmentation and sample collection
Section 1: Create image objects
The first part of the analysis is creating image objects. This is a grid that is placed over the image made up of many polygons. The polygons shapes are based on parameters set by the user. In order to create this grid a process tree is created. A process tree is where all the commands or tools are placed that the user wants eCognition to run. It is called a tree because it is modeled after a family tree with parents and children which make up the hierarchy of the operations. I created a new process and added a child to it. The child is labeled generate objects and is the tool that created the image object grid. In the generate objects object window the shape was set to .3 the compactness was set to .5 and the scale parameter was set to 9 as seen below in Figure 1. The settings for shape and compactness are decided through trial and error. The goal is to find a combination where the image object polygons are tight to homogeneous objects and pixel values in the aerial imagery. After these are set I hit execute and Figure 2 is what eCognition creates over the imagery.
Figure 1 This is the window set up the generate object process. |
Figure 2 This is the image object grid that eCognito creates over the image. |
Section 2: Training Sample selection
The next step after the segmentation is to collect training samples. First I created classes of LULC in the class hierarchy. The classes are forest as dark green, agriculture as pink, urban as red, water as blue, green vegetation as light green, and bare soil as yellow (Figure 3). Once the classes are created training samples can be collected. This is done by selecting a class and then in the image object grid double clicking on polygons that contain that LULC class (Figure 4). This is done for each class and I collected the following number of samples for each class:
- Forest 10
- Urban 20
- Water 10
- Green vegetation 15
- Bare soil 15
Figure 3 These are the 5 classes create in eCognition. |
Figure 4 You can see the training samples collected for each class by color. |
Part 3: Implement object classification
Section 1: Insert and train Random Forest classifier based on sample objects
The object-based classification process is fairly robust and the process tree is rather large but explained here is most of the step by step process to complete the classification. The first step is append new after the generate objects process and label it RF classification for random forest classification. Add a child under this RF process and label it train RF classifier. Figure 5 is the window to set up the train RF classifier child. The training samples are brought in via the feature drop down. Next I selected the feature I wanted included from the select features window Figure 6.
Figure 5 Window to set up the RF classifier trainer. |
Figure 6 This is the window to select the features used in the classification. |
Section 2: Perform Random Forest Classification
Next another child is added to the RF classification process called apply RF classifier. Once all of the the parameters are entered the classification can be run by clicking execute on the apply RF classifier child. Figure 7 is the complete process tree for the RF classification.
Figure 7 This is the final process tree for the RF classifier. |
Section 3: Refine classification by editing signatures
Once the classifier has been run if there are errors the user can go in and manually change the class of an image object in the image. This is a simple process. Select the class that the error occurred in and then the class you want it to be changed to and click on the polygon and it will change.
Section 4: Export classified image to Erdas Imagine format
The classified image created in eCognition (Figure 8) does not have the color scheme I want to compare this classification method to the supervised and unsupervised methods done in labs 4 and 5. To fix this the classified image is export to ERDAS Imagine where the I reassigned color.
Figure 9 This is the RF classified image created by eCognition. |
Part 4: Support Vector Machines
Section 1: Save project and modify Process Tree
The final part of this lab involved running support vector machine classification instead of the random forest method. To do this the process tree from the RF classification is modified. The same steps are followed as for the RF classification except when the classifier is being trained. Figure 10 is the window where this change occurs. Figure 11 is the final process tree for the SVM classification. A comparison of the RF and SVM final classified images can be found below in the results section in Figure 12.
Figure 10 This the window to set up the SVM classifier trainer. |
Figure 11 This is the final process tree for the SVM classification method. |
Results
Figure 12 The final RF classified image from ERDAS is on the left and the SVM classified image is on the right. |
No comments:
Post a Comment