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

quantize pair fix

parent a852e025
No related branches found
No related tags found
No related merge requests found
% i1 and i2 are signal kymos (x,y,t,c)outdir
% we want images {t}(x,y,c)
% package to cell array by t and then pass to in memory FLI%F compressor
% i1 and i2 are each 3.3D images, e.g. (x,y,z) or (x,y,t), etc.
% package to cell array by z or t and then pass to in memory FLIF compressor
% if images are not uint8, they will be quantized to uint8 (FLIF does not
% like floats)
function ncd = ncd_ssf_volume(i1,i2)
[i1,i2] = NCD.quantizePair(i1,i2);
......
% clip image pairs and quantize, per channel (x,y,z,c)
% best practice -- quantize all embedded data jointly
% if images already quantized (uint8), just return them
% otherwise quantize image pair
function [i1q,i2q] = quantizePair(i1,i2,clipLimits)
if isa(i1,'uint8') && isa(i2,'uint8')
i1q = i1;
i2q = i2;
return
end
if ~exist('clipLimits','var')
clipLimits = [0,100];
end
if size(i1,4) ~= size(i2,4)
fprintf(2,'WARNING : quantizePair : input images of different color channel dimension\n');
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment