コード例 #1
0
        /// <summary>
        /// Initialize this joint predictor.
        /// </summary>
        /// <param name="modelFileName">The file name of the neural network model</param>
        /// <param name="handTemplate">The hand template associated with this predictor</param>
        public JointPredictor(string modelFileName, HandTemplate handTemplate)
        {
            model             = new NeuralNetwork(modelFileName);
            this.handTemplate = handTemplate;

            features          = new List <string>();
            featureComponents = new List <Vector3>();
        }
コード例 #2
0
 public MovingAverageOcclusionPredictor(int windowSize, HandTemplate handTemplate)
 {
     speeds = new Dictionary <string, Queue <Vector3> >();
     foreach (var marker in handTemplate.MarkerList)
     {
         speeds[marker] = new Queue <Vector3>(windowSize);
     }
     this.windowSize = windowSize;
 }
コード例 #3
0
        /// <summary>
        /// Initialize this predictor.
        /// </summary>
        /// <param name="modelFileName">The file name of the neural network model to import.</param>
        /// <param name="handTemplate">The hand template to use with this predictor.</param>
        /// <param name="useOffset">Use offset to correct occlusion discontinuities (default: true).</param>
        /// <param name="smoothing">Use offset to correct re-entry discontinuities (default: true).</param>
        public NeuralOcclusionPredictor(string modelFileName, HandTemplate handTemplate, bool useOffset = true, bool smoothing = true)
        {
            model             = new NeuralNetwork(modelFileName);
            this.handTemplate = handTemplate;

            offsets = new Dictionary <string, Vector3>();
            foreach (var marker in handTemplate.MarkerList)
            {
                offsets[marker] = Vector3.zero;
            }

            this.useOffset = useOffset;
            this.smoothing = smoothing;
        }