Table of Contents
- See Also
- opals::IMorph
Aim of module
Applies morphological operations (opening, closing, erosion, dilation) on raster datasets.
General description
The morphological operations applied in this module are based on binary mathematical morphology. The basic idea in binary morphology is to probe an image with a simple, pre-defined shape, drawing conclusions on how this shape fits or misses the shapes in the image. This simple "probe" is called structuring element (or kernel), and is itself a binary image (i.e., a subset of the grid).
The basic operations are erosion and dilation. If we have a binary image A and the structuring element B that has a center, the erosion of A by B can be understood as the locus of points reached by the center of B when B moves inside A. If B has a center, as before, then the dilation of A by B can be understood as the locus of the points covered by B when the center of B moves inside A.
Opening implies erosion and dilation in this order, while closing consists of dilation and erosion applied in this order.
Opening by a disk rounds or eliminates all peaks extending into the images background (smoothing from inside) while closing by a disk rounds or eliminates all cavities extending into the image foreground.
Parameter description
Remarks: estimable
Morphilogically filtered raster in GDAL supported format.
Estimation rule: The current directory and the name (body) of the input file are used as file name basis. Additionally, a postfix (containing the performed operation, kernel shape and size) and the extension according to the specified output format are constructed (e.g. '_dilate_circle_1.tif').
Remarks: estimable
Use GDAL driver names like GTiff, AAIGrid, USGSDEM, SCOP... .
Estimation rule: The output format is estimated based on the extension of the output file (*.tif->GTiff, *.dem->USGSDEM, *.dtm->SCOP...).
Remarks: mandatory
Possible values: erode .... morphological erosion filter dilate ... morphological dilation filter open ..... morphological opening filter close .... morphological closing filter
Morphological operation type: DILATE, ERODE, OPEN or CLOSE
Remarks: mandatory
Possible values: square .... square kernel (Chebyshev metrics)) circle .... circular kernel (Euclidean metrics) diamond ... diamond kernel (Manhattan metrics)
Kernel shape types refer to Manhattan (=Diamond), Euclidean (=Circle) orChebyshev (=Square) metrics
Remarks: default=1
Kernel radius
Restrictions
- The whole input raster must fit into the memory (RAM).
Examples
The data used in the following example are located in the$OPALS_ROOT/demo/ directory. For the strip 19 (contained in the demo directory) the following commands are required to obtain DSM model:
As a result, a grid file strip21.tif in GeoTiff format is created. To obtain a binary grid of potential buildings areas we apply a simple thresholding to get morph_building.tif serving as input for the subsequent example.
Example 1:
In this example a morphological closing operation is applied on morph_building.tif dataset. The dataset is a binary GeoTiff grid:
The output is written to a separate grid mask file in GeoTiff format (morph_building_close_square_1.tif) and is shown on the following figure:
Example 2:
We can also apply the Open operation on the previous image:
The output is written to a separate grid mask file in GeoTiff format (morph_building_close_open_square_1.tif) and is shown on the following figure:
References
Hollaus, M., W. Wagner, G. Molnar, G. Mandlburger, C. Nothegger, J. Otepka (2010) Delineation of vegetation and building polygons from full-waveform airborne lidar data using OPALS software, Geospatial Data and Geovisualization: Environment, Security, and Society, Special Joint Symposium of ISPRS Technical Commission IV and AutoCarto 2010 in conjunction with ASPRS/GaGIS Speciality Conference, 15999 November 2010, Orlando, Florida, USA, CDROM, 7 p.
