python - 是否可以选择为轴命名并使颜色更清晰?
问题描述
我在这里使用代码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----
解决方案
使用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()
使颜色更锐利是什么意思?
推荐阅读
- algorithm - Branch & Bound 问题中矩阵约简的意义何在?
- php - 使用复选框删除多行
- android - 房间中的惰性和更新项目无法按预期工作
- android-studio - Android Studio Emulator (Flutter) - 每次键入时都会弹出虚拟键盘,包括没有文本字段的屏幕
- firebase - 如何从服务器上的 Firebase 功能访问 Google Cloud Storage
- docker - 如何在 docker-compose.yml 文件中设置持久数据
- android - 如何更改 TextView 的 drawableEnd 属性
- android - 不让我构建我的 android 项目,但让我在 Unity 2019.1.6f1 Personal 中调试它
- python - 是否有图书馆或建议的策略来安排工作时间和休息时间?
- javascript - 为什么 axios.get 没有返回承诺