Shortcuts

mmocr.utils.fill_hole

mmocr.utils.fill_hole(input_mask)[源代码]

Fill holes in matrix.

Input:
[[0, 0, 0, 0, 0, 0, 0],

[0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]

Output:
[[0, 0, 0, 0, 0, 0, 0],

[0, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]

参数

input_mask (ArrayLike) – The input mask.

返回

The output mask that has been filled.

返回类型

np.array

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.