Commit e7a1f2a1 authored by ac_22's avatar ac_22

updated FrameSegment_texture for new phase and wellRadius -- new thresholdImagesPhase

parent d54840f1
......@@ -206,13 +206,7 @@ for n=1:num
Cells=[Cells newCell];
end
if segParams.isPhase>0
fgRatio=0.95; % intensity model needed to keep phase parasites down
elseif segParams.isPhase<0
fgRatio=0.05; % less intensity driven
else
fgRatio=0.05; % less intensity driven
end
fgRatio=0.05;
% set features for parasite test
for i=1:length(Cells)
if is3D(bwIntensity)
......@@ -223,7 +217,7 @@ for i=1:length(Cells)
Cells(i).pfg=length(find(bwIntensity(idx)))/size(Cells(i).pts,1);
% less then 5% foreground are parasites
if DRAW
% text(Cells(i).centroid(1),Cells(i).centroid(2),num2str(Cells(i).pfg,2),'color','w');
text(Cells(i).centroid(1),Cells(i).centroid(2),num2str(Cells(i).pfg,2),'color','w');
if Cells(i).pfg<fgRatio
plot(Cells(i).surface(:,1),Cells(i).surface(:,2),'color','k','linewidth',3);
end
......
......@@ -72,11 +72,13 @@ else
end
function bwIntensity=thresholdPhaseIntensity(im,alpha,min_radius_pixels,min_area_pixels)
qThresh=prctile(im(:),[1,99]);
% qThresh=prctile(im(:),[1,99]);
% qThresh=mean(im(:))-3*std(im(:));
% use dark boundaries. seems to work for both dark and bright interior...
qThresh=multithresh(im,2);
bwIntensity=logical(im<qThresh(1));
bwIntensity=bwIntensity|imfill(bwIntensity,'holes');
se=strel('disk',ceil(min_radius_pixels/2));
se=strel('disk',ceil(min_radius_pixels/4));
bwIntensity=imopen(bwIntensity,se);
4;
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment