For signed-integer images (int16), an offset is applied to bring the % gray values in the non-negative zeros(0, 'like', A); ssimmap = A; return; end if isa(A,'int16') % int16 is the only allowed signed-integer % Add offset for signed-integer types to bring values in the % non-negative range.