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

L vs. R src/MATLAB

parent caf5bf66
Branches
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 ...@@ -17,8 +17,13 @@ end
px = px{:}; px = px{:};
px_pos = px(px>0); px_pos = px(px>0);
px_neg = abs(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) for i = 1:length(imf)
imp = imf{i}; imp = imf{i};
......
File moved
function [imf,bwMask] = imPreProcess(im,radii) 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 im = uint8(im); % values are already uint8, just wrapped in a double
AX = 1/sqrt(3);
imp = double(0*im); sx = AX .* radii;
imn = imp;
for rr = 1:length(radii)
sx = radii(rr);
if 1 == length(sx)
sx = [0.45,sx,sx];
end
sx = AX .* sx;
cudaTarget = getCudaTarget; cudaTarget = getCudaTarget;
imf = HIP.LoG(im,sx,cudaTarget); imf = HIP.LoG(im,sx,cudaTarget);
[~,imp1,imn1] = LoG.separateLoG(imf); [~,imp,imn] = LoG.separateLoG(imf);
imp = max(imp,imp1);
imn = max(imn,imn1);
end
% threshold mask % threshold mask
bw = imbinarize(im); bw = imbinarize(im);
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment