[英]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.