How to I convert a binary (logical) image back into double, uint8, etc, without changing what the image looks like in binary?
Mostrar comentarios más antiguos
I took a grayscale image (.tif file) and converted it into binary using imbinarize(). This gave me the desired visual, but now I want to save that visual and use it for processing. The issue is that my processing method does not take logical inputs and I can not change it. Is there a way to perserve the binary visual and convert it into a double or uint8? I could just screenshot it then convert it to .tif, but that would be cheaty. Thank you!
Respuesta aceptada
Más respuestas (1)
img = imbinarize(imread('cameraman.tif'));
imshow(img); title('logical')
i8 = im2uint8(img);
imshow(i8); title('uint8');
id = im2double(img);
imshow(id); title('double');
1 comentario
Rowan Quintero
el 27 de Jul. de 2023
Categorías
Más información sobre Convert Image Type en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


