Shortcuts

mmcv.image.impad_to_multiple

mmcv.image.impad_to_multiple(img: numpy.ndarray, divisor: int, pad_val: Union[float, List] = 0)numpy.ndarray[源代码]

Pad an image to ensure each edge to be multiple to some number.

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

  • divisor (int) – Padded image edges will be multiple to divisor.

  • pad_val (Number | Sequence[Number]) – Same as impad().

返回

The padded image.

返回类型

ndarray