Commit 32eec65f authored by Andrew Cohen's avatar Andrew Cohen

Merge branch 'master' into aiAreaOpen

# Conflicts:
#	matlab/+Segment/thresholdImages.m
parents b6d4aea0 f299760a
......@@ -31,12 +31,12 @@ if is3D(im)
end
if USE_CUDA
logRadius=min_radius_pixels.*(1/sqrt(3));
imLog=HIP.LoG(imRaw,logRadius,[]);
imLog=HIP.LoG(im,logRadius,[]);
else
% use difference of gaussian approximation
logRadius=min_radius_pixels;
imd1=imgaussfilt3(imRaw,sqrt(2).*logRadius);
imd2=imgaussfilt3(imRaw,logRadius./sqrt(2));
imd1=imgaussfilt3(im,sqrt(2).*logRadius);
imd2=imgaussfilt3(im,logRadius./sqrt(2));
imLog=imd1-imd2;
end
else
......@@ -45,16 +45,16 @@ else
logRadius=(1/sqrt(2)).*min_radius_pixels;
logRadius(2)=logRadius(1);
logRadius(3)=0;
imLog=HIP.LoG(imRaw,logRadius,[]);
imLog=HIP.LoG(im,logRadius,[]);
else
if length(min_radius_pixels)>1
logRadius=0.5*min(min_radius_pixels(1:2));
else
logRadius=0.5*min_radius_pixels ;
end
szFilter=round(size(imRaw)/3);
szFilter=round(size(im)/3);
h=fspecial('log',szFilter,logRadius);
imLog=imfilter(imRaw,h,'replicate');
imLog=imfilter(im,h,'replicate');
end
end
......@@ -93,6 +93,9 @@ if is3D(im)
end
else
imx = medfilt3(im);
for i=1:30
imx=medfilt3(imx);
end
end
else
% 2D
......
......@@ -12,7 +12,7 @@ else
end
if sensitivity>1 && round(sensitivity)==sensitivity
lm=multithresh(imLog,sensitivity)
lm=multithresh(imLog,sensitivity);
bwLog=logical(imLog>lm(end));
bwLog=Segment.aiAreaOpen(bwLog,2*min_radius_pixels);
lm=multithresh(im,sensitivity)
......
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