如何在matlab中连接二进制图像中的点 [英] How to connect points in a binary image in matlab

查看:369
本文介绍了如何在matlab中连接二进制图像中的点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有以下几点的二进制图像:

I have a binary image with several points as below:

如何在这些点之间建立连接?像这样:

How can I make a connection between these points? Like this:

我试过了

se = strel('line', LEN, DEG); 
imclose(image, se);

但没有任何改变。

请帮帮我

谢谢

推荐答案

你可以用 roipoly 创建一个由点定义的掩码。

给定二进制掩码,你可以使用 bwmorph(BW,'remove'); 来获取边界,你就完成了。

You can use roipoly to create a mask defined by the points.
Given a binary mask you can use bwmorph(BW,'remove'); to get the boundary and you are done.

唯一的问题是确定点的顺序,不同的顺序定义不同的掩码。这个你必须自己计算的。

The only problem is determining the order of the points, different order defines different mask. This one you'll have to figure for yourself.

订购积分的含糊不清的例子:

Example of ambiguity in ordering the points:

这篇关于如何在matlab中连接二进制图像中的点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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