phenotypic.abc_.DetectionMode#
- class phenotypic.abc_.DetectionMode[source]
Bases:
ABCBase class for detection matrix source modes.
Subclasses define how the detection matrix is computed from raw image data (grayscale, individual RGB channels, etc.).
Methods
__init__Return a fresh detection matrix from image.
Attributes
Short identifier used in
detect_modestrings.Whether this mode needs RGB data to compute.
- abstract property name: str
Short identifier used in
detect_modestrings.
- abstract property requires_rgb: bool
Whether this mode needs RGB data to compute.
- abstract compute(image: Image) np.ndarray[source]
Return a fresh detection matrix from image.
- Parameters:
image (Image) – The
Imageinstance to compute from.- Returns:
A 2-D float32 array normalised to [0, 1].
- Return type:
np.ndarray