public WaveDetector() { this._rightHandHistory = new ScenarioStateHistory(30,0); this._leftHandHistory = new ScenarioStateHistory(30,0); reset_extremes("right"); reset_extremes("left"); }
private Boolean isWaveDetected(ScenarioStateHistory history) { List<ScenarioState> recentStates = history.getLastNStates(4); if (recentStates.Count == 4) { //Console.WriteLine("\t RS 0: " + recentStates[0].ToString() + ", RS 1: " + recentStates[1].ToString() + ", RS 2: " + recentStates[2].ToString()); } double wave_duration = 0; for (int i = 0; i < recentStates.Count; i++) { wave_duration += recentStates[i].getDurationInMilliseconds(); } if (wave_duration < MAX_WAVE_DURATION && recentStates.Count >= 4 ) { if (WaveState.HAND_RIGHT.isSameState(recentStates[0]) && WaveState.HAND_LEFT.isSameState(recentStates[1]) && WaveState.HAND_RIGHT.isSameState(recentStates[2]) && WaveState.HAND_LEFT.isSameState(recentStates[3])) { return true; } else if (WaveState.HAND_LEFT.isSameState(recentStates[0]) && WaveState.HAND_RIGHT.isSameState(recentStates[1]) && WaveState.HAND_LEFT.isSameState(recentStates[2]) && WaveState.HAND_RIGHT.isSameState(recentStates[3])) { return true; } else { return false; } } else { return false; } }
public PullDownScreenDetector() { this._rightHandHistory = new ScenarioStateHistory(30); pullInitiated = false; startX = -1; startY = -1; allowanceX = 1000; endY = -1; }
public VolumeDetector() { this._rightHandHistory = new ScenarioStateHistory(30,0); this._leftHandHistory = new ScenarioStateHistory(30,0); rh_adjustInitiated = false; lh_adjustInitiated = false; rh_start = new Point3D(-1, -1, -1); lh_start = new Point3D(-1, -1, -1); rh_last = new Point3D(-1, -1, -1); lh_last = new Point3D(-1, -1, -1); rh_deltaY = 0; lh_deltaY = 0; }
//protected ResumeIndicator _lefthandResumeIndicator = new ResumeIndicator(); public MuteDetector() { this._rightHandHistory = new ScenarioStateHistory(30); //this._leftHandHistory = new ScenarioStateHistory(30); }
public PresenceDetector() { this._history = new ScenarioStateHistory(30); }
public ResumeDetector() { this._rightHandHistory = new ScenarioStateHistory(30); this._leftHandHistory = new ScenarioStateHistory(30); }