Shortcuts

mmcv.image.imnormalize

mmcv.image.imnormalize(img, mean, std, to_rgb=True)[源代码]

Normalize an image with mean and std.

参数
  • img (ndarray) – Image to be normalized.

  • mean (ndarray) – The mean to be used for normalize.

  • std (ndarray) – The std to be used for normalize.

  • to_rgb (bool) – Whether to convert to rgb.

返回

The normalized image.

返回类型

ndarray