mmcv.image.cutout¶
- mmcv.image.cutout(img: numpy.ndarray, shape: Union[int, Tuple[int, int]], pad_val: Union[int, float, tuple] = 0) → numpy.ndarray[源代码]¶
Randomly cut out a rectangle from the original img.
- 参数
img (ndarray) – Image to be cutout.
shape (int | tuple[int]) – Expected cutout shape (h, w). If given as a int, the value will be used for both h and w.
pad_val (int | float | tuple[int | float]) – Values to be filled in the cut area. Defaults to 0.
- 返回
The cutout image.
- 返回类型
ndarray