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