A=uint16(double(A)/4294967295*65535);
例子:
A=imread('20180731tif.tif');
A=uint16(double(A)/4294967295*65535);
thresh = graythresh(A); %自动确定二值化阈值
BW1 = imbinarize(A,thresh); %对图像二值化
n=Inf;
BW = bwmorph(BW1,'shrink',n);
imshow(BW);
参考 https://blog.csdn.net/a573233077/article/details/85758436