dodal.devices.oav.pin_image_recognition.utils.MxSampleDetect#

class dodal.devices.oav.pin_image_recognition.utils.MxSampleDetect[source]#

Configures sample detection parameters.

Parameters:
  • preprocess (Callable) – A preprocessing function applied to the array after conversion to grayscale. See implementations of common functions above for predefined conversions. Defaults to a no-op (i.e. no preprocessing).

  • operations (for open and close) – https://docs.opencv.org/4.x/d9/d61/tutorial_py_morphological_ops.html

  • read (please) – https://docs.opencv.org/4.x/d9/d61/tutorial_py_morphological_ops.html

  • open_ksize (int, optional) – Kernel size for “open” operation, if set to zero then ignore “open” operation.

  • open_iterations (int, optional) – Number of iterations for “open” operation.

  • canny_upper (int, optional) – Upper threshold for canny edge detection.

  • canny_lower (int, optional) – Lower threshold for canny edge detection.

  • close_ksize (int, optional) – Kernel size for “close” operation.

  • close_iterations (int, optional) – Number of iterations for “close” operation.

  • scan_direction (ScanDirections, optional) – ScanDirections.FORWARD for left-to-right, ScanDirections.REVERSE for right-to-left.

  • min_tip_height (int, optional) – Minimum height of pin tip.

Methods

process_array(arr)