This task generates point clouds and a single digital surface model (DSM) from two or more images taken from different view points using a dense image matching method.

The image-matching algorithm identifies corresponding points in at least two images. For a given point in one image, it searches a two-dimensional grid of points in the second image. By having orientation data, the search is reduced to one dimension: along an epipolar line in the second image. The coarse DEM imposes a constraint on the range of heights in the matching area, which constrains the length of the epipolar line. This reduces both the risk of false matches and the time in matching by reducing the search space. The success of the algorithm depends on the intersection angle and similarity between the images. A good starting point is to use images from the same season during a given year.

This task has been tested with the following types of stereo imagery:

  • ADS80
  • ENVI format with a generic RPC sensor model
  • GeoEye-1 in DigitalGlobe format (.til) and PVL format
  • Pleiades-1A
  • QuickBird
  • SPOT-6
  • WorldView-1
  • WorldView-2
  • WorldView-3
  • Ziyuan-3A

Use ENVI LiDAR or another 3D point cloud application to open the LAS files that are created from this task. You can display the DSM in ENVI.


This example creates point clouds from an IKONOS stereo dataset. The files used in this example are available from our ENVI Tutorials web page in the IKONOS Stereo directory. Download the files Hobart*.* to your local drive, then update the code example to point to the correct path.

This example creates LAS files in the directory specified by the Output Directory ENVI preference, then loads the point clouds into the ENVI LiDAR viewer. It also displays the resulting DSM in ENVI. This process can take several minutes to complete.

; Start the application
e = ENVI()
; Open  input files
File1 = 'HobartIKONOS1.dat'
File2 = 'HobartIKONOS2.dat'
Raster1 = e.OpenRaster(File1)
Raster2 = e.OpenRaster(File2)
; Get the task from the catalog of ENVITasks
Task = ENVITask('GeneratePointCloudsByDenseImageMatching')
; Define inputs
Task.INPUT_RASTERS = [Raster1, Raster2]
; Run the task
; Display the point clouds in the
; ENVI LiDAR Viewer
Viewer = ENVIPointCloudViewer()
pointCloud = e.OpenPointCloud(LASFiles)
Viewer.Display, pointCloud
; Display the digital surface model (DSM) in ENVI
View = e.GetView()
Layer = View.CreateLayer(Task.OUTPUT_DSM_RASTER)


Result = ENVITask('GeneratePointCloudsByDenseImageMatching')


Output properties (Get only):OUTPUT_DSM_RASTER, OUTPUT_URI

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.


This task inherits the following methods from ENVITask:







This task inherits the following properties from ENVITask:








This task also contains the following properties:


Set this property to specify whether block adjustment will be applied before generating point clouds and DSMs. The options are true (default) or false. A block, or bundle, adjustment is used to refine the 3D coordinates that describe the scene geometry. It finds a set of parameters that most accurately predict the locations of the observed points in a set of images, thus minimizing the reprojection error between image locations of observed and predicted image points. Applying a block adjustment for satellite images refines the image geometry to improve the quality of the generated point clouds. If the the images have already been adjusted, set this property to false.


Specify a value between 0 and 100. Set a lower value to include more mismatches in areas with poor contrast. Set a higher value to force rich texture and edge information in accepted matches. The default value is 5.


Specify a digital elevation model (DEM) raster. If you do not set this property, ENVI uses the global DEM named GMTED2010.jp2 that is provided with your ENVI installation under the INSTALL_DIR\envixx\data folder. The Global Multi-resolution Terrain Elevation Data 2010 (GMTED2010) dataset has a mean resolution of 30 arc seconds.

INPUT_RASTERS (required)

Specify an array of rasters from which to generate point clouds and DSMs. The following rules apply to input stereo images:

  • They should have enough parallax, for example, stereo and tri-stereo images collected by sensors from different view points.
  • They must overlap by at least the percentage specified in the MINIMUM_OVERLAP parameter. The default value is 55 percent.
  • They must contain rational polynomial coefficients (RPCs) or physical sensor models. For satellite images, RPCs are preferred over physical models.
  • They must have the same number of bands. Select two or more panchromatic datasets, or select two or more multispectral datasets that have the same number of bands.
  • For other sensors not listed in the introduction of this topic, open the individual image files (TIFF, JPEG2000, or NITF) if available.


The match threshold sets a limit to the difference between matching windows. It ranges from 0 to 100. A value of 0 means no difference (a perfect match). The default value is 15. Set this property to a lower value to increase confidence and to decrease mismatches. Set it to a higher value to capture finer details at the possible cost of more mismatches.

Tip: For best results with mountainous terrain, decrease MATCHING_THRESHOLD to approximately 10 and increase QUALITY_THRESHOLD to approximately 80.


Set this property to a percentage (0 to 100) indicating the minimum overlap area between two images, for matching to occur. Image pairs with a smaller overlap than the specified value are ignored. The default value is 55.


Specify a string with the fully qualified directory for the output point clouds. If you do not set this property, the LAS files are written to the directory specified by the Output Directory ENVI preference.


This is a reference to the output digital surface model (DSM) raster of filetype TIFF.


Specify a string with the fully qualified path and filename for OUTPUT_DSM_RASTER.

OUTPUT_URI (optional)

This property contains an array of URIs with the path and filenames of the output LAS files.


Specify a value between 0 and 100. Each pixel is assigned a quality measure, which is based on the similarity between windows around the pixel in the stereo images at the matched position. The quality measure improves if the pixel is on the edge of a feature. Setting this threshold to 0 will result in an estimated height for all matched pixels, resulting in large LAS files and some redundant or erroneous 3D points. Increasing the threshold yields fewer matching points (and smaller LAS files), but the quality of the 3D points is better. The default value of 60 is a reasonable value to export high-quality points.


Set this property to true to refine point clouds. If refined, the output point clouds will have smoothed height values but will not contain intensity or color information.

TERRAIN_TYPE (optional)

Specify a string value indicating the type of terrain that the image mostly contains. The choices are Flat (default) or Mountainous.

Version History

ENVI 5.3


ENVI 5.4


ENVI 5.4.1


API Version