From 858a45d30aefc03097f57c844a05c90aaeab78c3 Mon Sep 17 00:00:00 2001 From: Oleg Alexandrov Date: Sun, 15 Sep 2024 10:51:53 -0700 Subject: [PATCH] dem_mosaic doc: replaced word grow with word extrapolate --- docs/examples/csm.rst | 2 +- docs/examples/kaguya.rst | 2 +- docs/next_steps.rst | 6 +++--- docs/sfs_usage.rst | 4 ++-- docs/tools/dem2gcp.rst | 2 +- docs/tools/dem_mosaic.rst | 18 ++++++++---------- docs/tools/point2dem.rst | 2 +- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/docs/examples/csm.rst b/docs/examples/csm.rst index e25da04e2..5f5fb2b96 100644 --- a/docs/examples/csm.rst +++ b/docs/examples/csm.rst @@ -942,7 +942,7 @@ as in :numref:`csm_msl`. The quality of the produced DEM can be quite uneven, especially far from the camera. Large holes in the initial DEM were filled in with the ``dem_mosaic`` option -``--fill-search-radius`` (:numref:`dem_mosaic_grow`). +``--fill-search-radius`` (:numref:`dem_mosaic_extrapolate`). Then, it can be made coarser, for example, as:: diff --git a/docs/examples/kaguya.rst b/docs/examples/kaguya.rst index e93db9d48..fca775cda 100644 --- a/docs/examples/kaguya.rst +++ b/docs/examples/kaguya.rst @@ -125,7 +125,7 @@ any holes:: Inspect the produced DEM ``stereo/run-DEM.tif`` in ``stereo_gui`` in hillshading mode. Any additional holes can be filled with ``dem_mosaic`` -(:numref:`dem_mosaic_grow`). +(:numref:`dem_mosaic_extrapolate`). It is also suggested to blur it a little, to make it smoother:: diff --git a/docs/next_steps.rst b/docs/next_steps.rst index 81332da13..0b9279078 100644 --- a/docs/next_steps.rst +++ b/docs/next_steps.rst @@ -470,7 +470,7 @@ Hole-filling and smoothing the input DEM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It is suggested to inspect and then hole-fill the input DEM -(:numref:`dem_mosaic_grow` and :numref:`dem_mosaic_fill`). +(:numref:`dem_mosaic_extrapolate` and :numref:`dem_mosaic_fill`). If the input DEM has too much detail, and those features do not agree with the images mapprojected on it, this can result in artifacts in the final DEM. A blur @@ -586,7 +586,7 @@ resolution switched to meters from degrees (see :numref:`dg-mapproj` for more details). This DEM can be hole-filled and blurred with ``dem_mosaic`` if needed -(:numref:`dem_mosaic_grow`), producing a DEM called +(:numref:`dem_mosaic_extrapolate`), producing a DEM called ``run_nomap/run-smooth.tif``. Inspect the result. It should be smooth and with no holes. @@ -711,7 +711,7 @@ misregistration artifacts transfer over to the mapprojected images. Ensure the input DEM is relative to an ellipsoid and not a geoid (:numref:`conv_to_ellipsoid`). -Fill and blur the input DEM if needed (:numref:`dem_mosaic_grow`). +Fill and blur the input DEM if needed (:numref:`dem_mosaic_extrapolate`). Commands:: diff --git a/docs/sfs_usage.rst b/docs/sfs_usage.rst index 3545b089f..dcb8f653f 100644 --- a/docs/sfs_usage.rst +++ b/docs/sfs_usage.rst @@ -314,7 +314,7 @@ invoked with no input grid size, computes the grid size as the image GSD, and that value can then be used when creating the input SfS DEM. If this DEM has holes, those can be filled in ``dem_mosaic`` -(:numref:`dem_mosaic_grow`). +(:numref:`dem_mosaic_extrapolate`). The ``dem_mosaic`` program can also apply some blur to attenuate big artifacts (:numref:`dem_mosaic_blur`). Use, for example, ``--dem-blur-sigma 2``. Note that @@ -931,7 +931,7 @@ Any spikes or other artifacts should be blurred, such as by running:: dem_mosaic --dem-blur-sigma 2 ref.tif -o ref_blur.tif -Any holes can also be filled ``dem_mosaic`` (:numref:`dem_mosaic_grow`, +Any holes can also be filled ``dem_mosaic`` (:numref:`dem_mosaic_extrapolate`, :numref:`dem_mosaic_fill`). A subsequent blur with a sigma of 2 pixels is suggested (:numref:`dem_mosaic_blur`). diff --git a/docs/tools/dem2gcp.rst b/docs/tools/dem2gcp.rst index d08f26ebf..bd9ff1772 100644 --- a/docs/tools/dem2gcp.rst +++ b/docs/tools/dem2gcp.rst @@ -81,7 +81,7 @@ must be very similar. maps are in :numref:`kh7_orig_vs_opt`. Some hole-filling and blur can be applied to the ASP DEM with ``dem_mosaic`` -(:numref:`dem_mosaic_blur` and :numref:`dem_mosaic_grow`). +(:numref:`dem_mosaic_blur` and :numref:`dem_mosaic_extrapolate`). A command as:: diff --git a/docs/tools/dem_mosaic.rst b/docs/tools/dem_mosaic.rst index 62c1831e0..3ea76cfc6 100644 --- a/docs/tools/dem_mosaic.rst +++ b/docs/tools/dem_mosaic.rst @@ -159,12 +159,12 @@ Fill small holes dem_mosaic --hole-fill-length 50 input.tif -o output.tif -.. _dem_mosaic_grow: +.. _dem_mosaic_extrapolate: -Grow a DEM -^^^^^^^^^^ +Extrapolating a DEM +^^^^^^^^^^^^^^^^^^^ -:: +To extrapolate a DEM based on a weighted average of neighbors, run:: dem_mosaic \ --fill-search-radius 25 \ @@ -177,7 +177,7 @@ This command will become very slow for large ``--fill-search-radius``. It is suggested to increase ``--fill-num-passes`` instead. This method will also grow the DEM outwards, not just within -a hole. +a hole, unlike the hole-filling example in :numref:`dem_mosaic_fill`. It is suggested to blur a little the obtained DEM, such as:: @@ -189,11 +189,9 @@ except a small transition area at the boundary, run:: dem_mosaic --priority-blending-length 20 \ input.tif blurred.tif -o output.tif -Unlike the fill example in :numref:`dem_mosaic_fill`, in this mode the tool will -not try to fill small holes of a given diameter that are fully surrounded by -valid data. Instead, for any pixel that is invalid (lacks data), ``dem_mosaic`` -will search for valid pixels within the specified search radius. If the -percentage of valid to total number of found pixels is no less than the +The extrapolation works as follows. For any pixel that is invalid (lacks data), +``dem_mosaic`` will search for valid pixels within the specified search radius. +If the percentage of valid to total number of found pixels is no less than the specified value, the invalid pixel will be filled with the weighted average of the valid pixel values, with the weight given as: diff --git a/docs/tools/point2dem.rst b/docs/tools/point2dem.rst index 779cfd3d5..d2f3ffc4a 100644 --- a/docs/tools/point2dem.rst +++ b/docs/tools/point2dem.rst @@ -536,7 +536,7 @@ Command-line options for point2dem --dem-hole-fill-len Maximum dimensions of a hole in the output DEM to fill in, in pixels. - For large holes, use instead ``dem_mosaic`` (:numref:`dem_mosaic_grow`). + For large holes, use instead ``dem_mosaic`` (:numref:`dem_mosaic_extrapolate`). --orthoimage-hole-fill-len Maximum dimensions of a hole in the output orthoimage to fill