Skip to main content

Library to calibrate, trigger and capture data cubes for the open source hyperspectral camera.

Project description

Welcome to the Open Source DIY Hyperspectral Imager Library

Library to calibrate, capture and process data cubes for the open source DIY hyperspectral camera.

This Python library is licensed under the Apache v2 License. The documentation is licensed under a Creative Commons Attribution 3.0 Australia License.

Documentation can be found here: https://openhsi.github.io/openhsi/.

Install

pip install openhsi

or

conda install -c openhsi openhsi

The source code can be found on GitHub.

Requirements

  • Python 3.7+

Depending on your camera sensor, install:

Development and Contributions

This whole software library, testing suite, documentation website, and PyPI/conda package was developed in Jupyter Notebooks using nbdev. {% include important.html content='This library is under active development and new features are still being added. ' %}

Citation

If OpenHSI has been useful for your research, please acknowledge the project in your academic publication. We have a publication in progress.

@Article{        mao2022openhsi,
 title         = {OpenHSI: A complete open-source hyperspectral imaging solution for everyone},
 author        = {Yiwei Mao, and Christopher H. Betters, et al.},
 year          = {2022},
 journal       = {},
}

How to use

{% include tip.html content='For more detailed instructions, please see the tutorials in the sidebar of the documentation site. ' %}

Taking a single hyperspectral datacube

The example shown here uses a simulated camera for testing purposes. Replace SimulatedCamera with the appropriate Python class for your own camera to work with real hardware. For example, use LucidCamera imported from openhsi.cameras inplace of SimulatedCamera.

from openhsi.capture import *

with SimulatedCamera(img_path="assets/rocky_beach.png", n_lines=1024, processing_lvl = 3,
                    json_path="assets/cam_settings.json",pkl_path="assets/cam_calibration.pkl") as cam:
    cam.collect()
    fig = cam.show(plot_lib="matplotlib",robust=True)
100%|██████████| 1024/1024 [00:21<00:00, 48.11it/s]
fig.opts(fig_inches=7,title="simulated hyperspectral datacube")

{% include tip.html content='For more information on how to use this library, check out our Quick Start Guide.' %}

Hardware cameras

The hardware consists of a collimator tube with a slit (1) mounted in a 3D printed housing (2). A diffraction grating (3) is used to split the incoming light into its component colours to be detected on the camera sensor (4).

We have the following implementations in cameras module:

  • WebCamera
  • XimeaCamera
  • LucidCamera
  • FlirCamera

These all have the same interface so in principle, these OpenHSI cameras can be used interchangeably as long as you have the right calibration files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openhsi-0.2.1.tar.gz (10.7 MB view details)

Uploaded Source

Built Distribution

openhsi-0.2.1-py3-none-any.whl (295.1 kB view details)

Uploaded Python 3

File details

Details for the file openhsi-0.2.1.tar.gz.

File metadata

  • Download URL: openhsi-0.2.1.tar.gz
  • Upload date:
  • Size: 10.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.3

File hashes

Hashes for openhsi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f259ce4c7d4fa84f56cc16166d2fd62c95b288bdd00884fe48883774b32cc8d0
MD5 b5575b7d9355dbba77e86544b45ecabc
BLAKE2b-256 6eb68ed8f288201aff01c5017b306065ed6e789fb0af3f1048a046fb1f00ed86

See more details on using hashes here.

File details

Details for the file openhsi-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: openhsi-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 295.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.3

File hashes

Hashes for openhsi-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d40d7bb8c8e88d2925ce37e323653a42e4158a43b0699aa5f495290d17ba4452
MD5 df4c9aa1b4e17112ae03dbf7c8012ff6
BLAKE2b-256 a2141f41c673605b39fec8e9ed26ed4cf85eb9b091b5cc83e720d3a9cc2dd1bf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page