在低对比度的图像中找到“点”或焦点

时间:2013-12-02 17:48:00

标签: matlab image-processing

我用抗体染色细胞,我有兴趣计算每个细胞的病灶数或“点数”。下图来自通道1 enter image description here 并且代表细胞核,并且只有这种圆盘形物体内的区域才有意义。

下面的图片,与上面相同的视图,但是用于污染小圆盘形区域或“点”的单独通道

enter image description here

我希望你能看到点,一些高强度和一些低强度。我试图使用matlab(图像处理工具箱)来计算这些,但我还没有成功。

这是我到目前为止所拥有的

 filenameDAPI='http://i.stack.imgur.com/urJ3W.png';
 DAPI=imread(filenameDAPI); % nuclei
 nuclei_bin=imfill(im2bw(DAPI,graythresh(DAPI)),'holes');
 nuclei_bin=bwareaopen(nuclei_bin,2000); % filter out small regions
 filenameTRITC='http://i.stack.imgur.com/Cu4He.jpg';

 TRITC=imread('http://i.stack.imgur.com/Cu4He.jpg'); % dots

 Th=graythresh(TRITC); % threshold that finds nuclei
 Th2=graythresh(TRITC(TRITC>Th)); % threshold that finds foci
 FOCI=im2bw(TRITC,Th2);

 % now filter FOCI by size
 minArea=2; maxArea=200; % threshold to remove spurious foci
 FOCI_labeled=bwlabel(FOCI,8);
 FOCI_props=regionprops(FOCI_labeled,TRITC,'Area'); 
 A=[FOCI_props.Area];
 keepIndices=find(A >= minArea & A <= maxArea);
 FOCI_mask=ismember(FOCI_labeled,keepIndices);
 FOCIfiltered=FOCI.*FOCI_mask; 

 outline_FOCI=bwperim(FOCIfiltered);
 overlay_FOCI=imoverlay(TRITC,outline_FOCI,[1 .1 .3]);

 subplot(2,2,1); imshow(TRITC); 
 subplot(2,2,2); imhist(TRITC)
 subplot(2,2,3); imshow(FOCIfiltered);
 subplot(2,2,4); imshow(overlay_FOCI)

结果图片显示在这里: enter image description here 不幸的是,子图(2,2,4)中显示的结果并不是那么好 - 在识别出虚假点时会遗漏许多真实点。

如果有人能帮我改善点数,我将不胜感激。

由于 利

2 个答案:

答案 0 :(得分:1)

我为你写了一个简单的局部最大滤波器(3X3区域):

filenameTRITC='http://i.stack.imgur.com/Cu4He.jpg';
TRITC=imread('http://i.stack.imgur.com/Cu4He.jpg'); % dots
TI=TRITC; 
TRITC=double(TRITC);
TRITC=TRITC.*(TRITC>100);
TRITC=TRITC.*(TRITC<254); % Please note there are several parts in which the signals are saturated, I did not consider the local maximum of them
[xx yy]=size(TRITC);
[x y]=find(TRITC(2:xx-2,2:yy-2));
px=[];py=[];
x=x+1;y=y+1;
for i=1:length(y)-1
   flag=1;
   for j=-1:1
      for k=-1:1
         if TRITC(x(i)+j,y(i)+k)>TRITC(x(i),y(i))
            flag=0;
            break;
        end
      end
   end
   if flag==1
      px=[px y(i)];py=[py x(i)];
   end
end


figure,
imagesc(TI); 
hold on
plot(px,py,'r.') 

我选择了一个区域,放大,以显示结果: enter image description here

答案 1 :(得分:1)

与lennon310完全一样,Matlab有一些工具可以快速找到局部极值。

im = imread('');
% Threshold, values under it are not accepted as extrema.
thresh = 120;
% Region of interest to determine an extrema in. 
roi = 5;
% Gray scale dilation to find local maxima
local_extr = ordfilt2(im, roi^2, ones(roi)); 
% Get local maxima and reject candidates below a threshold
result = (im == local_extr) & (im > thresh);
% Get indices of extrema
[r, c] = find(result);
% Show them
figure;imshow(im, []); hold on;
plot(c, r, 'ro');

enter image description here