Python 的高光谱图像处理
Hyperspectral Image Processing with Python
如何使用 python 的冠层分布将高光谱图像 (3d) 读入内存?
安装 Spectral Python (Spy) 是最好的方法:
C:\Users\Me> pip install spectral
安装模块后,可以通过以下方式轻松将高光谱图像读入内存:
>>> import spectral
>>> img = spectral.open_image(<HSI_filename>)
安装间谍包。
使用 ipython 终端。
ipython --pylab
读取内存并查看 HSI:
from spectral import*
import numpy as np
var=open_image(r"C:\<give_image_file_location>")
img= var.load() #save as ndarray
np.save(outimg, img) #save image to a binary file in .npy format
imshow(var) #view image in some bands
如何使用 python 的冠层分布将高光谱图像 (3d) 读入内存?
安装 Spectral Python (Spy) 是最好的方法:
C:\Users\Me> pip install spectral
安装模块后,可以通过以下方式轻松将高光谱图像读入内存:
>>> import spectral
>>> img = spectral.open_image(<HSI_filename>)
安装间谍包。 使用 ipython 终端。
ipython --pylab
读取内存并查看 HSI:
from spectral import*
import numpy as np
var=open_image(r"C:\<give_image_file_location>")
img= var.load() #save as ndarray
np.save(outimg, img) #save image to a binary file in .npy format
imshow(var) #view image in some bands