Hikrobot

Hikrobot Hardware cameras

OpenHSI Hikrobot Camera Implementations

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.

Hikrobot Camera

Used for OpenHSI cameras built with a Hikrobot machine vision detector. Developed against the MV-CA013-21UM (a 1280$$1024 monochrome USB3 Vision camera), but not yet validated on hardware — see the warning below.

This camera requires the Hikrobot MVS SDK which can be downloaded from https://www.hikrobotics.com/en/machinevision/service/download. The SDK ships its Python bindings (MvCameraControl_class) inside the MvImport folder of the SDK samples rather than as a pip package.

Note

HikrobotCameraBase will look for MvCameraControl_class on sys.path first, then fall back to the default SDK sample locations (/opt/MVS/Samples/64/Python/MvImport on Linux and C:/Program Files (x86)/MVS/Development/Samples/Python/MvImport on Windows). If you installed the SDK somewhere else, set the MVS_PYTHON_PATH environment variable to your MvImport directory.

Warning

Use an unpacked pixel format (Mono8, Mono10, or Mono12) in your settings file. Packed formats (e.g. Mono12Packed) are not decoded by get_img.

Warning

This backend has not yet been tested against a physical Hikrobot camera. The MVS SDK call sequence is implemented from the SDK documentation/samples and should be verified on hardware before relying on it.


source

HikrobotCamera

 HikrobotCamera (serial_num:str=None)

*Core functionality for Hikrobot machine vision cameras (developed for the MV-CA013-21UM; not yet hardware-tested).

Any keyword-value pair arguments must match those avaliable in the settings file. HikrobotCamera expects the ones listed below:

  • binxy: number of pixels to bin in (x,y) direction
  • win_resolution: size of area on detector to readout (height, width)
  • win_offset: offsets (y,x) from edge of detector for a selective readout
  • exposure_ms: the camera exposure time to use
  • pixel_format: format of pixels readout from sensor, i.e. Mono8, Mono10, Mono12 (packed formats are not supported)*

source

HikrobotCameraBase

 HikrobotCameraBase (serial_num:str=None)

*Core functionality for Hikrobot machine vision cameras (developed for the MV-CA013-21UM; not yet hardware-tested).

Any keyword-value pair arguments must match those avaliable in the settings file. HikrobotCamera expects the ones listed below:

  • binxy: number of pixels to bin in (x,y) direction
  • win_resolution: size of area on detector to readout (height, width)
  • win_offset: offsets (y,x) from edge of detector for a selective readout
  • exposure_ms: the camera exposure time to use
  • pixel_format: format of pixels readout from sensor, i.e. Mono8, Mono10, Mono12 (packed formats are not supported)*
with HikrobotCamera(n_lines=128, exposure_ms=10, processing_lvl = -1,
                    cal_path="", json_path='../assets/cam_settings_hikrobot.json') as cam:
    cam.collect()

#fig = cam.show(robust=True)
#fig

Multiprocessing camera export

Export cameras using the SharedOpenHSI class.


source

SharedHikrobotCamera

 SharedHikrobotCamera (serial_num:str=None)

*Core functionality for Hikrobot machine vision cameras (developed for the MV-CA013-21UM; not yet hardware-tested).

Any keyword-value pair arguments must match those avaliable in the settings file. HikrobotCamera expects the ones listed below:

  • binxy: number of pixels to bin in (x,y) direction
  • win_resolution: size of area on detector to readout (height, width)
  • win_offset: offsets (y,x) from edge of detector for a selective readout
  • exposure_ms: the camera exposure time to use
  • pixel_format: format of pixels readout from sensor, i.e. Mono8, Mono10, Mono12 (packed formats are not supported)*