<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/vision/ops/preprocess_ops_3d.py#L223-L304) |

Crops the image sequence of images.

    tfm.vision.preprocess_ops_3d.crop_image(
        frames: tf.Tensor,
        target_height: int,
        target_width: int,
        random: bool = False,
        num_crops: int = 1,
        seed: Optional[int] = None
    ) -> tf.Tensor

If requested size is bigger than image size, image is padded with 0. If not
random cropping, a central crop is performed if num_crops is 1.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `frames` | A Tensor of dimension \[timesteps, in_height, in_width, channels\]. |
| `target_height` | Target cropped image height. |
| `target_width` | Target cropped image width. |
| `random` | A boolean indicating if crop should be randomized. |
| `num_crops` | Number of crops (support 1 for central crop and 3 for 3-crop). |
| `seed` | A deterministic seed to use when random cropping. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A Tensor of shape \[timesteps, out_height, out_width, channels\] of type uint8 with the cropped images. ||

<br />