A Learning Tool in QGIS
Total Page:16
File Type:pdf, Size:1020Kb
Processing Image to Geographical Information Systems (PI2GIS) – a learning tool in QGIS Rui Filipe Canelas Correia Mestrado em Engenharia Geográfica Departamento de Geociências, Ambiente e Ordenamento do Território 2017 Orientadora Professora Doutora Ana Cláudia Teodoro, Professora Auxiliar com Agregação, Faculdade de Ciências Universidade do Porto Coorientadora Professora Lia Bárbara Duarte, Professora Auxiliar Convidada, Faculdade de Ciências Universidade do Porto da Todas as correções determinadas pelo júri, e só essas, foram efetuadas. O Presidente do Júri, Porto, ______/______/_________ FCUP 3 Processing Image to Geographical Information Systems – a learning tool in QGIS Acknowledgments I would like to seek the opportunity to say thank you to all those who supported me during this work. A special thanks goes to my supervisor, Ana Teodoro for the good advises, motivational conversations and scientific support whenever it was needed. Especially mentioned should be Lia Duarte that provided me with an outstanding support in the development of my program. Furthermore, a big thank you goes to my family and girlfriend, for believing in my potential and for the emotional support. FCUP 4 Processing Image to Geographical Information Systems – a learning tool in QGIS Abstract To perform an accurate interpretation of remote sensing images, it is necessary to extract useful information using different image processing techniques. Nowadays, it is usual to use image processing plugins to add new capabilities/functionalities for Geographical Information System (GIS) software. The aim of this work was to develop an open source application to automatically process and classify remote sensing images from a set of satellite input data. The application was integrated in a free open source GIS software (QGIS), automating several image processing steps. It is quick, efficient and easy to use. Furthermore, the use of QGIS for this purpose was justified since it is easy and quick to develop new plugins using Python language. This plugin was inspired in the Semi-Automatic Classification Plugin (SCP) developed by Luca Congedo. SCP allows the supervised classification of remote sensing images, the calculation of vegetation indices such as NDVI (Normalized Difference Vegetation Index) and EVI (Enhanced Vegetation Index) and other image operations. When analysing SCP, it was realised that a set of operations, that are very useful in teaching classes of remote sensing and image processing, were lacking, such as the visualization of histograms, the application of filters, different image corrections, unsupervised classification and other environmental indices. The new set of operations included in the PI2GIS plugin can be divided into three groups: pre-processing, processing, and classification. The application developed was tested in two regions from the North area of Portugal: Aveiro district and Vila Nova de Gaia municipality considering data from Landsat 8 OLI. Keywords: GIS, QGIS, Semi-Automatic Classification Plugin, vegetation indices. FCUP 5 Processing Image to Geographical Information Systems – a learning tool in QGIS Resumo Na área da deteção remota, a interpretação de imagens de satélite é normalmente efetuada com recurso a diferentes técnicas de processamento de imagem de modo a extrair informação interpretável e útil. Atualmente, a utilização/desenvolvimento de plugins permite acrescentar novas funcionalidades em softwares livres e de código aberto de Sistemas de Informação Geográfica (SIG) com esse objetivo. O objetivo deste trabalho consistiu no desenvolvimento de uma aplicação open source que permite automatizar o processamento e a classificação de imagens de satélite. A aplicação foi implementada no software SIG QGIS. O software QGIS foi escolhido devido à facilidade no desenvolvimento de novos plugins através do suporte online que fornece, usando a linguagem de programação Python. Este plugin foi inspirado no “Semi - Automatic Classification Plugin (SCP)” desenvolvido por Luca Congedo, com o qual é possível aplicar diferentes algoritmos de classificação supervisionada, efetuar o cálculo de índices de vegetação tais como NDVI (Normalized Difference Vegetation Index) e o EVI (Enhanced Vegetation Index) e ainda outras operações de processamento de imagem. Ao analisar o SCP, verificou-se que faltavam algumas ferramentas de processamento de imagem que podem ser úteis para serem usadas em contexto de sala de aula, ao nível de ensino superior em aulas relacionadas com o tópico de deteção remota, tais como a visualização de histogramas, a aplicação de filtros, correções nas imagens ao nível de contraste e brilho, algoritmos de classificação não supervisionada e cálculo de outros índices ambientais. O plugin - PI2GIS - está dividido em três componentes: pré-processamento, processamento e classificação. O plugin foi testado com imagens Landsat 8 (OLI) em duas áreas do norte de Portugal: no distrito de Aveiro e no concelho de Vila Nova de Gaia. Palavras – Chave: SIG, QGIS, Semi-Automatic Classification Plugin, índices de vegetação FCUP 6 Processing Image to Geographical Information Systems – a learning tool in QGIS Index Abstract ........................................................................................................................ 4 Resumo ........................................................................................................................ 5 Acronyms .................................................................................................................... 10 1. Introduction .......................................................................................................... 12 2. State of the art ..................................................................................................... 13 2.1 Landsat missions .......................................................................................... 13 2.2 Processing image concepts .......................................................................... 15 2.2.1 Histograms ................................................................................................ 15 2.2.2 Light and Contrast Enhancement .............................................................. 15 2.2.3 Histogram Equalization ............................................................................. 17 2.2.4 Filters ........................................................................................................ 17 2.2.5 Unsupervised classification (k-means algorithm) ....................................... 19 3. Methodology ........................................................................................................ 20 3.1 PI2GIS application ........................................................................................ 20 3.2 Dataset and study areas ............................................................................... 22 3.3 Data Download ............................................................................................. 23 3.4 External tools ................................................................................................ 24 3.5 Treatment of the Data ................................................................................... 24 3.6 Pre- Processing group .................................................................................. 24 3.7 Processing group .......................................................................................... 31 3.8 Classification group ...................................................................................... 32 4. Results and Discussion ........................................................................................ 34 4.1 Aveiro district ................................................................................................ 34 4.1.1 Pre – Processing results for Aveiro district ................................................ 34 4.1.2 Processing group for Aveiro district ........................................................... 40 4.1.3 Classification results for Aveiro district ...................................................... 42 4.2 Vila Nova de Gaia municipality ..................................................................... 46 4.2.1 Pre – Processing results for Gaia Municipality........................................... 46 4.2.2 Processing group for Vila Nova de Gaia municipality ................................ 50 4.2.3 Classification results for Vila Nova de Gaia municipality ............................ 52 FCUP 7 Processing Image to Geographical Information Systems – a learning tool in QGIS 5. Conclusions ......................................................................................................... 57 6. Future work .......................................................................................................... 58 7. References .......................................................................................................... 60 Annex ......................................................................................................................... 64 Figures Figure 1 - Landsat images timeline. Reprinted from USGS website [12] ..................... 13 Figure 2 - The procedure for creating an image histogram. Reprinted from National Learning Network for Remote Sensing [14] ................................................................. 15 Figure 3 - a) and c) Originals histograms b) histogram with increased brightness d) histogram with increased contrast.