[英]How to get box around contour using skimage.segmentation.felzenszwalb?
[英]How to make skimage´s active contour get pushed into the corners
我基本上是在他們的網站上使用 skimage 關於 morphological_geodesic_active_contour 的教程。 我對我已經得到的結果非常滿意,但我更喜歡這樣的結果,即輪廓甚至被拉(或推)到圓的邊緣。
如果你想復制我創建的圓圈,這里是代碼(其余代碼來自上面鏈接的網站):
im = np.zeros((100, 100))
for i in range(100):
for j in range(100):
if (i - 50) ** 2 + (j - 50) ** 2 <= 400:
im[i, j] = 1.0
im[50:80, 50:80] = 0.0
我很感激任何幫助!
編輯:作為變形 GAC 的參數,我使用了以下內容:
morphological_geodesic_active_contour(gimage, 50, init_ls,
smoothing=1, balloon=-1,
threshold=.9,
iter_callback=callback)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.