I am learning hyperspectral data analysis, so my question may sound simple.
I am reading a hypercube by using the following command:
import spectral.io.envi as envi
hc = envi.open('cube_envi32.hdr','cube_envi32.dat')
'hc' has the following shape:
# Rows: 512
# Samples: 640
# Bands: 92
Interleave: BSQ
Quantization: 32 bits
Data format: float32
(512, 640, 92)
I want to extract the spectral (or pixel values of within a specific binary mask, as shown with rectangle here:
My question includes two parts:
- which python library is suitable for spectra analysis and working with hypercubes?
- what command should I write to extract the spectra values of the region of interest?
Thanks