dshean / demcoreg

Utilities for DEM and point cloud co-registration
MIT License
110 stars 42 forks source link

Error: Not enough dh samples - What does it mean? #54

Open SirVeratir opened 1 year ago

SirVeratir commented 1 year ago

Hello, i don't have experience in using Linux or Coding, but want to Match to Point Clouds. So I followed the Instructions to install demcoreg and used the following Code: (demcoreg_env) bene@Benes-PC:~/src$ ~/src/demcoreg/demcoreg/dem_align.py -slope_lim 20 80 -mode nuth 1cm_02082022_SfM.tif 1cm_02082022_TLS.tif. The following Text appears

Reference: 1cm_02082022_SfM.tif
Source: 1cm_02082022_TLS.tif
Mode: nuth
Output: 1cm_02082022_TLS_dem_align/1cm_02082022_TLS_1cm_02082022_SfM

Warping all inputs to the following:
Resolution: 0.01
Extent: [-41.639, -6.809000000000001, -11.599000000000004, 16.221]
Projection: ''
Resampling alg: cubic

1 of 2: 1cm_02082022_SfM.tif
2 of 2: [memory]

Reference DEM res: 0.01
Source DEM res: 0.01
Resolution for coreg: mean (0.01 m)

*** Iteration 1 ***

Warping all inputs to the following:
Resolution: 0.01
Extent: [-41.639, -6.809000000000001, -11.599000000000004, 16.221]
Projection: ''
Resampling alg: cubic

1 of 2: 1cm_02082022_SfM.tif
2 of 2: [memory]
Elevation difference stats for uncorrected input DEMs (src - ref)
Removing outliers
Initial pixel count:
607632
Absolute dz filter: 100.00
607632
Excluding values outside of range: 0.010 +/- 3*0.066
Excluding values outside of range: -0.188392 to 0.208914
541814
Computing slope
Slope filter: 20.00 - 80.00
Initial count: 554157
Excluding values outside of range: 20.000000 to 80.000000
0
Computing aspect
Filtered difference map
/home/bene/src/pygeotools/pygeotools/lib/malib.py:1663: UserWarning: Warning: converting a masked element to nan.
  print("count: %i min: %0.2f max: %0.2f mean: %0.2f std: %0.2f med: %0.2f mad: %0.2f q1: %0.2f q2: %0.2f iqr: %0.2f mode: %0.2f p16: %0.2f p84: %0.2f spread: %0.2f" % stats)
count: 0 min: nan max: nan mean: nan std: nan med: nan mad: nan q1: 0.00 q2: 0.00 iqr: 0.00 mode: 0.00 p16: 0.00 p84: 0.00 spread: 0.00
Computing sub-pixel offset between DEMs using mode: nuth
Not enough dh samples`

Sadly I don't know what the Error Not enough dh samples, can anybody help me what this means? Is my Area to small or is it another problem?

Thanks

10go-L commented 1 year ago

could you figure out? I thought it was a problem witht he nodata values, I switched from nan to -999 without success

dshean commented 1 year ago

Based on the output, it appears your DEM does not have a coordinate reference system defined. My guess is that your coordinates are in lat/lon and units of decimal degrees. These tools expect input DEMs in projected coordinate system with units of meters. There are other closed threads about this subject.

The slope filter of 20-80° is also unusual, and removing all points. My guess is that mixed xy and z units are leading to unexpected slope values. Hopefully that makes sense.