Xfeatures2d.h 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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/xfeatures2d.hpp"
  8. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. @class DMatch;
  13. @class IntVector;
  14. @class KeyPoint;
  15. @class Size2i;
  16. // C++: enum KeypointLayout (cv.cuda.SURF_CUDA.KeypointLayout)
  17. typedef NS_ENUM(int, KeypointLayout) {
  18. SURF_CUDA_X_ROW NS_SWIFT_NAME(X_ROW) = 0,
  19. SURF_CUDA_Y_ROW NS_SWIFT_NAME(Y_ROW) = 0+1,
  20. SURF_CUDA_LAPLACIAN_ROW NS_SWIFT_NAME(LAPLACIAN_ROW) = 0+2,
  21. SURF_CUDA_OCTAVE_ROW NS_SWIFT_NAME(OCTAVE_ROW) = 0+3,
  22. SURF_CUDA_SIZE_ROW NS_SWIFT_NAME(SIZE_ROW) = 0+4,
  23. SURF_CUDA_ANGLE_ROW NS_SWIFT_NAME(ANGLE_ROW) = 0+5,
  24. SURF_CUDA_HESSIAN_ROW NS_SWIFT_NAME(HESSIAN_ROW) = 0+6,
  25. SURF_CUDA_ROWS_COUNT NS_SWIFT_NAME(ROWS_COUNT) = 0+7
  26. };
  27. NS_ASSUME_NONNULL_BEGIN
  28. // C++: class Xfeatures2d
  29. /**
  30. * The Xfeatures2d module
  31. *
  32. * Member classes: `FREAK`, `StarDetector`, `BriefDescriptorExtractor`, `LUCID`, `LATCH`, `BEBLID`, `TEBLID`, `DAISY`, `MSDDetector`, `VGG`, `BoostDesc`, `PCTSignatures`, `PCTSignaturesSQFD`, `HarrisLaplaceFeatureDetector`, `AffineFeature2D`, `TBMR`, `SURF`
  33. *
  34. * Member enums: `BeblidSize`, `TeblidSize`, `NormalizationType`, `DistanceFunction`, `PointDistribution`, `SimilarityFunction`, `KeypointLayout`
  35. */
  36. CV_EXPORTS @interface Xfeatures2d : NSObject
  37. #pragma mark - Methods
  38. //
  39. // void cv::xfeatures2d::matchGMS(Size size1, Size size2, vector_KeyPoint keypoints1, vector_KeyPoint keypoints2, vector_DMatch matches1to2, vector_DMatch& matchesGMS, bool withRotation = false, bool withScale = false, double thresholdFactor = 6.0)
  40. //
  41. /**
  42. * GMS (Grid-based Motion Statistics) feature matching strategy described in CITE: Bian2017gms .
  43. * @param size1 Input size of image1.
  44. * @param size2 Input size of image2.
  45. * @param keypoints1 Input keypoints of image1.
  46. * @param keypoints2 Input keypoints of image2.
  47. * @param matches1to2 Input 1-nearest neighbor matches.
  48. * @param matchesGMS Matches returned by the GMS matching strategy.
  49. * @param withRotation Take rotation transformation into account.
  50. * @param withScale Take scale transformation into account.
  51. * @param thresholdFactor The higher, the less matches.
  52. * NOTE:
  53. * Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly.
  54. * If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480).
  55. * If your images have big rotation and scale changes, please set withRotation or withScale to true.
  56. */
  57. + (void)matchGMS:(Size2i*)size1 size2:(Size2i*)size2 keypoints1:(NSArray<KeyPoint*>*)keypoints1 keypoints2:(NSArray<KeyPoint*>*)keypoints2 matches1to2:(NSArray<DMatch*>*)matches1to2 matchesGMS:(NSMutableArray<DMatch*>*)matchesGMS withRotation:(BOOL)withRotation withScale:(BOOL)withScale thresholdFactor:(double)thresholdFactor NS_SWIFT_NAME(matchGMS(size1:size2:keypoints1:keypoints2:matches1to2:matchesGMS:withRotation:withScale:thresholdFactor:));
  58. /**
  59. * GMS (Grid-based Motion Statistics) feature matching strategy described in CITE: Bian2017gms .
  60. * @param size1 Input size of image1.
  61. * @param size2 Input size of image2.
  62. * @param keypoints1 Input keypoints of image1.
  63. * @param keypoints2 Input keypoints of image2.
  64. * @param matches1to2 Input 1-nearest neighbor matches.
  65. * @param matchesGMS Matches returned by the GMS matching strategy.
  66. * @param withRotation Take rotation transformation into account.
  67. * @param withScale Take scale transformation into account.
  68. * NOTE:
  69. * Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly.
  70. * If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480).
  71. * If your images have big rotation and scale changes, please set withRotation or withScale to true.
  72. */
  73. + (void)matchGMS:(Size2i*)size1 size2:(Size2i*)size2 keypoints1:(NSArray<KeyPoint*>*)keypoints1 keypoints2:(NSArray<KeyPoint*>*)keypoints2 matches1to2:(NSArray<DMatch*>*)matches1to2 matchesGMS:(NSMutableArray<DMatch*>*)matchesGMS withRotation:(BOOL)withRotation withScale:(BOOL)withScale NS_SWIFT_NAME(matchGMS(size1:size2:keypoints1:keypoints2:matches1to2:matchesGMS:withRotation:withScale:));
  74. /**
  75. * GMS (Grid-based Motion Statistics) feature matching strategy described in CITE: Bian2017gms .
  76. * @param size1 Input size of image1.
  77. * @param size2 Input size of image2.
  78. * @param keypoints1 Input keypoints of image1.
  79. * @param keypoints2 Input keypoints of image2.
  80. * @param matches1to2 Input 1-nearest neighbor matches.
  81. * @param matchesGMS Matches returned by the GMS matching strategy.
  82. * @param withRotation Take rotation transformation into account.
  83. * NOTE:
  84. * Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly.
  85. * If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480).
  86. * If your images have big rotation and scale changes, please set withRotation or withScale to true.
  87. */
  88. + (void)matchGMS:(Size2i*)size1 size2:(Size2i*)size2 keypoints1:(NSArray<KeyPoint*>*)keypoints1 keypoints2:(NSArray<KeyPoint*>*)keypoints2 matches1to2:(NSArray<DMatch*>*)matches1to2 matchesGMS:(NSMutableArray<DMatch*>*)matchesGMS withRotation:(BOOL)withRotation NS_SWIFT_NAME(matchGMS(size1:size2:keypoints1:keypoints2:matches1to2:matchesGMS:withRotation:));
  89. /**
  90. * GMS (Grid-based Motion Statistics) feature matching strategy described in CITE: Bian2017gms .
  91. * @param size1 Input size of image1.
  92. * @param size2 Input size of image2.
  93. * @param keypoints1 Input keypoints of image1.
  94. * @param keypoints2 Input keypoints of image2.
  95. * @param matches1to2 Input 1-nearest neighbor matches.
  96. * @param matchesGMS Matches returned by the GMS matching strategy.
  97. * NOTE:
  98. * Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly.
  99. * If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480).
  100. * If your images have big rotation and scale changes, please set withRotation or withScale to true.
  101. */
  102. + (void)matchGMS:(Size2i*)size1 size2:(Size2i*)size2 keypoints1:(NSArray<KeyPoint*>*)keypoints1 keypoints2:(NSArray<KeyPoint*>*)keypoints2 matches1to2:(NSArray<DMatch*>*)matches1to2 matchesGMS:(NSMutableArray<DMatch*>*)matchesGMS NS_SWIFT_NAME(matchGMS(size1:size2:keypoints1:keypoints2:matches1to2:matchesGMS:));
  103. //
  104. // void cv::xfeatures2d::matchLOGOS(vector_KeyPoint keypoints1, vector_KeyPoint keypoints2, vector_int nn1, vector_int nn2, vector_DMatch matches1to2)
  105. //
  106. /**
  107. * LOGOS (Local geometric support for high-outlier spatial verification) feature matching strategy described in CITE: Lowry2018LOGOSLG .
  108. * @param keypoints1 Input keypoints of image1.
  109. * @param keypoints2 Input keypoints of image2.
  110. * @param nn1 Index to the closest BoW centroid for each descriptors of image1.
  111. * @param nn2 Index to the closest BoW centroid for each descriptors of image2.
  112. * @param matches1to2 Matches returned by the LOGOS matching strategy.
  113. * NOTE:
  114. * This matching strategy is suitable for features matching against large scale database.
  115. * First step consists in constructing the bag-of-words (BoW) from a representative image database.
  116. * Image descriptors are then represented by their closest codevector (nearest BoW centroid).
  117. */
  118. + (void)matchLOGOS:(NSArray<KeyPoint*>*)keypoints1 keypoints2:(NSArray<KeyPoint*>*)keypoints2 nn1:(IntVector*)nn1 nn2:(IntVector*)nn2 matches1to2:(NSArray<DMatch*>*)matches1to2 NS_SWIFT_NAME(matchLOGOS(keypoints1:keypoints2:nn1:nn2:matches1to2:));
  119. @end
  120. NS_ASSUME_NONNULL_END