Skip to content
Snippets Groups Projects
Commit 175eb28a authored by ac_22's avatar ac_22
Browse files

cell boundary efficiency - use adaptthresh

parent 6c487ba7
Branches
No related tags found
No related merge requests found
......@@ -25,7 +25,12 @@ if sensitivity>1
T=lm(end);
else
T=adaptthresh(im,sensitivity,'NeighborhoodSize',4*floor(size(im)/16)+1,'statistic','gaussian');
T=imdilate(T,se);
% T=imdilate(T,se);
end
bw=logical(0*im);
for i=1:length(Cells)
idx=sub2ind(size(im),Cells(i).pts(:,2),Cells(i).pts(:,1));
bw(idx)=1;
end
for i=1:length(Cells)
if is3D(im)
......@@ -41,11 +46,13 @@ for i=1:length(Cells)
imBGmu=median(imBG(idx));
if sensitivity>1
minFG=T;
imBGeff=1-imBGmu/minFG; %
else
minFG=max(T(idx));
imBGeff=1-median(imBG(idx)-T(idx));
end
imBGeff=1-imBGmu/minFG; %
imBGeff=min(imBGeff,1);
% clamp??? ac 10 14 2020 ??? ACK
% imBGeff=min(imBGeff,1);
% imBGeff=max(imBGeff,0);
% how dark on average the surface neighborhood is (1 is good)
Cells(i).ensemble.boundaryEfficiency=imBGeff;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment