How can i plot hyperspectral data matrix?

I would like to rebuild the image from hyperspectral data matrix. My data matrix are made of 264 spectra of 248 values of lambda. The the image i would like to build has to be of 33*8 pixels where every pixel is a spectrum. Thank's

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Dic. de 2017
You can reshape() to [33, 8, 248], to get an array of pixels with 248 channels per pixel, but there is no way to plot in 248 dimensions.
Perhaps it would be acceptable to use volume visualization techniques, such as
volumeViewer( reshape(YourData, 33, 8, []) )

6 comentarios

vittorio calbucci
vittorio calbucci el 18 de Dic. de 2017
Thank you for the answer. Anyway, i tried to reshape the data but i would like to use matlab functions instead of external app.
Walter Roberson
Walter Roberson el 18 de Dic. de 2017
volumeViewer is part of the Image Processing Toolbox.
It would help if you were to link to a sample of what you would like the result to look like.
vittorio calbucci
vittorio calbucci el 18 de Dic. de 2017
The data are extracted from an hyperspectral cube. The extracted cube has dimension (8*33*248) where 8 and 33 are the n° of pixels of the image and 248 is the number of wavelengths (values) for every pixel. To manage better the data, i can use not the 248 values for every pixel, but a single value for every pixel, e-.g. the standard deviation of every single array. My problem is how to plot such data. I'm expecting to see a small object in the middle of the image. "white" object in a dark background.
imagesc( std(reshape(YourArray, 8, 33, []),3))
colormap(gray(256))
vittorio calbucci
vittorio calbucci el 18 de Dic. de 2017
The results it's not really what i'm looking for and i got an error related to the image function. in my case it will be better to reshape the image in this way (248,33,8) but i already receive an error on the imagesc function
temp1 = reshape(YourArray, 8, 33, []);
temp2 = std(temp1, 0, 3);
imagesc( temp2 );
colormap(gray(256))

Iniciar sesión para comentar.

Categorías

Preguntada:

el 18 de Dic. de 2017

Comentada:

el 18 de Dic. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by