I have preprocessed an image which finaly gives angle values, since the image is in .img format. I have exported it to .tiff format and opened in Matlab. When i used imread function. The array is showing only 0 values, but image is in greyscale from white to black. secondly how can i get the angle values from the image.

1 comentario

Walter Roberson
Walter Roberson el 22 de Nov. de 2021
how did you convert the .img to .tiff format?
What is class() of your input data? What is class() of the data you are writing? Are you possibly trying to write complex data?

Iniciar sesión para comentar.

 Respuesta aceptada

yanqi liu
yanqi liu el 22 de Nov. de 2021
sir,may be use
t = Tiff('myfile.tif','r');
t = Tiff('cameraman.tif','r');
t
t =
TIFF File: '/MATLAB/toolbox/images/imdata/cameraman.tif' Mode: 'r' Current Image Directory: 1 Number Of Strips: 8 SubFileType: Tiff.SubFileType.Default Photometric: Tiff.Photometric.MinIsBlack ImageLength: 256 ImageWidth: 256 RowsPerStrip: 32 BitsPerSample: 8 Compression: Tiff.Compression.PackBits SampleFormat: Tiff.SampleFormat.UInt SamplesPerPixel: 1 PlanarConfiguration: Tiff.PlanarConfiguration.Chunky ImageDescription: This image is distributed by The MathWorks, Inc. with permission from the Massachusetts Institute of Technology. Orientation: Tiff.Orientation.TopLeft

4 comentarios

Keerthana N
Keerthana N el 22 de Nov. de 2021
Thanks for helping. but the array consists of 0 values for each rowas and columns. and how can i extract the angle values for the further analysis.
Image Analyst
Image Analyst el 22 de Nov. de 2021
What values did it originally have, after you imported it from the .img file but before you saved it as a TIFF file?
Keerthana N
Keerthana N el 22 de Nov. de 2021
Editada: Keerthana N el 22 de Nov. de 2021
basically it was in .img format. it has anlge values. This image consists only one band which consists angle values at each pixels. using imread sunction, the array is giving me 0 values, i have attached a file of it. since it has only one band, it has to show some values right. the whole 5463X2633 has values.
Walter Roberson
Walter Roberson el 24 de Nov. de 2021
What shows up for nnz() applied to that array?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 22 de Nov. de 2021

Comentada:

el 24 de Nov. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by