用于校准、触发和捕获开源高光谱相机数据立方体的库。
openhsi的Python项目详细描述
开源DIY高光谱影像库
Library to calibrate, trigger and capture data cubes for the open source DIY hyperspectral camera.
此作品由Creative Commons Attribution 3.0 Australia License授权。在
文档可以在这里找到:https://openhsi.github.io/openhsi/。在
安装
pip install openhsi
要求
- Python 3.6+
- Ximea SDK(请参见https://www.ximea.com/support/wiki/apis/Python)
如何使用
拍摄一张照片
from openhsi.capture import *
try:
take_show()
except:
print('No devices found. Camera not connected.')
^{pr2}$
改变曝光和增益
try:
with OpenHSI(xbinwidth=896,xbinoffset=528,exposure_ms=1000,gain=0) as cam:
cam.exposure = 100
cam.gain = 5
img = cam.start().get_img()
plt.imshow(img)
plt.xlabel('Wavelength (nm)')
plt.ylabel('Line pixels')
plt.show()
except:
print('No devices found. Camera not connected.')
^{pr2}$
校准
from openhsi.calibrate import *
result = fit_arc_lines2(arc_file = "cal_files/arc.hdf5", wave_save_file = None, skip = 1, show = True)
Fit arc lines for each spatial pixel
<;样式>;
/*关闭一些样式*/
进展{
/*删除Firefox和Opera中的默认边框。*/
边框:无;
/*需要在这里为Safari polyfill这样背景图像工作如预期。*/
背景尺寸:自动;
}
.progress bar中断,.progress bar中断::-webkit进度条{
背景:F44336;
}
<;/style>;
<;进度值=“0”class=''max='896'style='宽度:300px;高度:20px;垂直对齐:middle;'>;<;/progress>;
- 项目
标签: