作为两个对象的blob的图像分割 [英] image segmentation of a blob that is two objects

查看:215
本文介绍了作为两个对象的blob的图像分割的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图将圆形拍的图像分割成像算盘上的图像一样。问题是珠子靠近在一起并且使用canny边缘或类似的东西使得两个珠子作为相同的物体。我已尝试使用一些棘手的阈值连接组件,但它不起作用。

I'm trying to segment an image of round beats on like the ones on an Abacus. The problem is that the beads are close together and using "canny" edge or something similar makes two beads as the same object. I have tried connected components with some tricky thresholds, but it did not work.

您能否建议如何更好地解决此问题?

Can you please suggest how to better approach this problem?

我需要程序能够将每个程序分开,然后计算有多少程序。任何帮助都会很棒。

I need the program to be able to segment each one apart and then count how many there are. Any help would be great.

谢谢!

推荐答案

将以下代码应用于二进制文件图片。 bw 是二进制图像。

Apply the following code to your binary image. bw is the binary image.

D = bwdist(bw);
DL = watershed(D);
bgm = DL == 0;
bw=bw-bgm;
imshow(bw);

您的两个对象将被断开连接。

Your two objects will be disconnected.

这篇关于作为两个对象的blob的图像分割的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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