Shortcuts

mmpose.apis.webcam.utils.screen_matting

mmpose.apis.webcam.utils.screen_matting(img: numpy.ndarray, color_low: Optional[Tuple] = None, color_high: Optional[Tuple] = None, color: Optional[str] = None)numpy.ndarray[source]

Get screen matting mask.

Parameters
  • img (np.ndarray) – Image data.

  • color_low (tuple) – Lower limit (b, g, r).

  • color_high (tuple) – Higher limit (b, g, r).

  • color (str) –

    Support colors include:

    • ’green’ or ‘g’

    • ’blue’ or ‘b’

    • ’black’ or ‘k’

    • ’white’ or ‘w’

Returns

A mask with the same shape of the input image. The value is 0 at the pixels in the matting color range, and 1 everywhere else.

Return type

np.ndarray

Read the Docs v: 0.x
Versions
latest
1.x
v1.0.0rc1
v0.29.0
v0.28.0
dev-1.x
0.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.