首页 > 解决方案 > 是否可以选择为轴命名并使颜色更清晰?

问题描述

在此处输入图像描述

我在这里使用代码http://www.spectralpython.net/algorithms.html进行高光谱分析,我想制作轴并使颜色更加形状,我也试图只使图片的一部分可见(其中是植物)和所有要隐藏的背景。

from PIL import Image
from spectral import *
import spectral.io.aviris as aviris
import numpy
img = open_image('VNIR_plot35_2019-06-11_08-33-55.hdr').load()
v=imshow(vi)
#----ndiv algorithem----

标签: pythonimage

解决方案


使用imshow(vi)选择 3 个波段并显示为彩色图像。做同样的事情,用 3 个波段制作另一个超立方体用于查看目的(您的自由裁量权):

#I have taken bands 1,2 and 3- you can select at your discretion
img2=img[:,:,:3]

import matplotlib.pyplot as plt
#use pyplot's library functions
plt.imshow(img2)
plt.ylabel("y axis")
plt.xlabel("xaxis")
plt.show()

使颜色更锐利是什么意思?


推荐阅读