How can I run a Low Pass Filter over a Digital Elevation Model to Reduce Noise?

6 ビュー (過去 30 日間)
Jake Collins-May
Jake Collins-May 2017 年 7 月 27 日
編集済み: Chad Greene 2017 年 7 月 28 日
I want to run an elevation profile tool over a Digital Elevation Model (DEM) in ArcGIS. The DEM is noisy so the profile returned is jagged. I am looking to run a Low Pass Filter over the DEM in order to "blur" it, reducing the noise, and smoothing the extracted profile.
The DEM is: 17997x8369 pixels 1 Band 32 bit floating point
The code I have been using to try and achieve this is:
I = imread('DEM.tif');
G = fspecial('gaussian',[5 5],2);
Ig = imfilter(I,G,'same');
I2 = im2double(Ig);
imwrite(I2, 'DEM_5_2.tif')
However this simply returns a black box. How would I go about running a low pass filter over this image correctly?
  2 件のコメント
Shivam Raikundalia
Shivam Raikundalia 2017 年 7 月 28 日
The script seems to work for me. Are you sure your original picture is correct?
Chad Greene
Chad Greene 2017 年 7 月 28 日
If the issue is random noise, you may consider a moving median filter like medfilt2, which would remove outliers rather than spreading them out.

サインインしてコメントする。

回答 (1 件)

Chad Greene
Chad Greene 2017 年 7 月 28 日
編集済み: Chad Greene 2017 年 7 月 28 日
It looks like imwrite will not write double to tiff format. Try something like
I2 = im2uint16(Ig);
imwrite(I2, 'DEM_5_2.tif')

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by