In the RegionGrowingAlgorithm the parameter height_threshold is exposed but never considered during seed detection in find_seedpoints.
This leads to the detection of a lot of seeds with a low amount of height change. As a result, there are a lot of "unwanted" seeds, and, in some cases, large objects of low amount of change might prevent smaller objects with greater height change to grow, as the potential seed is already incorporated in the larger segment.
To fix this we can add an height_threshold check in line 945:
Changing:
# 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:
corepoint_seeds.append(
RegionGrowingSeed(i, start_idx, target_idx)
)
break
else:
previous_volume = volume
to:
# Check whether the volume started decreasing
if previous_volume > volume:
# 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)
)
break
else:
previous_volume = volume
In the
RegionGrowingAlgorithm
the parameterheight_threshold
is exposed but never considered during seed detection infind_seedpoints
.This leads to the detection of a lot of seeds with a low amount of height change. As a result, there are a lot of "unwanted" seeds, and, in some cases, large objects of low amount of change might prevent smaller objects with greater height change to grow, as the potential seed is already incorporated in the larger segment.
To fix this we can add an height_threshold check in line 945: Changing:
to: