AFL.automation.instrument.RGBCamera#

Functions

canny(image[, sigma, low_threshold, ...])

Edge filter an image using the Canny algorithm.

hough_circle(image, radius[, normalize, ...])

Perform a circular Hough transform.

hough_circle_peaks(hspaces, radii[, ...])

Return peaks in a circle Hough transform.

img_as_ubyte(image[, force_copy])

Convert an image to 8-bit unsigned integer format.

rgb2gray(rgb, *[, channel_axis])

Compute luminance of an RGB image.

Classes

Driver(name[, defaults, overrides, ...])

RGBCamera([overrides])

Driver for capturing RGB images and computing average RGB values.

class AFL.automation.instrument.RGBCamera.RGBCamera(overrides=None)[source]#

Driver for capturing RGB images and computing average RGB values.

This driver interfaces with a USB camera to capture images and extract the average RGB values along with image metadata.

defaults = {'camera_index': 0, 'hough_radii': 40, 'px_crop': [220, 350], 'py_crop': [120, 250], 'save_path': '/home/afl642/rgb_images/'}#
__init__(overrides=None)[source]#

Initialize RGBCamera driver.

Parameters:

overrides (dict, optional) – Configuration overrides for PersistentConfig.

capture_rgb(name='', plotting=False, **kwargs)[source]#

Capture an image and compute average RGB values.

Parameters:
  • name (str, optional) – Name/identifier for the measurement.

  • plotting (bool, optional) – If True, save diagnostic plots of the captured image.

  • **kwargs (dict) – Additional arguments passed to image collection.

Returns:

Dataset with average RGB values, image, and metadata.

Return type:

xarray.Dataset