相关疑难解决方法(0)

选择图像中的最大对象

我试图找到图像中最大的对象,并删除图像中小于它的任何其他对象.

这就是我所拥有的,但我无法让它发挥作用.

 l=bwlabel(BW);

 %the area of all objects in the image is calculated
 stat = regionprops(l,'Area','PixelIdxList');
 [maxValue,index] = max([stat.Area]);

  %remove any connected areas smaller than the biggest object
  BW2=bwareaopen(BW,[maxValue,index],8);
  subplot(5, 5, 4);
  imshow(BW2, []);
Run Code Online (Sandbox Code Playgroud)

我正在使用这些数字乳房X线照片.我试图从乳房区域除去图像中的所有对象.

matlab image-processing morphological-analysis

6
推荐指数
2
解决办法
7147
查看次数