Borrar filtros
Borrar filtros

How to view a hyperspectral image ? I have AVIRIS Indian pines image 145 x145x 220 ?

6 visualizaciones (últimos 30 días)
How to view a hyperspectral image ? I have AVIRIS Indian pines image 145 x145x 220 ?
X=multibandread('indian_pines.mat',[145,145,220],'uint16',1,'bsq','ieee-le')
and every time I try this I got:
Error using multibandread (line 119)
The file is too small to contain the specified data. Check the size, offset, and precision arguments.
Thanks in advance.

Respuestas (1)

Image Analyst
Image Analyst el 25 de Jun. de 2017
And did you do that? How do you KNOW that the values are what you say they are?
And why are you passing it a .mat file? I don't see anything in the help about multibandread() accepting .mat files. It says "Note: In addition to BSQ, BIL, and BIP files, multiband imagery may be stored using the TIFF file format. In that case, use the imread function to import the data." So, why are you not using the normal "load()" to load in your .mat file data?
  3 comentarios
Image Analyst
Image Analyst el 25 de Jun. de 2017
Maybe multibandread() should work with .mat files, but, for whatever reason, it doesn't. You can send in a request for enhancement. My guess is that .mat files can be virtually anything under the sun while multibandread() is for the very specific use of reading in imagery that has multiple channels. I doubt they want to open up multibandread() to read anything under the sun when they already have such a capability to read mat file in with the load() function. There are many, many file reading functions in MATLAB and they all can't read in all possible file formats - it's not efficient. It's much better to have specialized, specific reading functions when you know your data will be stored in a specific format.
If you want to proceed further, I suggest you try load(). Otherwise you'll be waiting literally years, or forever, if you wait for the Mathworks to add mat file reading capability into multibandread().
As a favor to me (and yourself), can you at least try load()? (I can't do it for you because you did not attach the file.) Let us know how it goes.

Iniciar sesión para comentar.

Categorías

Más información sobre Hyperspectral Image Processing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by