This text document will elaborate how to use the "HySIOperations.exe" program.
Download HySIOperations.rar and uncompress the file. The link is available at the bottom of the page.
1. Run the runme.bat this copies the required dlls into your system32 folder.
In case you are using Vista, you may need to authenticate the copying action.
2. The program is rudimentary with respect to ease of use. Kindly rename your IMS HySI H5 file as "tn_hysi.h5" and put it inside the same folder where the exe file resides.
3. Use the options, the export command would create an "AllBands.txt" file in the same folder. This ASCII file is in BSQ with dimensions 241 [rows/scans] 256[columns/pixels] and 64[bands].
4. You can import this as generic binary in ERDAS, ENVI, PCI etc.
5. For assistance in importing in ERDAS, ENVI, read below.
1. Click on the IMPORT / EXPORT button.
2. Choose the input file type as "ASCII Raster"
3. Choose the file
4. specify the output image name and location
5. Click Ok and a set of options are displayed.
5.1 Data format is BSQ
5.2 Data type is 'Decimal'
5.3 No of Rows : 241
5.4 No of Cols : 256
5.5 No of Bands: 64
5.6 Line terminator: Return + LineFeed(DOS)
5.7 No of lines to skip : 0
5.8 Skip bytes (1st image line) : 0
5.9 Skip bytes (subsequent lines) : 0
5.10 Pixel arrangement : Delimited
5.11 Delimiter : Tab
6. Click on the Import Options
6.1 Output Data compression : None
6.2 Output data type : Unsigned 16 - bit
6.3 Block size : 64
6.4 Select layers : 1:64
6.5 Ignore zero in output stats : checked
6.6 Click on Ok
7. Hit on the preview button to check the import
8. If all is fine, hit on Ok
9. An .img file with all 64 bands is created and a supporting .rrd file is created.
Copy the HySI.saf file into your ERDAS\etc folder (or where other saf files are stored). This file will make HySI appear as one of the sensors in your Hyperspectral analysis pull down menus. Click on it and you can find the band number and FWHM loaded and ready for your analysis.
1. Start ENVI
2. File-> Open External file -> Generic Formats -> ASCII
3. Select the "Allbands.txt"
4. ENVI takes a while to read this file
5. In the "Input ASCII file" dialog, select BSQ as Interleaving, Unsigned Int as Data Type and 64 as number of bands.
6. The file gets loaded in the memory, save this file for further use.
HySI Header file for ENVI
7. Copy the file "filename.hdr" into the location where your newly saved ENVI HDF file is located.
8. Rename "filename.hdr" into the new filename you had given with the same extension .hdr
9. Now the header information is ready. The next time you load the same file in ENVI, you automatically get the band numbers and their FWHM. use the spectrum plot (Z profile view) and enjoy the plot with wavelength on the X axis.