Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 753 Bytes

CenterCrop_cn.rst

File metadata and controls

30 lines (19 loc) · 753 Bytes

CenterCrop

对输入图像进行裁剪,保持图片中心点不变。

参数

  • size (inttuple) - 输出图像的形状大小。
  • keys (list[str]|tuple[str],可选) - 与 BaseTransform 定义一致。默认值:None。

形状

  • img (PIL.ImagePaddle.Tensor) - 输入的图像数据,数据格式为'HWC'。
  • output (PIL.ImagePaddle.Tensor) - 返回裁剪后的图像数据。

返回

计算 CenterCrop 的可调用对象。

代码示例

COPY-FROM: paddle.vision.transforms.CenterCrop