motioninput_api
Module contents
Author: Carmen Meinson
- class MotionInputAPI
Bases:
object
- classmethod calibrate_module(name: str) None
Calls the calibration method on the specified module
- Parameters
name (str) – name of the module (“hand”/”speech”/”body”/”head”/”eye”)
- classmethod init_modules(names: Set[str]) None
Calls the pre initialization method on all given modules. This performs all of the time consuming setup of the Module before initialization. If is not called then all the setup is done when the Modules are first initialized.
- Parameters
names (Set[str]) – set of module names (“hand”/”speech”/”body”/”head”/”eye”)
- classmethod start() None
Starts an instance of the MI model
- Raises
RuntimeError – error raised if an instance of MI is already running
- classmethod stop() None
Stops the currently running MI model
- Raises
RuntimeError – error raised if MI is not running
- classmethod run() None
- classmethod show_view() None
If the view is hidden, shows the view (the openCV window with the camera image)
- classmethod hide_view() None
If the view is shown, hides the view (the openCV window with the camera image)
- classmethod change_mode(mode: Optional[str] = None) None
set the interaction mode that the model will be set to from the next frame. If no mode is indicated the next mode is set according to the iteration_order, provided
- Parameters
mode (Optional[str], optional) – name of the mode, defaults to None
- classmethod get_state() bool
Returns if there is an instance of the MI model running
- classmethod get_config_editor() scripts.tools.json_editors.config_editor.ConfigEditor
- classmethod get_mode_editor() scripts.tools.json_editors.mode_editor.ModeEditor
- classmethod get_gestures_editor() scripts.tools.json_editors.gesture_editor.GestureEditor
- classmethod get_events_editor() scripts.tools.json_editors.event_editor.EventEditor