mmcv.image.imshear¶
- mmcv.image.imshear(img: numpy.ndarray, magnitude: Union[int, float], direction: str = 'horizontal', border_value: Union[int, Tuple[int, int]] = 0, interpolation: str = 'bilinear') → numpy.ndarray[源代码]¶
Shear an image.
- 参数
img (ndarray) – Image to be sheared with format (h, w) or (h, w, c).
magnitude (int | float) – The magnitude used for shear.
direction (str) – The flip direction, either “horizontal” or “vertical”.
border_value (int | tuple[int]) – Value used in case of a constant border.
interpolation (str) – Same as
resize()
.
- 返回
The sheared image.
- 返回类型
ndarray