class documentation

The base class for defining background detect algorithms.

Method __init__ Initialise the algorithm settings.
Method background_data.setter Set the statistics for the background image.
Method image_is_sample Label the current image as either background or sample.
Method set_background Use the input image to update the background data.
Method settings.setter Undocumented
Property background_data The statistics of the background image.
Property settings The statistics of the background image.
Property status The status information needed for the GUI. Read only.
Instance Variable _background_data Undocumented
Instance Variable _settings Undocumented
def __init__(self): (source)

Initialise the algorithm settings.

def background_data(self, value: BaseModel | dict | None): (source)

Set the statistics for the background image.

This should be None, of no data is available. It can be set from either a dictionary or a base model of the type specified in self.background_data_model.

def image_is_sample(self, image: np.ndarray) -> tuple[bool, str]: (source)

Label the current image as either background or sample.

Returns
tuple[bool, str]A tuple of the result (boolean), and explanation string. The explanation string is formatted so it can be added into a sentence such as An action was taken because the image is {message}.
def set_background(self, image: np.ndarray) -> BaseModel: (source)

Use the input image to update the background data.

Background data must be a Pydantic BaseModel.

def settings(self, value: BaseModel | dict): (source)

Undocumented

@property
background_data: BaseModel | None = (source)

The statistics of the background image.

@property
settings: BaseModel = (source)

The statistics of the background image.

The status information needed for the GUI. Read only.

_background_data: BaseModel | None = (source)

Undocumented

_settings: BaseModel = (source)

Undocumented