Catalyst.earth Logo
Catalyst.earth Logo

Multiview DSM Merging In Python

DSMMERGE is a great function that allows users to generate significantly better Digital Surface Models (DSMs) by merging a set of geocoded DSMs from a stereo airphoto or satellite project into a single multiview DSM. The final DSMMERGE result is typically of higher quality compared to a single DSM since each geocoded DSM has a different viewing geometry. Also, occlusions in one DSM can be filled in from a different DSM. To achieve the best possible result when working with aerial images, we recommend an overlap of 80/60 as well as good aerotriangulation between images.

More information on the DSMMERGE algorithm and workflow is found in the CATALYST Professional Help documentation. Tutorials for working in Python are found on our Python Cookbook. Other DSM merging methods are available, but are used in slightly different circumstances. SGMMERGE is intended to merge Forward/Nadir (F/N) and Backward/Nadir (B/N) pairs of images in the nadir epipolar space, followed by geocoding via GEOCODEDEM.

Running DSMMERGE

The following example shows how to run the DSMMERGE algorithm in Python. This script requires a set of overlapping geocoded DSMs created from an airphoto project. All files must have the same projection and resolution. In each file, band 1 contains the DSM, bands 2,3,4 contain RGB imagery, and band 5 contains the score channel. Since the DSMs produced do not perfectly align vertically due to small errors in the exterior orientation, a larger blend width of 100 is used (instead of the default of 48), and the error tolerance is set to 10 (instead of the default of 4).

Results

The results of the final merged DSM are seen below. The first image shows the original DSM, while the second image shows the merged DSM. You will notice that the final merged DSM produced a much clearer, less blurry result.

Before:


After:

Benefit

The benefit of running DSMMERGE on your DSM files is that the resulting image is a higher quality result compared to a single DSM. The output will not require as much manual editing afterwards, as occlusions are filled in by overlapping DSMs. The final merged DSM can then be used as an input for a True Orthorectification workflow.

envelopephone-handsetcross