Skip to content

Commit

Permalink
dem_mosaic doc: replaced word grow with word extrapolate
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-alexandrov committed Sep 15, 2024
1 parent 54549d0 commit 858a45d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/examples/csm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/kaguya.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
6 changes: 3 additions & 3 deletions docs/next_steps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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::

Expand Down
4 changes: 2 additions & 2 deletions docs/sfs_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`).

Expand Down
2 changes: 1 addition & 1 deletion docs/tools/dem2gcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
18 changes: 8 additions & 10 deletions docs/tools/dem_mosaic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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::

Expand All @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/tools/point2dem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ Command-line options for point2dem

--dem-hole-fill-len <integer (default: 0)>
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 <integer (default: 0)>
Maximum dimensions of a hole in the output orthoimage to fill
Expand Down

0 comments on commit 858a45d

Please sign in to comment.