Skip to content

Commit

Permalink
Updated README file
Browse files Browse the repository at this point in the history
Updated README file
  • Loading branch information
jblindsay committed Jan 25, 2018
1 parent f34f5d2 commit b1dd3ef
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,29 @@ fp_denoise
Description
-----------

*fp_denoise* is a command-line program for performing feature-preserving de-noising, intented for application with raster digital elevation models (DEMs). It is an implementation of Sun's 2007 (*Fast and Effective Feature-Preserving Mesh Denoising*) [de-noising algorithm](https://github.com/exuberant/mdenoise). The algorithm has been developed using the [Nim programming language](https://nim-lang.org). The implementation has been modified in the following ways:
*fp_denoise* is a command-line program for performing feature-preserving de-noising, intented for application with raster digital elevation models (DEMs). It is a modified implementation of Sun's 2007 (*Fast and Effective Feature-Preserving Mesh Denoising*) [de-noising algorithm](https://github.com/exuberant/mdenoise). The algorithm has been developed using the [Nim programming language](https://nim-lang.org). The implementation has been modified in the following ways:

- The algorithm assumes that the underlying data structure is a raster rather than a TIN.
- Normal vectors are calculated planes fit to the 3x3 neighbourhood surrounding each grid cell rather than triangular facets.
- The normal vector field is smoothed using a convolution filter rather than iteration.
- The user inputs the normal vector deviation angle threshold in degrees rather than a cosine angle.
- The method for updating elevations differs from Sun's method.
- The user may optional specify a weighting scheme for normal vector smoothing that uses either Sun's original method (ni . nj - T) or a simple thresholded mean filter (i.e. all neighbouring grid cells with normal vectors that deviate from the centre cell by less than the threshold are given equal weighting). This both increases the efficiency and the degree of smoothing.
- There is an optional hillslope raster input that ensure there is no smoothing across channels and drainage divides.
- There is an optional hillslope raster input that ensure there is no smoothing across channels and drainage divides. A hillslope raster can be created using the *Hillslopes* tool in [**WhiteboxTools**](https://github.com/jblindsay/whitebox-geospatial-analysis-tools/tree/master/whitebox_tools) based on a D8 flow direction raster and a raster streams file (also derived using WhiteboxTools).
- There is an optional shaded relief raster output.

These modifications generally result in more efficient denoising. The algorithm has been demonstrated to work well with fine-resolution LiDAR data. Note that the input DEM should be in a projected coordinate system (e.g. UTM) and in a [Whitebox GAT](http://www.uoguelph.ca/~hydrogeo/Whitebox/) or ArcGIS ASCII raster format.

The general workflow of the method is divided into three components:

1. A normal vector is calculated for each grid cell in the input DEM based on the eight neighbouring cells in the 3 x 3 neighbourhood.

2. The normal vector field is smoothed using a low-pass filtering technique that preserves features, or breaks in slope, by excluding neighbours that have differences in normal vectors from the centre-cell vector by more than a user-specified threshold. The size of the convolution filter kernel is also specified by the user.

3. The smoothed normal vector field is used to update the elevations in the output DEM using an iterative process.

Although the algorithm, like Sun's mdenoise, is currently single-threaded, there is potential to parallelize Steps 1 and 2 in the above workflow. Future versions will likely add this feature to further enhance algorithm efficiency.

Installing
----------

Expand All @@ -34,7 +44,7 @@ Usage
| --wd | Working directory; appended to input/output file names |
| -i, --input | Input DEM file name |
| -o, --output | Output DEM file name |
| --hillslope, --hs | Optional hillslope raster file name |
| --hillslope, --hs | Optional input hillslope raster file name |
| --threshold | Threshold value in degrees (1.0 - 85.0) |
| --filter | Filter size for normal smoothing (odd value >3) |
| --iterations | Number of iterations used for elevation updating |
Expand Down

0 comments on commit b1dd3ef

Please sign in to comment.