You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.6 KiB

1 year ago
  1. #pragma once
  2. #include <fsdk/IObject.h>
  3. #include <fsdk/FSDKError.h>
  4. #include <fsdk/Optional.h>
  5. #include <fsdk/Types.h>
  6. namespace fsdk {
  7. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  8. DECLARE_SMARTPTR(IAGSEstimator);
  9. #endif
  10. /**
  11. * @brief Approximate Garbage Score estimator interface.
  12. * @note This estimator is designed to work with Image and Detection;
  13. * */
  14. struct IAGSEstimator : IRefCounted {
  15. /**
  16. * @brief Estimate the ags.
  17. * @param [in] image source image.
  18. * @param [in] detection detection coordinates in image space.
  19. * @return ResultValue with error code and score of estimation.
  20. * @see Image, Detection, ResultValue, FSDKError for details.
  21. * @note image format must be R8G8B8, @see Format.
  22. * */
  23. virtual ResultValue<FSDKError, float>
  24. FSDK_DEPRECATED("AGSEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
  25. estimate(
  26. const Image& image,
  27. const Detection& detection) const noexcept = 0;
  28. /**
  29. * @brief Estimate ags of multiple frames in a single estimate function call.
  30. * @param [in] images span of source images.
  31. * @param [in] detections span of detection coordinates in corresponding source images space.
  32. * @param [out] out output span of scores for each image.
  33. * @return Result with error code.
  34. * @see Span, Image, Detection, Result, FSDKError for details.
  35. * @note images format must be R8G8B8, @see Format.
  36. * @note all spans should be based on user owned continuous collections.
  37. * @note all spans should be equal size.
  38. * */
  39. virtual Result<FSDKError>
  40. FSDK_DEPRECATED("AGSEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
  41. estimate(
  42. Span<const Image> images,
  43. Span<const Detection> detections,
  44. Span<float> out) const noexcept = 0;
  45. /**
  46. * @brief Validate input of multiple frames in a single function call.
  47. * @param [in] images span of source images.
  48. * @param [in] detections span of detection coordinates in corresponding source images space.
  49. * @param [out] errors output span of errors for each image.
  50. * @return Result with error code.
  51. * @see Span, Image, Detection, Result, FSDKError for details.
  52. * @note images format must be R8G8B8, @see Format.
  53. * @note all spans should be based on user owned continuous collections.
  54. * @note all spans should be equal size.
  55. * */
  56. virtual Result<FSDKError>
  57. FSDK_DEPRECATED("AGSEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
  58. validate(
  59. Span<const Image> images,
  60. Span<const Detection> detections,
  61. Span<Result<FSDKError>> errors) const noexcept = 0;
  62. };
  63. } // namespace fsdk