<p>Dear forum members,<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Lately I was trying to use ENVI software to perform a mathematical operation for some data cubes I collected from a hyper spectral system. The process can be summarized as below: the hyper spectral system usually generate 3 data cube files: one for the raw data collected from the sample, another is the white reflectance data cube to correct the lamp intensity profile, and the other for the dark counts.<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
To get a normalized data cube, I need to perform (raw data- dark data)/(white reflectance - dark data)*(max count value). I was experimenting on using ENVI spectral math to perform this operation, i.e. define an expression (s1-s3)/(s2-s3)*4095, (max count value = 4095), and assign raw data cube to s1, white reflectance cube to s2, and dark data cube to s3, and then spatial and spectral subsetting using full scene and all bands, however, the output data cube (normalized data cube) seems to be a different result than I'd expect. I calculated the numerical values in matlab using the same expression (Normalized=(Rawdata-<wbr style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"></wbr>darkedata)./(whitedata-<wbr style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"></wbr>darkedata)*4095; the result is good. For some reason in spectral math, the output normalized data cube is not matching. So I was wondering if there is anything I did wrong or something. All our data cubes are 1456x1936x65 (bsq formatted). I attach the representative header file for the original 3 cubes below. So I noticed that the interleave has been changed from BSQ to BIL for the spectral math calculated data cube, I'm wondering if this has something to do with it.<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Please let me know if you have any suggestions. Really appreciate your time and help.<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Sincerely,<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Hao<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
For raw data cube:<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
ENVI<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
description = ENVI Data Cube<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
samples = 1936<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
lines = 1456<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
bands = 65<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
header offset = 0<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
file type = ENVI Standard<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
data type = 2<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
interleave = BSQ<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
byte order = 1<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
band names = {400.000 nm,405.000 nm,410.000 nm,415.000 nm,420.000 nm,425.000 nm,430.000 nm,435.000 nm,440.000 nm,445.000 nm,450.000 nm,455.000 nm,460.000 nm,465.000 nm,470.000 nm,475.000 nm,480.000 nm,485.000 nm,490.000 nm,495.000 nm,500.000 nm,505.000 nm,510.000 nm,515.000 nm,520.000 nm,525.000 nm,530.000 nm,535.000 nm,540.000 nm,545.000 nm,550.000 nm,555.000 nm,560.000 nm,565.000 nm,570.000 nm,575.000 nm,580.000 nm,585.000 nm,590.000 nm,595.000 nm,600.000 nm,605.000 nm,610.000 nm,615.000 nm,620.000 nm,625.000 nm,630.000 nm,635.000 nm,640.000 nm,645.000 nm,650.000 nm,655.000 nm,660.000 nm,665.000 nm,670.000 nm,675.000 nm,680.000 nm,685.000 nm,690.000 nm,695.000 nm,700.000 nm,705.000 nm,710.000 nm,715.000 nm,720.000 nm}<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
For normalized data cube from spectral math:<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
ENVI<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
description = {<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spectral Math Result, Exp = [(s1-s3)/(s2-s3)*(4095)] [Mon Nov 9 13:09:18<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
2015]}<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
samples = 1936<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
lines = 1456<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
bands = 65<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
header offset = 0<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
file type = ENVI Standard<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
data type = 2<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
interleave = bil<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
sensor type = Unknown<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
byte order = 0<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
wavelength units = Unknown<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
band names = {<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (400.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (405.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (410.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (415.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (420.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (425.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (430.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (435.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (440.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (445.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (450.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (455.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (460.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (465.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (470.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (475.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (480.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (485.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (490.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (495.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (500.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (505.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (510.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (515.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (520.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (525.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (530.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (535.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (540.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (545.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (550.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (555.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (560.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (565.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (570.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (575.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (580.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (585.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (590.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (595.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (600.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (605.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (610.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (615.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (620.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (625.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (630.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (635.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (640.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (645.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (650.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (655.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (660.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (665.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (670.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (675.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (680.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (685.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (690.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (695.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (700.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (705.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (710.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (715.000 nm),<br style="color: #222222; font-family: arial, sans-serif; font-size: 13px;" />
Spec Math (720.000 nm)},</p>
|