Shortcuts

mmocr.utils.warp_img

mmocr.utils.warp_img(src_img, box, jitter=False, jitter_ratio_x=0.5, jitter_ratio_y=0.1)[源代码]

Crop box area from image using opencv warpPerspective.

参数
  • src_img (np.array) – Image before cropping.

  • box (list[float | int]) – Coordinates of quadrangle.

  • jitter (bool) – Whether to jitter the box.

  • jitter_ratio_x (float) – Horizontal jitter ratio relative to the height.

  • jitter_ratio_y (float) – Vertical jitter ratio relative to the height.

返回

The warped image.

返回类型

np.array

Read the Docs v: dev-1.x
Versions
latest
stable
0.x
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.