daft.functions.crop#
crop #
crop(image: Expression, bbox: tuple[int, int, int, int] | Expression) -> Expression
Crops images with the provided bounding box.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image | Image Expression | to crop. | required |
bbox | tuple[int, int, int, int] | List Expression | Either a tuple of (x, y, width, height) parameters for cropping, or a List Expression where each element is a length 4 List which represents the bounding box for the crop | required |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Image Expression | An expression representing the cropped image |
Source code in daft/functions/image.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |