Skip to content
Snippets Groups Projects
Commit a0ebdde4 authored by ac's avatar ac
Browse files

L vs. R src/MATLAB

parent caf5bf66
No related branches found
No related tags found
No related merge requests found
Showing
with 12 additions and 24 deletions
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
......@@ -17,8 +17,13 @@ end
px = px{:};
px_pos = px(px>0);
px_neg = abs(px(px<0));
clip_pos = [mean(px_pos)-std(px_pos), mean(px_pos)+std(px_pos)];
clip_neg = [mean(px_neg)-std(px_neg), mean(px_neg)+std(px_neg)];
% clip_pos = [mean(px_pos)-std(px_pos), mean(px_pos)+std(px_pos)];
% clip_neg = [mean(px_neg)-std(px_neg), mean(px_neg)+std(px_neg)];
% clip_pos = [min(px_pos),max(px_pos)];
% clip_neg = [min(px_neg),max(px_neg)];
clip_pos = prctile(px_pos,[0.5,99.5]);
clip_neg = prctile(px_neg,[0.5,99.5]);
for i = 1:length(imf)
imp = imf{i};
......
File moved
function [imf,bwMask] = imPreProcess(im,radii)
% AX = 1/sqrt(3) .* [15.38,1,1] ;
% AX = 1/sqrt(3) .* [5,1,1] ;
AX = 1/sqrt(3);
% dx = 15.38;
dx = 20;
AX = 1/sqrt(3);
% fun fact :: mat2gray here causes r2 decline
im = uint8(im); % values are already uint8, just wrapped in a double
imp = double(0*im);
imn = imp;
for rr = 1:length(radii)
sx = radii(rr);
if 1 == length(sx)
sx = [0.45,sx,sx];
end
sx = AX .* sx;
AX = 1/sqrt(3);
sx = AX .* radii;
cudaTarget = getCudaTarget;
imf = HIP.LoG(im,sx,cudaTarget);
[~,imp1,imn1] = LoG.separateLoG(imf);
imp = max(imp,imp1);
imn = max(imn,imn1);
end
[~,imp,imn] = LoG.separateLoG(imf);
% threshold mask
bw = imbinarize(im);
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment