Python Spectral.view_cube()卡死
2021/8/25 12:06:11
本文主要是介绍Python Spectral.view_cube()卡死,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
今天尝试使用Spectral.view_cube()时,输出的超立方直接卡死
使用如下代码也无法正常运行
spectral.settings.WX_GL_DEPTH_SIZE=16
查了资料以后发现wxpython是python中的一个GUI框架,于是利用以前调试tkinter的bug办法进行尝试。
import spectral import numpy as np import wx img = spectral.envi.open('test.hdr', 'test0.dat' ) info=img.metadata v=img[:,:,:] vmax=v.max(axis=(0,1)) vmin=v.min(axis=(0,1)) vv=(v-vmin)/(vmax-vmin)*255 vv=vv.astype(np.uint8) app=wx.App() spectral.settings.WX_GL_DEPTH_SIZE=16 spectral.view_cube(vv,bands=[29,19,9]) app.MainLoop() #app.ExitMainLoop() #wx.Exit()
https://zhuanlan.zhihu.com/p/267305478
https://blog.csdn.net/gwj992/article/details/79274511
这篇关于Python Spectral.view_cube()卡死的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-08有遇到过吗?同样的规则 Excel 中 比Python 结果大
- 2024-03-30开始python成长之路
- 2024-03-29python optparse
- 2024-03-29python map 函数
- 2024-03-20invalid format specifier python
- 2024-03-18pool.map python
- 2024-03-18threads in python
- 2024-03-14python Ai 应用开发基础训练,字符串,字典,文件
- 2024-03-13id3 algorithm python
- 2024-03-13sum array elements python