Shortcuts

mmocr.utils.bezier2polygon

mmocr.utils.bezier2polygon(bezier_points, num_sample=20)[源代码]

Sample points from the boundary of a polygon enclosed by two Bezier curves, which are controlled by bezier_points.

参数
  • bezier_points (ndarray) – A \((2, 4, 2)\) array of 8 Bezeir points or its equalivance. The first 4 points control the curve at one side and the last four control the other side.

  • num_sample (int) – The number of sample points at each Bezeir curve. Defaults to 20.

返回

A list of 2*num_sample points representing the polygon extracted from Bezier curves.

返回类型

list[ndarray]

警告

The points are not guaranteed to be ordered. Please use mmocr.utils.sort_points() to sort points if necessary.

Read the Docs v: latest
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.