Shortcuts

mmocr.utils.crop_polygon

mmocr.utils.crop_polygon(polygon, crop_box)[源代码]

Crop polygon to be within a box region.

参数
  • polygon (ndarray) – polygon in shape (N, ).

  • crop_box (ndarray) – target box region in shape (4, ).

返回

Cropped polygon. If the polygon is not within the

crop box, return None.

返回类型

np.array or None

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.