Object-based Analysis and Coding for classification

It has been more than one month since last reflection, and I have made huge progress since then. My work in this month can be divided to two parts, one is objected-based analysis, and another is compiling codes. Although there are some problems, I have succeeded in mapping impervious surface in terms of results and integrated it with Syncarto to achieve an automatic classification.

As I mentioned in last reflection, I derived height information form LiARD data, conducted Multiresolution Segmentation in eCognition, and tried to use thresholding method to distinguish different land covers. I calculated NDVI using the Red band and NIR band from Orthoimagery, and objects with NDVI greater than 0.05 are classified to veg class, and objects with NDVI less than -0.38 are classified to water. Those with NDVI between 0.05 and -0.38 remain as non-water/veg class and are used for mapping impervious surface.

However, Orthoimagery is leaf-off images, which leads to low NDVI values in some trees area, making it hard to separate them from other objects with low NDVI values. To solve this problem, the NDVI image from satellite image is added to implement information. I used the NDVI image from Sentinel 2 of July 8th, 2017 as another new layer and added it to the stacked image. The new stacked image could be helpful for masking the rest vegetation objects.

After water, trees and other vegetation have been masked, the buildings could be easily extracted by height information. The rest of the image consists of roads, parking lots, bare soil and agriculture fields. It is really hard to find optimal indices and thresholds to separate them apart. So, I used SVM supervised classification. Training sites are selected in object level, and features used for model training are NDVI of Orthoimagery, mean value of each band, height information, length-width ratio, roundness and shape index.

Object-based classification map
Two-value classification map
Two-value classification map of shadow areas

The Objected-based classification gives pretty good results, and even the shadow areas have been recognized well. However, Syncarto don’t have the license for eCognition, which means we can’t use the source code from OBA and can’t integrate it to Syncarto.

The only thing I can do is to select training sites from the image and use Orfeo Toolbox to train a spectral model. Fortunately, the model trained by one image can be applied to other images because they all belong to Middleton area and have similar spectral features.

OTB classification code

The classification code is easy to write because OTB website has the example. And Mike, the developer of Syncarto, has taught me how to integrate my code to their workspace. Thanks to him, I spared less effort in learning Python and acquired the knowledge about Python structures, software, and other skills that I didn’t know before.

Now, the code can work smoothly in the local server and generate good results. The next step is to make it work in Syncarto web application. Once it can work in the web server, my work may end at that point.

This is an excellent placement for me to start my career. I have put what I have learned into practice and acquired some new skills about development. Now many companies have the requirement of knowing at least one programming language, and my placement has provided me with such experience. Thanks to Sarah, it is her that introduce me to this company. And thanks to my advisor and host supervisors, they leaded me to a good start point and gave me feedback during this period. I will keep what I have learned in mind and move on to the next station of my life.

Leave a comment