Installing OpenHSI on Windows
openhsi
library and camera SDKs on Windows machines.
This tutorial is a work in progress.
Requirements
- Windows 10 computer
Using openhsi
requires generating large datacubes which take up lots of RAM. It is recommended to use a computer with as much RAM as possible.
Tutorial assumes you have a working OS on your system.
Hyperspectral datacubes are really large so best to save them to an external SSD.
1. Python Environment
Windows does not have Python by default, so you will need to setup an enviroment. We recommend Miniforge as good way to get a working install (that avoid having to build dependaces like Py6S). An alternative is pyenv, if you prfer vanilla cpython.
https://pythonspeed.com/articles/conda-vs-pip/ - some notes on conda (miniforge) vs pip (pyenv).
Instaling with Miniforge or Miniconda
Miniforge is an easy way to get a full working Python install working on windows.
To install download and run the following: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe
See https://github.com/conda-forge/miniforge for more information on miniforge.
Once installed you shoudl have a link in your start menu or on your desktop for a “Miniforge Prompt”. Use tis to get a command line with python.
Install Jupyter Lab
All the interactive tools in openhsi
require Jupyter Notebooks because it uses web tools. To install, follow the steps in https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html
In short, it boils down to
conda install -c conda-forge jupyterlab
To run jupyterlab, use the below command when in the directory you want to work in. This will start jupyterlab and open a browser window to the workspace.
jupyter lab
You will also need some Jupyter Extensions. Navigate to the Jupyter Extensions tab and search for jupyterlab-manager
, and jupyter_bokeh
.
2. Install OpenHSI
via conda
Create a new environment and install OpenHSI (including python dependancies and 6SV, except for cameras). You can change python version as required as well.
conda create -n openhsi python=3.8 openhsi
conda activate openhsi
or using environment.yml in the main repo
conda env create -f environment.yml
See CONTIRBUTE file in repo for examples of how to setup development mode if you want to mke chnages to OpenHSI code.
3. Install Camera SDK
Install Lucid Vision Arena SDK (Sydney Photonics/Robonation OpenHSI)
The Robonation OpenHSI uses the detector from Lucid Vision Labs Inc. Their full SDK is required to use the sensor with the OpenHSI libary. This can be acquired from https://thinklucid.com/downloads-hub/.
Run the installer and follow the prompts. We recommend picking delveoper install, so you get AreaView progam, which may be helpful in troublshooting.
Arena Additional Setup
At the end of the innstaller click the option to show the Arena Getting Started Guide, which has some instructons for final setup. (the path to these will be somethink like this: C:/Program Files/Lucid Vision Labs/Arena SDK/docs/html/arena_sdk_windows.html
)
In the instructions you will be shown how setup the LUCID Lightweight Filter Driver for Windows and enable jumbo frames.
Install Arean Python Library
And then install the arena python library (this is the same on a conda based or pip based python env):
pip install --no-deps arena_api-<version>-py3-none-any.whl
Install Spinnaker SDK (FLIR based OpenHSI)
Download and install the Spinnaker SDK and python wheel. - https://www.flir.com.au/products/spinnaker-sdk/
On an Intel/Amd, you want amd64/x86_64 version on raspi you want aarch64 or arm64.
Folow the Spinaker SDK install instructions and then install the python package:
pip install --no-deps spinnaker_python-<your needed version>.whl
Install Ximea SDK (Ximea based OpenHSI)
Navigate to https://www.ximea.com/support/wiki/apis/Python and click on the Windows installation instructions. This will bring you to the page https://www.ximea.com/support/wiki/apis/Python_inst_win which lists everything you need to install the Ximea API.
We recommend using conda
instead of pip
when following these instructions for installing packages (when using miniforge).
Ready to go!
Congratulations, you now have a system that can run your openhsi
!