![](/img/trans.png)
[英]How to display hyperspectral image with SPy by python script not ipython?
[英]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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.