Models

These are models that are used as return-types for functions.

FilterSettings

class autocv.models.filter_settings.FilterSettings(h_min: int = 0, h_max: int = 179, s_min: int = 0, s_max: int = 255, v_min: int = 0, v_max: int = 255, s_add: int = 0, s_subtract: int = 0, v_add: int = 0, v_subtract: int = 0, canny_threshold1: int = 0, canny_threshold2: int = 0, erode_kernel_size: int = 0, dilate_kernel_size: int = 0)[source]

Persist HSV, Canny, and morphology parameters for image filtering.

h_min

Minimum hue value. Defaults to 0.

Type:

int

h_max

Maximum hue value. Defaults to 179.

Type:

int

s_min

Minimum saturation value. Defaults to 0.

Type:

int

s_max

Maximum saturation value. Defaults to 255.

Type:

int

v_min

Minimum value (brightness). Defaults to 0.

Type:

int

v_max

Maximum value (brightness). Defaults to 255.

Type:

int

s_add

Amount added to saturation during adjustment. Defaults to 0.

Type:

int

s_subtract

Amount subtracted from saturation during adjustment. Defaults to 0.

Type:

int

v_add

Amount added to brightness during adjustment. Defaults to 0.

Type:

int

v_subtract

Amount subtracted from brightness during adjustment. Defaults to 0.

Type:

int

canny_threshold1

Lower threshold used in Canny edge detection. Defaults to 0.

Type:

int

canny_threshold2

Upper threshold used in Canny edge detection. Defaults to 0.

Type:

int

erode_kernel_size

Kernel size used for erosion passes. Defaults to 0.

Type:

int

dilate_kernel_size

Kernel size used for dilation passes. Defaults to 0.

Type:

int

Exceptions

Exception classes used across AutoCV.

These lightweight subclasses communicate invalid state encountered while validating window handles, image buffers, or sequence lengths.

exception autocv.models.exceptions.InvalidHandleError(hwnd: int)[source]

Raised when a window handle is missing or otherwise unusable.

hwnd

Handle value that failed validation.

exception autocv.models.exceptions.InvalidImageError[source]

Raised when an OpenCV image buffer is empty or unset.

exception autocv.models.exceptions.InvalidLengthError(expected: int, received: int)[source]

Raised when iterable length mismatches the expected size.

expected

Target number of items required by the caller.

received

Number of items supplied by the caller.