trim_saddle_points

trim_saddle_points(peaks, dt, maxiter=20)[source]

Removes peaks that were mistakenly identified because they lied on a saddle or ridge in the distance transform that was not actually a true local peak.

Parameters
  • peaks (ndarray) – A boolean image containing True values to mark peaks in the distance transform (dt)

  • dt (ndarray) – The distance transform of the pore space for which the peaks are sought.

  • maxiter (int) – The number of iteration to use when finding saddle points. The default value is 20.

Returns

image – An image with fewer peaks than the input image

Return type

ndarray

References

[1] Gostick, J. “A versatile and efficient network extraction algorithm using marker-based watershed segmentation”. Physical Review E. (2017)