gpt4 book ai didi

image - matlab:纹理分类

转载 作者:太空宇宙 更新时间:2023-11-03 20:18:46 25 4
gpt4 key购买 nike

我有一张这样的组织学图像:

binary histology image

从图像中,我们可以观察到有两种不同的细胞。

cell type 1cell type 2

有什么方法可以将这两种类型的细胞分成两组?

最佳答案

用你的raw image and previous code怎么样?实现这个目标?

% % % your old code
I=imread(file);
t1=graythresh(I);
k1=im2bw(I,t1);
k1=~k1;
se = strel('disk',1);
k0=imfill(~k1,'holes');
cc = conncomp(k0);
k0(cc.PixelIdxList{1})=0;
k1=imfill(k1,'holes');
mask=k0 | k1;
%%%%%%%%%%%%%%%%%%

这会给你:

enter image description here

I=rgb2hsv(I);  
I=double(I);
I1=I(:,:,1); % again, the channel that can maximizing the margin between donut and full circle
Imask=(I1-0.2).*(I1-0.9)<0;
k2=mask-Imask;
k2=bwareaopen(k2,100);

这会给你:

enter image description here

k2=mask-Imask;
I2=zeros(size(I1,1),size(I1,2),3);
I2(:,:,1)=(k2==1)*255;
I2(:,:,3)=((I1-0.2).*(I1-0.9)<0)*255;
imshow(I2)

最后给你(rgb图像中这两种分别存储在两个 channel ):

enter image description here

关于image - matlab:纹理分类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20690429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com