Skip to content

types

Classes:

Attributes:

GenericMaskT module-attribute

GenericMaskT = Union[
    VideoNode,
    Callable[[VideoNode, VideoNode], VideoNode],
    EdgeDetectT,
    RidgeDetectT,
    GeneralMask,
    str,
]

Coordinates

Bases: list[int], CustomEnum

Methods:

Attributes:

CORNERS class-attribute instance-attribute

CORNERS = [1, 0, 1, 0, 0, 1, 0, 1]

DIAMOND class-attribute instance-attribute

DIAMOND = [0, 1, 0, 1, 1, 0, 1, 0]

HORIZONTAL class-attribute instance-attribute

HORIZONTAL = [0, 0, 0, 1, 1, 0, 0, 0]

RECTANGLE class-attribute instance-attribute

RECTANGLE = [1, 1, 1, 1, 1, 1, 1, 1]

VERTICAL class-attribute instance-attribute

VERTICAL = [0, 1, 0, 0, 0, 0, 1, 0]

from_iter classmethod

from_iter(iter: int) -> Coordinates
Source code
38
39
40
@classmethod
def from_iter(cls, iter: int) -> Coordinates:
    return cls.DIAMOND if (iter % 3) != 1 else cls.RECTANGLE

from_xxpand_mode classmethod

from_xxpand_mode(xxpand_mode: XxpandMode, iter: int = 1) -> Coordinates
Source code
42
43
44
45
46
47
@classmethod
def from_xxpand_mode(cls, xxpand_mode: XxpandMode, iter: int = 1) -> Coordinates:
    if xxpand_mode == XxpandMode.LOSANGE or (xxpand_mode is XxpandMode.ELLIPSE and iter % 3 != 1):
        return cls.DIAMOND

    return cls.RECTANGLE

XxpandMode

Bases: CustomEnum

Expand/inpand mode

Attributes:

ELLIPSE class-attribute instance-attribute

ELLIPSE = object()

Elliptical shape

LOSANGE class-attribute instance-attribute

LOSANGE = object()

Diamond shape

RECTANGLE class-attribute instance-attribute

RECTANGLE = object()

Rectangular shape