BOWTrainer.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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/features2d.hpp"
  8. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. @class Mat;
  13. NS_ASSUME_NONNULL_BEGIN
  14. // C++: class BOWTrainer
  15. /**
  16. * Abstract base class for training the *bag of visual words* vocabulary from a set of descriptors.
  17. *
  18. * For details, see, for example, *Visual Categorization with Bags of Keypoints* by Gabriella Csurka,
  19. * Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :
  20. *
  21. * Member of `Features2d`
  22. */
  23. CV_EXPORTS @interface BOWTrainer : NSObject
  24. #ifdef __cplusplus
  25. @property(readonly)cv::Ptr<cv::BOWTrainer> nativePtr;
  26. #endif
  27. #ifdef __cplusplus
  28. - (instancetype)initWithNativePtr:(cv::Ptr<cv::BOWTrainer>)nativePtr;
  29. + (instancetype)fromNative:(cv::Ptr<cv::BOWTrainer>)nativePtr;
  30. #endif
  31. #pragma mark - Methods
  32. //
  33. // void cv::BOWTrainer::add(Mat descriptors)
  34. //
  35. /**
  36. * Adds descriptors to a training set.
  37. *
  38. * @param descriptors Descriptors to add to a training set. Each row of the descriptors matrix is a
  39. * descriptor.
  40. *
  41. * The training set is clustered using clustermethod to construct the vocabulary.
  42. */
  43. - (void)add:(Mat*)descriptors NS_SWIFT_NAME(add(descriptors:));
  44. //
  45. // vector_Mat cv::BOWTrainer::getDescriptors()
  46. //
  47. /**
  48. * Returns a training set of descriptors.
  49. */
  50. - (NSArray<Mat*>*)getDescriptors NS_SWIFT_NAME(getDescriptors());
  51. //
  52. // int cv::BOWTrainer::descriptorsCount()
  53. //
  54. /**
  55. * Returns the count of all descriptors stored in the training set.
  56. */
  57. - (int)descriptorsCount NS_SWIFT_NAME(descriptorsCount());
  58. //
  59. // void cv::BOWTrainer::clear()
  60. //
  61. - (void)clear NS_SWIFT_NAME(clear());
  62. //
  63. // Mat cv::BOWTrainer::cluster()
  64. //
  65. - (Mat*)cluster NS_SWIFT_NAME(cluster());
  66. //
  67. // Mat cv::BOWTrainer::cluster(Mat descriptors)
  68. //
  69. /**
  70. * Clusters train descriptors.
  71. *
  72. * @param descriptors Descriptors to cluster. Each row of the descriptors matrix is a descriptor.
  73. * Descriptors are not added to the inner train descriptor set.
  74. *
  75. * The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first
  76. * variant of the method, train descriptors stored in the object are clustered. In the second variant,
  77. * input descriptors are clustered.
  78. */
  79. - (Mat*)cluster:(Mat*)descriptors NS_SWIFT_NAME(cluster(descriptors:));
  80. @end
  81. NS_ASSUME_NONNULL_END