Problem with converted TIFF image
古いコメントを表示
I converted a png to tiff unsigned int16. The image resulting is completely black.
This a apart of my code:
% Convert to unsigned 16-bit integer
img_uint16 = uint16(double(img) / double(intmax('uint16')) * 65535);
% Save the image as TIFF
tiffPath = fullfile(subfolderPath, [currentImage(1:end-4), '_converted.tif']);
imwrite(img_uint16, tiffPath);
採用された回答
その他の回答 (1 件)
Walter Roberson
2023 年 12 月 14 日
移動済み: DGM
2024 年 5 月 12 日
1 投票
Use im2uint16
カテゴリ
ヘルプ センター および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!