Talk:Region Growing Segmentation
Line 1: | Line 1: | ||
− | + | =Region Growing Segementation with Saga's Seeded Region Growing Tool= | |
The following tutorial explains how to delineate tree crowns, using SAGA's Seeded Region Growing Tool. The product, a polygon shapefile, can then be used in an object based classification, f.ex. in order to classify different tree species. | The following tutorial explains how to delineate tree crowns, using SAGA's Seeded Region Growing Tool. The product, a polygon shapefile, can then be used in an object based classification, f.ex. in order to classify different tree species. | ||
Line 11: | Line 11: | ||
A multispectral image of the forest canopy | A multispectral image of the forest canopy | ||
+ | |||
A canopy height model [[Canopy_Height_Model_based_on_Airborne_Laserscanning_using_LAStools#Create_a_CHM_directly_from_height-normalized_points:_lasthin_and_las2dem|CHM]] | A canopy height model [[Canopy_Height_Model_based_on_Airborne_Laserscanning_using_LAStools#Create_a_CHM_directly_from_height-normalized_points:_lasthin_and_las2dem|CHM]] | ||
Line 32: | Line 33: | ||
The first step here is to extract the position of the tree tops, which are going to be the starting point for the region growing algorithm. You find a description of how to derive the seed points from a CHM [[Individual_Tree_Detection_(ITC)|here]] . | The first step here is to extract the position of the tree tops, which are going to be the starting point for the region growing algorithm. You find a description of how to derive the seed points from a CHM [[Individual_Tree_Detection_(ITC)|here]] . | ||
Now have a look at how the seeds align with your multiband image | Now have a look at how the seeds align with your multiband image | ||
+ | |||
+ | |||
[[File:Unfiltered_seed_points.PNG]] | [[File:Unfiltered_seed_points.PNG]] | ||
− | In this picture you see, that the points align well with the tree tops. However, there are many points that represent small trees (in the lower left corner) which you might not be so interested in. In order to correct that, we are going to filter the points by their height in the seed shapefile and save the shapefile with the selected seeds only | + | In this picture you see, that the points align well with the tree tops. However, there are many points that represent small trees (in the lower left corner) which you might not be so interested in. In order to correct that, we are going to filter the points by their height in the seed shapefile and save the shapefile with the selected seeds only as a new shapefile. |
− | If the seed points do not fit the image well, it might be due to the fact that you are using an orthophoto and not a true orthophoto. If you are working only with a smaller | + | If the seed points do not fit the image well, it might be due to the fact that you are using an orthophoto and not a true orthophoto. If you are working only with a smaller dataset you can help it by using the {{button|text=Georeferencer}} in the {{button|text=Raster menu}} by rubberheeting your orthophoto to make it fit. You'll find the instructions for doing so [[Georeferencing_of_UAV photos|here]]. |
Line 50: | Line 53: | ||
=Seed point rasterization= | =Seed point rasterization= | ||
− | |||
− | In order to | + | In order to use the seed points in the region growing algorithm in SAGA, we have to convert the vector file to a raster file using the Rasterize module from the SAGA tools in QGIS. It is critical that we create a raster file that only contains the seed points and no-data. So every pixel outside the seed points has to be no-data. It is also critical that our rasterized vector image has the '''exact same''' CRS, extend and pixel size as the single band images. If this is not the case, SAGA will calculate a segment for every pixel. |
+ | |||
+ | * In the {{button|text=Processing Toolbox}}, type 'rasterize' and select the {{button|text=Rasterize}} tool ind the SAGA geoalgorithms submenu. | ||
+ | * Select the seed point shapefile as input | ||
+ | * Fill in the menu like this: | ||
+ | |||
[[File:Rasterize.PNG]] | [[File:Rasterize.PNG]] |
Revision as of 10:59, 9 April 2018
Contents |
Region Growing Segementation with Saga's Seeded Region Growing Tool
The following tutorial explains how to delineate tree crowns, using SAGA's Seeded Region Growing Tool. The product, a polygon shapefile, can then be used in an object based classification, f.ex. in order to classify different tree species.
Material you need to complete the tutorial
Data
A multispectral image of the forest canopy
A canopy height model CHM
Software
QGIS 2.18.11
SAGA 2.3.2
Split multiband image into several raster images
SAGA's Region Growing Algorithm works only with single band images. Therefor, we have to split our multiband image into its individual bands following these instructions.
Seed points
The first step here is to extract the position of the tree tops, which are going to be the starting point for the region growing algorithm. You find a description of how to derive the seed points from a CHM here . Now have a look at how the seeds align with your multiband image
In this picture you see, that the points align well with the tree tops. However, there are many points that represent small trees (in the lower left corner) which you might not be so interested in. In order to correct that, we are going to filter the points by their height in the seed shapefile and save the shapefile with the selected seeds only as a new shapefile.
If the seed points do not fit the image well, it might be due to the fact that you are using an orthophoto and not a true orthophoto. If you are working only with a smaller dataset you can help it by using the Georeferencer in the Raster menu by rubberheeting your orthophoto to make it fit. You'll find the instructions for doing so here.
This looks much better:
Seed point rasterization
In order to use the seed points in the region growing algorithm in SAGA, we have to convert the vector file to a raster file using the Rasterize module from the SAGA tools in QGIS. It is critical that we create a raster file that only contains the seed points and no-data. So every pixel outside the seed points has to be no-data. It is also critical that our rasterized vector image has the exact same CRS, extend and pixel size as the single band images. If this is not the case, SAGA will calculate a segment for every pixel.
- In the Processing Toolbox, type 'rasterize' and select the Rasterize tool ind the SAGA geoalgorithms submenu.
- Select the seed point shapefile as input
- Fill in the menu like this:
Make sure that the output resolution has the exact same size as the orthophoto that you are using. Best is to copy from the properties of the raster. Choose the xtend by selecting the orthophotos extend. Nodata value should be set to 0. Next, check the properties of the newly created raster layer and load the min/max values in the styles menu.
The result should look like the universe:
Next steps:
Translate seed raster to set all pixels to no-data that are not seeds....
Next: Split stack with translate picture files
next: superimpose extend and origin
Check everything: pixels should align 100%
Next saga: growing regions algorithm
Basis of algorithm citation settings export with vectorize adjust enjoy