减薄等高线的二进制图像 [英] Thinning contour lines in a binary image

查看:138
本文介绍了减薄等高线的二进制图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有等高线的二进制图像,需要净化所有不必要的像素的每个轮廓线,留下最小连接线后面。

I have a binary image with contour lines and need to purify each contour line of all unnecessary pixels, leaving behind a minimally connected line.

有人可以给我一个来源,code例如或进一步信息,此类问题以及在何处寻找帮助,好吗?

Can somebody give me a source, code example or further information for this kind of problem and where to search for help, please?

推荐答案

如果你正在寻找Python实现,看看一个的 scikits图像

If you're looking for python implementations, have a look a scikits-image.

他们的一个例子实质上是您的使用情况。

One of their examples is essentially your use case.

另外,如果你想坚持直SciPy的,您可以使用连续的使用 scipy.ndimage 糜烂和扩张术。 (由于@AxezDNyde提到。)

Alternately, if you wanted to stick to "straight" scipy, you can do this by using successive erosions and dilations using scipy.ndimage. (As @AxezDNyde mentions.)

这篇关于减薄等高线的二进制图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆