Skip to content

Commit

Permalink
Update segmentation.py
Browse files Browse the repository at this point in the history
Add an height_threshold check in seed detection, line 945. Fixes issue 3dgeo-heidelberg#324
  • Loading branch information
hdaan authored Apr 3, 2024
1 parent 2ad50dd commit dff5765
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/py4dgeo/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ def find_seedpoints(self):

# Check whether the volume started decreasing
if previous_volume > volume:
# Only add seed if larger than the minimum period
if target_idx - start_idx >= self.minperiod:
# Only add seed if larger than the minimum period and height of the change form larger than threshold
if (target_idx - start_idx >= self.minperiod) and (np.abs(np.max(used_timeseries) - np.min(used_timeseries)) >= self.height_threshold):
corepoint_seeds.append(
RegionGrowingSeed(i, start_idx, target_idx)
)
Expand Down

0 comments on commit dff5765

Please sign in to comment.