converting tiff to image
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
K.G
el 22 de Dic. de 2017
Comentada: Walter Roberson
el 23 de Dic. de 2017
Hi all, I am trying to code a tiff format file into a matrix of 2 dimention using imread. then I want to convert back the matrix to my original tiff file using imwrite. but when I do this the new tiff image is not the same as the original one. it is just a black background. is there anyway I can solve this problem?
0 comentarios
Respuesta aceptada
Image Analyst
el 22 de Dic. de 2017
Simply calling
tifImage = imread(inputFilename);
followed by
imwrite(tifImage, outputFilename);
Should not do that. The pixel values should be exactly the same (since no compression is being done). Chances are, you did something to the image, like converted it to a double or something. If you want any more help, attach your code (everything from imread to imwrite and all the lines of code in between) and your original input image that you say is not saving correctly.
7 comentarios
Walter Roberson
el 23 de Dic. de 2017
"so you mean if I can make a tiff image with double data type from the beginning it will work properly?"
No.
"Hi all, I am trying to code a tiff format file into a matrix of 2 dimention using imread."
Your image is color, which requires 3 or more dimensions. You cannot retain color in 2 dimensions.
Más respuestas (0)
Ver también
Categorías
Más información sobre Convert Image Type en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!