Similarity.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace bbiwarg.Recognition.Tracking
  7. {
  8. /// <summary>
  9. /// Encapsulates the similarity between a TrackedObject and a TrackableObject.
  10. /// </summary>
  11. /// <typeparam name="T">Type of the TrackableObject</typeparam>
  12. /// <typeparam name="TrackedT">Type of the TrackedObject</typeparam>
  13. public class Similarity<T, TrackedT>
  14. where T : TrackableObject
  15. where TrackedT : TrackedObject<T>
  16. {
  17. /// <summary>
  18. /// the tracked object
  19. /// </summary>
  20. public TrackedT TrackedObject { get; private set; }
  21. /// <summary>
  22. /// the detected object
  23. /// </summary>
  24. public T DetectedObject { get; private set; }
  25. /// <summary>
  26. /// the similarity value [0-1]
  27. /// </summary>
  28. public float Value { get; private set; }
  29. /// <summary>
  30. /// Initializes a new instance of the Similarity class.
  31. /// </summary>
  32. /// <param name="trackedObject">The tracked object.</param>
  33. /// <param name="detectedObject">The detected object.</param>
  34. /// <param name="value">The value.</param>
  35. public Similarity(TrackedT trackedObject, T detectedObject, float value)
  36. {
  37. TrackedObject = trackedObject;
  38. DetectedObject = detectedObject;
  39. Value = value;
  40. }
  41. }
  42. }