=(12,4))
plt.subplots(figsize1,:],cmap="gray",aspect=0.3) plt.imshow(cam.dc.data[:,
Common and Webcam
Hardware cameras
OpenHSI Hardware Camera Implementations
Common Code
Tip
This module can be imported using from openhsi.cameras import *
Wrapper class and example code for getting images from the OpenHSI.
Tip
To use the camera, you will need some calibration files. You can also generate these files following this guide which uses the calibrate
module.
Webcams
This uses the OpenCV library to interface with a webcam including the one in your laptop. Mainly for testing but maybe this could be useful.
WebCamera
WebCamera (mode:str=None, n_lines:int=16, processing_lvl:int=-1, warn_mem_use:bool=True, json_path:str=None, pkl_path:str=None, print_settings:bool=False)
Interface for webcam to test OpenHSI functionality
You can see a picture I held up to the webcam.
switched_camera
switched_camera (cam_class:str=None, n_lines:int=128, processing_lvl:int=0, json_path:str='/media/pi/fastssd/c als/flir_settings.json', pkl_path:str='/media/pi/fastssd /cals/flir_calibration.pkl', preconfig_meta:str='/media/ pi/fastssd/cals/preconfig_metadata.json', ssd_dir:str='/media/pi/fastssd', toggle_interface=None)
If toggle_interface.status
is True, collect with the camera until switched is False.
Type | Default | Details | |
---|---|---|---|
cam_class | str | None | Camera Class Name from openhsi.cameras |
n_lines | int | 128 | how many along-track pixels |
processing_lvl | int | 0 | desired processing done in real time |
json_path | str | /media/pi/fastssd/cals/flir_settings.json | path to settings file |
pkl_path | str | /media/pi/fastssd/cals/flir_calibration.pkl | path to calibration file |
preconfig_meta | str | /media/pi/fastssd/cals/preconfig_metadata.json | path to metadata file |
ssd_dir | str | /media/pi/fastssd | path to SSD |
toggle_interface | NoneType | None | toggle_interface that controls collection |