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]

Stores settings for image processing filters.

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 to add to the saturation value. Defaults to 0.

Type:

int

s_subtract

Amount to subtract from the saturation value. Defaults to 0.

Type:

int

v_add

Amount to add to the value (brightness). Defaults to 0.

Type:

int

v_subtract

Amount to subtract from the value (brightness). Defaults to 0.

Type:

int

canny_threshold1

First threshold for the Canny edge detection algorithm. Defaults to 0.

Type:

int

canny_threshold2

Second threshold for the Canny edge detection algorithm. Defaults to 0.

Type:

int

erode_kernel_size

Kernel size for the erosion filter. Defaults to 0.

Type:

int

dilate_kernel_size

Kernel size for the dilation filter. Defaults to 0.

Type:

int

Exceptions

Module to define custom exceptions for the AutoCV project.

This module provides custom exception classes to indicate specific errors that can occur in the application, such as invalid handles, images, or lengths.

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

Exception raised when an invalid window handle is encountered.

hwnd

The invalid handle that caused the exception.

Type:

int

exception autocv.models.exceptions.InvalidImageError[source]

Exception raised when an invalid image is encountered.

This exception typically indicates that an image has not been captured or refreshed properly.

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

Exception raised when the length of an input does not meet the expected value.

expected

The expected length.

Type:

int

received

The length that was received.

Type:

int