KeypointsModel.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/dnn.hpp"
  8. #import "opencv2/dnn/dnn.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "Model.h"
  14. @class Mat;
  15. @class Net;
  16. @class Point2f;
  17. NS_ASSUME_NONNULL_BEGIN
  18. // C++: class KeypointsModel
  19. /**
  20. * This class represents high-level API for keypoints models
  21. *
  22. * KeypointsModel allows to set params for preprocessing input image.
  23. * KeypointsModel creates net from file with trained weights and config,
  24. * sets preprocessing input, runs forward pass and returns the x and y coordinates of each detected keypoint
  25. *
  26. * Member of `Dnn`
  27. */
  28. CV_EXPORTS @interface KeypointsModel : Model
  29. #ifdef __cplusplus
  30. @property(readonly)cv::Ptr<cv::dnn::KeypointsModel> nativePtrKeypointsModel;
  31. #endif
  32. #ifdef __cplusplus
  33. - (instancetype)initWithNativePtr:(cv::Ptr<cv::dnn::KeypointsModel>)nativePtr;
  34. + (instancetype)fromNative:(cv::Ptr<cv::dnn::KeypointsModel>)nativePtr;
  35. #endif
  36. #pragma mark - Methods
  37. //
  38. // cv::dnn::KeypointsModel::KeypointsModel(String model, String config = "")
  39. //
  40. /**
  41. * Create keypoints model from network represented in one of the supported formats.
  42. * An order of @p model and @p config arguments does not matter.
  43. * @param model Binary file contains trained weights.
  44. * @param config Text file contains network configuration.
  45. */
  46. - (instancetype)initWithModel:(NSString*)model config:(NSString*)config;
  47. /**
  48. * Create keypoints model from network represented in one of the supported formats.
  49. * An order of @p model and @p config arguments does not matter.
  50. * @param model Binary file contains trained weights.
  51. */
  52. - (instancetype)initWithModel:(NSString*)model;
  53. //
  54. // cv::dnn::KeypointsModel::KeypointsModel(Net network)
  55. //
  56. /**
  57. * Create model from deep learning network.
  58. * @param network Net object.
  59. */
  60. - (instancetype)initWithNetwork:(Net*)network;
  61. //
  62. // vector_Point2f cv::dnn::KeypointsModel::estimate(Mat frame, float thresh = 0.5)
  63. //
  64. /**
  65. * Given the @p input frame, create input blob, run net
  66. * @param thresh minimum confidence threshold to select a keypoint
  67. * @return a vector holding the x and y coordinates of each detected keypoint
  68. *
  69. */
  70. - (NSArray<Point2f*>*)estimate:(Mat*)frame thresh:(float)thresh NS_SWIFT_NAME(estimate(frame:thresh:));
  71. /**
  72. * Given the @p input frame, create input blob, run net
  73. * @return a vector holding the x and y coordinates of each detected keypoint
  74. *
  75. */
  76. - (NSArray<Point2f*>*)estimate:(Mat*)frame NS_SWIFT_NAME(estimate(frame:));
  77. @end
  78. NS_ASSUME_NONNULL_END