crop_filter¶
Demo-filter strategy
CropFilterContent
¶
Bases: AttrDict
Return model for CropImageFilter
.
Source code in oteapi/strategies/filter/crop_filter.py
39 40 41 42 43 44 |
|
imagecrop: tuple[int, int, int, int] = Field(..., description='Box cropping parameters (left, top, right, bottom).')
class-attribute
instance-attribute
¶
CropImageConfig
¶
Bases: AttrDict
Configuration model for crop data.
Source code in oteapi/strategies/filter/crop_filter.py
19 20 21 22 23 24 |
|
crop: Optional[tuple[int, int, int, int]] = Field(None, description='Box cropping parameters (left, top, right, bottom).')
class-attribute
instance-attribute
¶
CropImageFilter
¶
Strategy for cropping an image.
Registers strategies:
("filterType", "filter/crop")
Source code in oteapi/strategies/filter/crop_filter.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
filter_config: CropImageFilterConfig
instance-attribute
¶
get()
¶
Execute strategy and return a dictionary
Source code in oteapi/strategies/filter/crop_filter.py
68 69 70 |
|
initialize()
¶
Initialize strategy and return a dictionary.
Source code in oteapi/strategies/filter/crop_filter.py
59 60 61 62 63 64 65 66 |
|
CropImageFilterConfig
¶
Bases: FilterConfig
Crop filter strategy filter config.
Source code in oteapi/strategies/filter/crop_filter.py
27 28 29 30 31 32 33 34 35 36 |
|