Applies morphological operations (opening, closing, erosion, dilation) on raster datasets.
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.
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.
In this example a morphological closing operation is applied on morph_building.tif
dataset. The dataset is a binary GeoTiff grid:
For the Close operation the square-shaped kernel is applied with 1 pixel radius:
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:
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:
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.