Commit db39f4af authored by ac32's avatar ac32

phase contrast ratios

parent a5e1919b
......@@ -207,7 +207,7 @@ for n=1:num
end
if segParams.isPhase>0
fgRatio=0.95; % intensity model needed to keep phase parasites down
fgRatio=0.05; % intensity model needed to keep phase parasites down
elseif segParams.isPhase<0
fgRatio=0.05; % less intensity driven
else
......
......@@ -72,11 +72,12 @@ else
end
function bwIntensity=thresholdPhaseIntensity(im,alpha,min_radius_pixels,min_area_pixels)
qThresh=prctile(im(:),[1,99]);
% qThresh=prctile(im(:),[1,99]);
qThresh=multithresh(im,2);
% use dark boundaries. seems to work for both dark and bright interior...
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