split_footprint#
- scarlet2.detect.split_footprint(fp, image, min_area=0)[source]#
Split a multi-peak
Footprintinto single-peak sub-footprints.Segments the footprint area by finding the saddle points between peaks using a priority-queue flooding watershed. The wavelet coefficient image at the relevant scale is inverted so that peaks become low-cost basins; the watershed floods outward from each peak seed simultaneously in order of increasing cost, and region boundaries follow the intensity saddles between peaks.
- Parameters:
fp (
Footprint) – The footprint to split. Returned unchanged (as a one-element list) if it contains at most one peak.image (
2D ndarray) – Wavelet coefficient image at the scale offp.min_area (
int, optional) – Minimum number of pixels a sub-footprint must contain to be kept. Peaks whose watershed region is smaller than this are dropped. Default is0(keep all).
- Returns:
One single-peak
Footprintper peak infpthat meets the minimum area requirement.- Return type:
listofFootprint