我想做Seeded watersheds for combined segmentation and tracking of cells研究中的内容,但我并不完全了解如何进行播种部分 . Here is what they explain about seeding part

我的问题是我不太清楚作者想要说的内容:图像背景种子由方差图像中的固定强度阈值定义,如图2(b)所示 . 如何获得2(b)结果?

这是我的输入:input这就是我想要获得的:output

这是我试过的:

def imageTransformation(pathToImage):
img = cv.imread(pathToImage)
grayImage = cv.cvtColor(img, cv.COLOR_BGR2GRAY)  

withoutNoise = cv.fastNlMeansDenoising(grayImage)  

kernel = np.ones((7, 7), np.uint8)
sure_bg = cv.dilate(withoutNoise, kernel, iterations=2)

ret, otsuTresh = cv.threshold(sure_bg, 0, 255,  cv.THRESH_BINARY + cv.THRESH_OTSU)
cv.imshow("otsu", otsuTresh)

cv.waitKey(0)
cv.destroyAllWindows()

不幸的是,在我应用我编写的代码后,我获得了类似的东西:result

谁能帮我?