Skip to content
Snippets Groups Projects
Commit 4664498e authored by ac_fx's avatar ac_fx
Browse files

SSF.clipLimits min,max

parent 79dd2d5e
Branches
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ cl = [mx-sx, mx+sx];
% end
% linear quantization
clipLimits = linspace(cl(1),cl(2),nQuant);
clipLimits = cl; %linspace(cl(1),cl(2),nQuant);
% % equiprobable quantization
% ep1 = length(find(voxels<=cl(1)))./length(voxels);
......
......@@ -6,6 +6,13 @@ if isa(im,'uint8')
return
end
im = uint8(imquantize(im,clipLimits));
% im = uint8(imquantize(im,clipLimits));
im = max(im,clipLimits(1));
im = min(im,clipLimits(end));
im = (im - clipLimits(1)) ./ (clipLimits(end) - clipLimits(end));
im = im2uint8(im);
im = max(im,1);
im(0 == im_in) = 0;
4;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment