clear all
I = imread('rice.png');
imshow(I)
background = imopen(I,strel('disk',15));
figure, imshow(background)
I2 = imsubtract(I,background);
I3 = imadjust(I2);
figure, imshow(I3);
level = graythresh(I3);
bw = im2bw(I3,level);
figure, imshow(bw)
[labeled,numObjects] = bwlabel(bw,4);
figure, imshow(labeled);
impixelregion
1.zip_黑白图像计数
版权申诉
195 浏览量
2022-07-15
13:22:38
上传
评论
收藏 1KB ZIP 举报
刘良运
- 粉丝: 68
- 资源: 1万+
评论0