Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从MATLAB中去除二值图像的连接点_Matlab_Image Processing - Fatal编程技术网

从MATLAB中去除二值图像的连接点

从MATLAB中去除二值图像的连接点,matlab,image-processing,Matlab,Image Processing,我已经细化了分割图像,在图像(右图)中找到了标记为绿色点的连接点,然后我从图像中删除了连接点像素,以断开每个血管段,但删除了另外两个像素(右图中标记为箭头),它们不是连接点像素。我编写了以下代码: test3 = bwmorph(BinaryImage,'thin',Inf); [rj3, cj3, re3, ce3] = findendsjunctions(test3, 1); temp_withoutjun=test3; temp_withoutjun(rj3, cj3)=0

我已经细化了分割图像,在图像(右图)中找到了标记为绿色点的连接点,然后我从图像中删除了连接点像素,以断开每个血管段,但删除了另外两个像素(右图中标记为箭头),它们不是连接点像素。我编写了以下代码:

  test3 = bwmorph(BinaryImage,'thin',Inf);
  [rj3, cj3, re3, ce3] = findendsjunctions(test3, 1);
  temp_withoutjun=test3;
  temp_withoutjun(rj3, cj3)=0;
  figure, imshow(temp_withoutjun)
  hold on
  plot(cj3, rj3,'*g')
我不明白为什么额外的两个像素被删除。findendsjunctions.m和从属文件show.m可分别从此处和此处下载

如果有人提出一些解决方案,那就太好了


谢谢,我没有花太多时间阅读,但是你通过计算交叉点来找到交叉点和终点的方法似乎有缺陷。只计算一段时间像素的白色邻域会更容易。如果计数大于3,则为连接。如果计数为1,则为终点