Shortcuts

mmpose.apis.webcam.nodes.MonitorNode

class mmpose.apis.webcam.nodes.MonitorNode(name: str, input_buffer: str, output_buffer: Union[str, List[str]], enable_key: Optional[Union[str, int]] = None, enable: bool = False, x_offset=20, y_offset=20, y_delta=15, text_color='black', background_color=(255, 183, 0), text_scale=0.4, ignore_items: Optional[List[str]] = None)[源代码]

Show diagnostic information.

参数
  • name (str) – The node name (also thread name)

  • input_buffer (str) – The name of the input buffer

  • output_buffer (str|list) – The name(s) of the output buffer(s)

  • enable_key (str|int, optional) – Set a hot-key to toggle enable/disable of the node. If an int value is given, it will be treated as an ascii code of a key. Please note: (1) If enable_key is set, the bypass() method need to be overridden to define the node behavior when disabled; (2) Some hot-keys are reserved for particular use. For example: ‘q’, ‘Q’ and 27 are used for exiting. Default: None

  • enable (bool) – Default enable/disable status. Default: True

  • x_offset (int) – The position of the text box’s left border in pixels. Default: 20

  • y_offset (int) – The position of the text box’s top border in pixels. Default: 20

  • y_delta (int) – The line height in pixels. Default: 15

  • text_color (str|tuple) – The font color represented in a color name or a BGR tuple. Default: 'black'

  • backbround_color (str|tuple) – The background color represented in a color name or a BGR tuple. Default: (255, 183, 0)

  • text_scale (float) – The font scale factor that is multiplied by the base size. Default: 0.4

  • ignore_items (list[str], optional) – Specify the node information items that will not be shown. See MonitorNode._default_ignore_items for the default setting.

Example::
>>> cfg = dict(
...     type='MonitorNode',
...     name='monitor',
...     enable_key='m',
...     enable=False,
...     input_buffer='vis_notice',
...     output_buffer='display')
>>> from mmpose.apis.webcam.nodes import NODES
>>> node = NODES.build(cfg)
Read the Docs v: latest
Versions
latest
1.x
v1.0.0rc0
v0.29.0
v0.28.0
v0.27.0
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.