我有這個原始影像:
我的任務是數數那些胡椒。我設法去除了噪音和網格,但在計算那些被卡住的玉米時。有 3 對,彼此非常接近,我的程式無法計算它們。你能幫我嗎?這就是我的嘗試:
在最后 2 中,我試圖用該代碼侵蝕/打開那些玉米:
thresh = filters.threshold_minimum(orig_img_no_grid)
img_eroded = morphology.binary_erosion(orig_img_no_grid < thresh, iterations=7)
img_opened = morphology.binary_closing(img_eroded, iterations=4)
但是那些標記的玉米會產生問題。底部的一個我認為我解決了足夠的侵蝕,但其他三個?如果我侵蝕更多,一些玉米就會消失
編輯:無網格影像:
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/398339.html
