OpenHSI Hardware Camera Implementations
This module can be imported using from openhsi.cameras import LucidCamera
Wrapper class and example code for getting images from the OpenHSI.
To use the camera, you will need some calibration files. You can also generate these files following this guide which uses the calibrate
module.
You can see a picture I held up to the webcam.
Lucid Vision Labs Camera
Used for the OpenHSI Camera from Sydney Photonics.
Make sure you installthe Lucid Vision Labs Arena SDK and python api beforehand. These can be found here https://thinklucid.com/downloads-hub/
Any keyword-value pair arguments must match the those avaliable in settings file. LucidCamera expects the ones listed below:
binxy
: number of pixels to bin in (x,y) direction
win_resolution
: size of area on detector to readout (width, height)
win_offset
: offsets (x,y) from edge of detector for a selective
exposure_ms
: is the camera exposure time to use
pixel_format
: format of pixels readout sensor, ie Mono8, Mono10, Mono10Packed, Mono12, Mono12Packed, Mono16
mac_addr
: The mac address of the GigE sensor as string i.e. “1c:0f:af:01:7b:a0”
source
LucidCamera
LucidCamera ()
*Core functionality for Lucid Vision Lab cameras
Any keyword-value pair arguments must match the those avaliable in settings file. LucidCamera expects the ones listed below:
binxy
: number of pixels to bin in (x,y) direction
win_resolution
: size of area on detector to readout (width, height)
win_offset
: offsets (x,y) from edge of detector for a selective
exposure_ms
: is the camera exposure time to use
pixel_format
: format of pixels readout sensor, ie Mono8, Mono10, Mono10p, Mono10Packed, Mono12, Mono12p, Mono12Packed, Mono16
mac_addr
: str = “1c:0f:af:01:7b:a0”,*
source
LucidCameraBase
LucidCameraBase ()
*Core functionality for Lucid Vision Lab cameras
Any keyword-value pair arguments must match the those avaliable in settings file. LucidCamera expects the ones listed below:
binxy
: number of pixels to bin in (x,y) direction
win_resolution
: size of area on detector to readout (width, height)
win_offset
: offsets (x,y) from edge of detector for a selective
exposure_ms
: is the camera exposure time to use
pixel_format
: format of pixels readout sensor, ie Mono8, Mono10, Mono10p, Mono10Packed, Mono12, Mono12p, Mono12Packed, Mono16
mac_addr
: str = “1c:0f:af:01:7b:a0”,*
json_path='cals/OpenHSI-07/OpenHSI-07_settings_Mono8_bin1.json'
pkl_path='cals/OpenHSI-07/OpenHSI-07_calibration_Mono8_bin1.pkl'
with LucidCamera(n_lines=1000,
processing_lvl = 2,
pkl_path=pkl_path,json_path=json_path,
exposure_ms=10
) as cam:
cam.collect()
cam.show(hist_eq=True)
100%|██████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:11<00:00, 88.62it/s]
Multiprocessing camera export
Export cameras using the SharedOpenHSI class.
source
SharedLucidCamera
SharedLucidCamera ()
*Core functionality for Lucid Vision Lab cameras
Any keyword-value pair arguments must match the those avaliable in settings file. LucidCamera expects the ones listed below:
binxy
: number of pixels to bin in (x,y) direction
win_resolution
: size of area on detector to readout (width, height)
win_offset
: offsets (x,y) from edge of detector for a selective
exposure_ms
: is the camera exposure time to use
pixel_format
: format of pixels readout sensor, ie Mono8, Mono10, Mono10p, Mono10Packed, Mono12, Mono12p, Mono12Packed, Mono16
mac_addr
: str = “1c:0f:af:01:7b:a0”,*