/// <summary> /// Initialization of the pipeline used for realtime movement recognition based on the settings /// </summary> public void Init() { //Initializing the parameters that will not change between executions for all stages _acquisitionController = new AcquisitionController(); _windowMaker = new WindowMaker(); _featureExtractor = new FeatureExtractor(); _patternRecognition = new PatternRecognition(); _movementGenerator = new MovementGenerator(); _thresholdEngine = new ThresholdEngine(); _acquisitionController.isOnline = true; _acquisitionController.isMonitored = true; _windowMaker.isOnline = true; _featureExtractor.isOnline = true; _featureExtractor.isMonitored = false; _movementGenerator.nMovements = nMovements; _movementGenerator.numSingleMovements = numSingleMovements; _movementGenerator.allowedComplexMovements = allowedComplexMovements; _movementGenerator.objectServer = _objectServer; _movementGenerator.movementMetadata = movementMetadata; _thresholdEngine.enabled = true; _thresholdEngine.isOnline = true; }
//Initialisation operations such as reading configuration and setting up of resources public void Init() { _recordingController = new AcquisitionController(_acqPipeline); _recordingController.numSingleMovements = numSingleMovements; _recordingController.allowedComplexMovements = allowedComplexMovements; _recordingStage = new Recorder(recordedData); _recordingStage.PropertyChanged += _recordingStage_PropertyChanged; _thresholdEngine = new ThresholdEngine(); _thresholdEngine.recordingConfig = recordingConfig; _thresholdEngine.windowLength = 200; //We build and initialise the pipeline _acqPipeline.AddStage(_recordingController); _acqPipeline.AddStage(_thresholdEngine); _acqPipeline.AddStage(_recordingStage); }