Hello,
I have a question following up from something I was working on several months ago with an ENVI tech, outlined in the email below (Incident # 290851).
I am trying to create a one-row image with all the spectral bands from spectral library (ASD file) contained within the image. I am receiving the following message when I try to calculate ROI separability (based on the .dat file Support tech suggested I create) "The Input must contain two bands". The .dat metadata says that I have only one band, though of course with ASD spectra, there are many bands. Perhaps there is another way to change the header or fool ENVI into thinking there are more bands but still create a one-row image in order to calculate ROI separability and indices based on the .dat file?
Any help with this would be much appreciated. Thank you.
On Tue, Feb 24, 2015 at 1:28 PM, Exelis VIS Technical Support support@exelisvis.com> wrote:
I am afraid that ENVI's narrowband spectra indices and ROI separability tools are not designed to be used with spectra. They are designed to be applied to spectral images only.
That said, there is a way to fool ENVI into thinking that your spectral library is an image, with just one row of pixels. With your spectral library in the form of an image, you can calculate spectral indices for that one-row image. You can also choose ROIs (each of which would needs to include more than one pixel/spectrum from your one-row image), that could then be input to the ROI separability tool. Keep in mind that the ROI Separability tool requires the calculation of covariance. Therefore, it is only useful for calculating theseparability of one collection of spectra from another collection of spectra, and not separability between two individual spectra. I don't know if that is what you wanted to do, but I thought I'd mention it.
To fool ENVI into interpreting your spectral library as an image, you will want to first import the library into ENVI using the Spectral Library Builder tool. Once you have generated the spectral library from your ASD spectra, it will have an ENVI *.sli filename extension. You will want to rename the file so that it has a *.dat filename extension. In other words, replace the *.sli with *.dat. Then you can open the associated header file (*.hdr) in a text editor. You will want to make the following change: Under "file type" change "ENVI Spectral Library" to "ENVI Standard". Now when you choose File > Open from the ENVI interface, and open this file, it should open as an image in which each pixel is a different spectrum. I recommend selecting the file in the Layer Manager, then clicking the Zoom to Full Extent button, to see the row of pixels.
At this point, you can use ENVI's ROI Tool as usual to click on pixels to define ROIs. And you can use the image as input to most of ENVI's processing routines.
I hope this helps. Please let me know if you have any questions about this suggestion, or if you run into any trouble implementing it.
Regards,
Peg Shippert
|