trim_saddle_points

trim_saddle_points(peaks, dt, max_iters=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 (ND-array) – A boolean image containing True values to mark peaks in the distance transform (dt)

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

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

Returns

image – An image with fewer peaks than the input image

Return type

ND-array

References

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