Separate touching objects

I’m trying to separate my objects as shown in the picture. The problem is that using dilation (or erosion in the case of image with opposite background/foregroud) the objects doesn’t separate. Any suggestions?
I write here the code with the binarization and the dilate function.

def Img_binarization(img):
    print("Processing Grayscale image:\n")
    plt.imshow(img, cmap='gray', vmin=0, vmax=255)
    # Otsu's thresholding
    thresh, image = cv.threshold(img,0,255,cv.THRESH_BINARY+cv.THRESH_OTSU)
    print("Threshold selected: %d \n" % thresh)
    kernel=cv.getStructuringElement(cv.MORPH_RECT, (3,3))
    image1=cv.dilate(image, kernel, 3)

    print("Processed Binary image:")
    plt.imshow(image1,  cmap='gray', vmin=0, vmax=255)
    return image1

is not doing anything
(youre only copying a function pointer)

(and - why on earth are you overwriting the threshold return value with this ?)

I made an error on the name of the variables just because th is the thresholded image and ret is the threshold.
I modified the code. hope it’s clear now

more erosion/dilation, until the blobs separate.

or take pictures that aren’t so blurry that this happens. no really, fixing this starts before all you have left is a picture.