Similarity.cs 1.3 KB

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