tfm.vision.preprocess_ops_3d.crop_image

Crops the image sequence of images.

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.

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.

A Tensor of shape [timesteps, out_height, out_width, channels] of type uint8 with the cropped images.