If cells are very close they can't be separated unless changing the threshold for very low values which also can't find proper nucleus boundaries. Look into: - edge-off operation in binary image - watershed segmentation