Convert RGB to Hyperspectral image

Hi,
I converted hyperspectral image to RGB to perform calculation on it.
I want to convert the RGB (the output after calculation) to hyperspectral image again
Is there a way to do that?
Thank you,

 Risposta accettata

Image Analyst
Image Analyst il 14 Lug 2013

0 voti

How many extra spectral channels do you want? What information (image data) will go into them?

6 Commenti

Mona
Mona il 14 Lug 2013
The size of the input hyper image is 1392x1040x500 uint16 ,I converted it to RGB image, performed the calculation on it, the output image of size 500x1392 logical
I want to convert the output to hyper image again with at least 50 bands: X 500 Y 1392 Z 50
to be able to read it and display it as BSQ format (This is my goal)
I hope that I answered the question right.
Thank you,
Once you get it down to an RGB image, you've essentially lost all of the original spectral information. Then when you process it and end up with a binary image, there is no spectral information whatsoever. Plus, there is not even a reason to want your binary image to be a spectral image - it just doesn't make sense. I don't know why you created a binary image or what your plans for it are, but if you wanted a spectral image, just keep your original image hanging around - it has all the spectral information you need. I don't even know what these 50 bands should represent, nor have I dealt with BSQ format images (you may have to get a special writer function for that).
Mona
Mona il 14 Lug 2013
I converted the hyper to RGB to be able to perform some function on matlab that can't be performed on the hyper image (3D) .And I want to save the output as hyper, but I guess that's not possible.
I have read, display, and write functions for bsq format images. My main issue is that I want it back as hyper with my calculation on it to be able to save/dsiplay it as bsq.
Thank you for your fast response very appreciated
What you want is, as I said, unnecessary. There is no reason to save a binary image as a hyperspectral image. However if you want to ignore my advice, I believe you can create a N-D image using cat():
hyperImage = cat(3, BW, BW, BW, BW, BW,....);
% Put BW in there 50 times.
% Then save using your BSQ saving routine.
Mona
Mona il 14 Lug 2013
Thank you, I will try it.
Like I said, I wish you wouldn't because it's not necessary.

Accedi per commentare.

Più risposte (1)

Image Analyst
Image Analyst il 8 Mar 2017

0 voti

See this paper, which goes into great detail on the hyperspectral to RGB conversion process: http://my.ece.msstate.edu/faculty/du/JSTARS-VIS.pdf

Community Treasure Hunt

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

Start Hunting!

Translated by