Problem with converted TIFF image
Show older comments
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);
Accepted Answer
More Answers (1)
Walter Roberson
on 14 Dec 2023
Moved: DGM
on 12 May 2024
1 vote
Use im2uint16
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!