X
4153

A few hints to increase the quality of a DEM built using the ENVI DEM extraction module

This Help Article gives a few hints to improve the quality of a DEM built using the ENVI DEM extraction module. This  toolcan be launched

- from the ENVI Classic menu bar by selecting: Topographic -> DEM extraction
- from the ENVI Toolbox: Terrain > DEM Extraction > DEM Extraction Wizard: New

Note that DEM Extraction module requires a specific license in addition to the ENVI license.



Step 1: Image selection

This first step consists of selecting one image of the stereo pair as the left one and one as the right one.

The order of the images is not really important: you can choose the left and right image as you want. However it is important to remember the order through the process. If need to interrupt the process and then restart it later, using, for example, a GCP file you already created, you would need to reselect the images exactly in the same order or the previously selected GCPs will not be appropriate for the extraction. One way to be sure that ENVI's DEM Extraction module will keep this information, even after interrupting the process, is to save the process using the Save button.

It is also recommended that you update the minimum and maximum elevation if you have more accurate values than the default one calculated using the image header files.



Step 2/3: GCP selection

These steps are optional, as the process can run without Ground Control Points (GCPs). The GCPs are particularly useful for correcting the DEM georeferencing using an RST (Rotation/Scale/ Translation).

If you have GCPs and if you want to use them we recommend that you select just a few points (around 3 or 4), with high accuracy and a good distribution over the area - see Help Article 4220 for more details.




Step 4: Tie point generation

If you decide to select the Tie Points automatically it is really important to adapt the parameters well to your images. The number of Tie Points is not critical, however it is essential to select accurate Tie Points. So we recommend that you examine and edit them by selecting Yes for this option. We also recommend that you update the Region elevation if you have more accurate information.


a. Search window size: One way to evaluate the search window size is to evaluate the average shift between the 2 images. This can be done using the ENVI Geographic Link. After setting up the Geographic Link, select a feature point (point A) in base image: the cursor automatically moves to a point (point B) in the linked image, which has the same geographic coordinate as point A. This point should be close to the actual feature point in the linked image (point C). Measure the distance d in pixels between point B and point C in the warp image; it is then recommended that you select a search window with a minimum size equal to 2*d+1.

      

If the selected value is too small, the point C will not be found. If it is too high, it will take longer to process, and can result in ambiguities; this happens when different points in the warp image look similar to the point in the base image. Checking the resulting Tie Points at the next step should help to define this value.


b. Moving windows size: this parameter is related to the image resolution. Larger values will result in more reliable tie point placement, but will take more processing time. We usually recommend the following values:
- 10 m or higher resolution image: 9-15 pixels
- 5-10 m resolution image: 11-21 pixel
- 1-5 m resolution image: 15-41 pixel
- 1 m or less resolution image: 21-81 pixel or higher.
For example, if you look at an image in which many features look similar, using a large value could help because it will take into account the surrounding area so there should be a more robust matching between the points.



Step 5: Checking the tie points

It is essential to go through this step, especially if the tie points were selected automatically. It can help to adapt the previous parameters in order to generate accurate tie points.
The important parameter at this step is the Y-Parallax. It must be less than 10 to continue the process. However it would be even better for this parameter to be less than 1 or close to 1.
We recommend that you look at each tie point using the arrows to be sure that they represent the same object in the 2 images. If a tie point is wrong you should remove it (or update it) using the Delete button (or the Update button) in order to decrease the Y-parallax.
If you note that all the points are wrong you can also decide to go back to the previous step to modify the parameters.

      



Step 6: Epipolar image generation

Checking the calculated epipolar images after the calculation is strongly recommended too. Indeed it could help in identifying possible problems during the previous steps. Select the Left,Right,Right button to look at the epipolar images using anaglyph glasses. If the 3D reconstruction seems correct at this step on all the images, you can then continue the process. If the 3D does not seem correct, we recommend that you check the Tie Points again and remove/update a few more points, or add a few more points manually in the area in which the 3D reconstruction does not seem to be correct.

      



Step 7: Georeferencing parameters

This is the step in which you define the georeferencing parameters and the resolution of the output DEM. It is recommended that you choose an output resolution for the final DEM similar to the resolution of the original images.
However it is also possible to first define a low resolution to calculate a first DEM and to check its quality - because it will take less time to process. If this first DEM looks fine you could then validate the DEM extraction parameters and recalculate the DEM using a higher resolution.

      



Step 8: DEM extraction

This is the step in which you define the DEM extraction parameters. It can be necessary to generate a few DEMs with different parameters to find the best parameter combination. In order to spend less time processing during these tests it is possible:
- to specify first a low resolution for the output DEM at the previous step and to increase this resolution when the parameters are validated
and/or
- to select first a low level of detail because it is less time consuming and to increase this level when the parameters are validated

The parameters that need to be defined are described below.

a. Minimum correlation: if the correlation coefficient is smaller than this minimum at a defined pixel, the elevation is not calculated for this pixel. Using a smaller threshold value allows ENVI to calculate the elevation on more points. However it reduces the accuracy because wrong points can be used for the calculation. A value higher than 0.65 is recommended. It is recommended that you use a lower value when increasing the Moving Windows Size because the average correlation values will be lower.

b. Moving window size: this parameter is similar to the moving window size parameter defined in step 4. Increasing this value will result in more reliable results but will be less precise and more time consuming. A lower value can improve the final DEM quality.

c. Terrain relief: this parameter specifies the relief of the imaged area. If the images are acquired above mountains a High relief should be selected. If they cover a very flat area the Low relief options should be chosen. If the area contains both flat areas and mountains a test can be made using the Moderate relief. Another option is to calculate two DEMs, one using the High relief option, one using the Low Relief option, and to then mosaic different parts of the 2 DEMs.

d. Edge Trimming: if a shift between the 2 stereoscopic images is observed, it can result in bad values along the borders of the DEM. This effect can be removed by defining an Edge Trimming value between 0.0 and 0.6. A value of 0.1 will trim 5% from the DEM borders on each side.

e. Terrain detail: as discussed previously the terrain detail can be set to a low level at the beginning to check the average quality of the output DEM. Then this value can be increased to the maximum level (7) after validating the other parameters.

      



Step 9: Editing the DEM

The DEMs generated in ENVI using the DEM extraction module are not filtered at all: the output DEM file you obtain is a raw file that needs to be filtered for visualisation purposes. This can be done by selecting the Load DEM Result to display the editing tool option.
Applying for example a Median filter (using a 5*5 kernel) and then a smoothing filter (using a 5*5 window) often results in nice DEM for visualization.
If you want to keep a copy of the raw DEM, it is recommended to first make a copy of the DEM file, because it will be overwritten during the filtering process.

      



Recommendation when comparing DEMs

Here are a few recommendations when comparing DEMs:

1) be sure that they cover the same area and that they use the same map projection
2) be sure that they have a similar resolution
3) it is also better to compare DEMs that were been built using the same or similar methodology. This is particularly true when working on DEM time series. In that case it is strongly recommended that you build the different DEMs using the same software.