make_segments
- petrofit.segmentation.make_segments(image, npixels=None, threshold=3.0)[source]
Segment an image.
- Parameters:
- imagearray like
Input image
- npixelsint
The number of connected pixels, each greater than
threshold
, that an object must have to be detected.npixels
must be a positive integer.- thresholdfloat or array-like
The data value or pixel-wise data values to be used for the detection threshold. A 2D
threshold
must have the same shape asdata
. Seedetect_threshold
for one way to create athreshold
image.
- Returns: