HandTracker.cs 756 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using bbiwarg.Recognition.Tracking;
  7. namespace bbiwarg.Recognition.HandRecognition
  8. {
  9. class HandTracker : Tracker<Hand, TrackedHand>
  10. {
  11. public List<Hand> Hands { get { return getCurrentObjectsWithState(TrackingState.Tracked); } }
  12. public HandTracker()
  13. : base(Constants.HandTrackerMinSimilarity)
  14. {
  15. }
  16. protected override TrackedHand createTrackedObject(Hand detectedObject)
  17. {
  18. return new TrackedHand(idPool.getNextUnusedID(), detectedObject, Constants.HandTrackerNumFramesDetectedUntilTracked, Constants.HandTrackerNumFramesLostUntilDeleted);
  19. }
  20. }
  21. }