from skimage.io import imread
import pyclesperanto_prototype as cle  # version 0.22.0

Loading ‘blobs’#

image0_b = imread("/projects/p_scads_trainings/BIAS/blobs.tif")
image0_b
array([[ 40,  32,  24, ..., 216, 200, 200],
       [ 56,  40,  24, ..., 232, 216, 216],
       [ 64,  48,  24, ..., 240, 232, 232],
       ...,
       [ 72,  80,  80, ...,  48,  48,  48],
       [ 80,  80,  80, ...,  48,  48,  48],
       [ 96,  88,  80, ...,  48,  48,  48]], dtype=uint8)

gaussian blur#

image1_gb = cle.gaussian_blur(image0_b, None, 1.0, 1.0, 0.0)
image1_gb
cle._ image
shape(254, 256)
dtypefloat32
size254.0 kB
min10.285456
max248.0

threshold otsu#

image2_to = cle.threshold_otsu(image1_gb)
image2_to
cle._ image
shape(254, 256)
dtypeuint8
size63.5 kB
min0.0
max1.0

connected components labeling box#

image3_cclb = cle.connected_components_labeling_box(image2_to)
image3_cclb
cle._ image
shape(254, 256)
dtypeuint32
size254.0 kB
min0.0
max62.0