compute_segmentation_limits

grizli.utils_numba.disperse.compute_segmentation_limits(segm, seg_id, flam, shd)[source]

Find pixel limits of a segmentation region

Parameters
segm: ndarray (np.float32)

segmentation array

seg_id: int

ID to test

flam: ndarray (float)

Flux array to compute weighted centroid within segmentation region

shd: [int, int]

Shape of segm

Returns
iminint

Minimium index of first array axis (y)

imaxint

Maximum index of first array axis (y)

icfloat

Weighted centroid along first array axis (y)

jminint

Minimium index of second array axis (x)

jmaxint

Maximum index of second array axis (x)

jcfloat

Weighted centroid along second array axis (x)

areaint

Area of the segment

flam_totalfloat

Sum of flam within the segment