/// initializer. called after LoadFromFile is called public void Init(JointFeature pf) { if (m_posts == null) { throw new Exception("the PostureDetector members should be initialized first."); } m_postFeature = pf; m_fsm = new FSM(PostureCount, m_intervals, m_intvThres); m_fsm.m_thresMul = m_thresMulTimeIntv; m_isPostDet = new bool[PostureCount]; m_postFeature.RegisterJoints(m_jointIdx); // more initialization for the relative joint matcher for (int i = 0; i < PostureCount; i++) { for (int j = 0; j < m_posts[i].JointCount; j++) { m_posts[i][j].m_thresMul = m_thresMulPerPost[i] * m_thresMulPerJoint[j]; JointMatcherR jmr = m_posts[i][j] as JointMatcherR; if (jmr != null) { jmr.SetLastPostJoint(this, i, j); } } m_posts[i].Init(pf); // should be called after m_posts[i][j].m_thresMul is initialized } }
/// Use this for initialization public void Start() { Pause = false; UseRealtimeData = true; m_postFeature = new JointFeature(m_skReader.m_jointData); int loaded = LoadGestureTemplates(); Debug.Log(string.Format("{0} gesture templates loaded.", loaded)); }
// called in GestureDetector::Init // the initialization of public members should be done by deserialzation of .xml files or externally+manually public void Init(JointFeature pf) { if (m_jointMatcher == null) { throw new Exception("the JointMatcher members should be initialized first."); } m_jointScores = new float[JointCount]; for (int i = 0; i < JointCount; i++) { m_jointMatcher[i].Init(pf); } }
public TemplateTrainer(SkeletonRecorder skRecorder, JointFeature pf) { m_skRecorder = skRecorder; m_postFeature = pf; }
public UITemplateTrainer(SkeletonRecorder skRecorder, JointFeature postFeature) { m_skRecorder = skRecorder; m_tpTrainer = new TemplateTrainer(skRecorder, postFeature); }
// called in PostureDetector::Init // the initialization of public members should be done by deserialzation of .xml files or externally+manually public void Init(JointFeature pf) { m_jointFt = pf.m_jointVec; m_realThres = m_thresMul * m_templateThreshold; }