Hi,

Assuming that i have an image like

in which objects do not overlap and there is space between them, i run these lines of codes:

```
import matplotlib.pyplot as plt
import numpy as np
from skimage.color import rgb2gray
from skimage import io, img_as_ubyte
from skimage.filters import threshold_otsu
image = img_as_ubyte(rgb2gray(io.imread("sc.png")))
threshold = threshold_otsu(image)
thresh_img = image < threshold
plt.imshow(thresh_img)
plt.show()
```

The result is this image

I would like to know if there is any way to find those x1, y1 (assuming this is the point of far left on the top) and x2, y2 (assuming this is the point of far right on bottom) to separate each object based on those values to get a small images like this

I tried some lines on my own like this:

```
ind = np.nonzero(image.any(axis=0))[0] # indices of non empty columns
width = ind[-1] - ind[0] + 1
ind = np.nonzero(image.any(axis=1))[0] # indices of non empty rows
height = ind[-1] - ind[0] + 1
```

and this one with scipy:

```
from scipy import ndimage
# Label objects
labeled_image, num_features = ndimage.label(image)
# Find the location of all objects
objs = ndimage.find_objects(labeled_image)
# Get the height and width
measurements = []
for ob in objs:
measurements.append((int(ob[0].stop - ob[0].start), int(ob[1].stop - ob[1].start)))
```

But i am not getting anywhere. Can someone help?

Thanks