BFMatcher.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. #import "DescriptorMatcher.h"
  13. #import "Core.h"
  14. NS_ASSUME_NONNULL_BEGIN
  15. // C++: class BFMatcher
  16. /**
  17. * Brute-force descriptor matcher.
  18. *
  19. * For each descriptor in the first set, this matcher finds the closest descriptor in the second set
  20. * by trying each one. This descriptor matcher supports masking permissible matches of descriptor
  21. * sets.
  22. *
  23. * Member of `Features2d`
  24. */
  25. CV_EXPORTS @interface BFMatcher : DescriptorMatcher
  26. #ifdef __cplusplus
  27. @property(readonly)cv::Ptr<cv::BFMatcher> nativePtrBFMatcher;
  28. #endif
  29. #ifdef __cplusplus
  30. - (instancetype)initWithNativePtr:(cv::Ptr<cv::BFMatcher>)nativePtr;
  31. + (instancetype)fromNative:(cv::Ptr<cv::BFMatcher>)nativePtr;
  32. #endif
  33. #pragma mark - Methods
  34. //
  35. // cv::BFMatcher::BFMatcher(NormTypes normType = NORM_L2, bool crossCheck = false)
  36. //
  37. /**
  38. * Brute-force matcher constructor (obsolete). Please use BFMatcher.create()
  39. *
  40. *
  41. */
  42. - (instancetype)initWithNormType:(NormTypes)normType crossCheck:(BOOL)crossCheck;
  43. /**
  44. * Brute-force matcher constructor (obsolete). Please use BFMatcher.create()
  45. *
  46. *
  47. */
  48. - (instancetype)initWithNormType:(NormTypes)normType;
  49. /**
  50. * Brute-force matcher constructor (obsolete). Please use BFMatcher.create()
  51. *
  52. *
  53. */
  54. - (instancetype)init;
  55. //
  56. // static Ptr_BFMatcher cv::BFMatcher::create(NormTypes normType = NORM_L2, bool crossCheck = false)
  57. //
  58. /**
  59. * Brute-force matcher create method.
  60. * @param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are
  61. * preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and
  62. * BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor
  63. * description).
  64. * @param crossCheck If it is false, this is will be default BFMatcher behaviour when it finds the k
  65. * nearest neighbors for each query descriptor. If crossCheck==true, then the knnMatch() method with
  66. * k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the
  67. * matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent
  68. * pairs. Such technique usually produces best results with minimal number of outliers when there are
  69. * enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.
  70. */
  71. + (BFMatcher*)createBFMatcher:(NormTypes)normType crossCheck:(BOOL)crossCheck NS_SWIFT_NAME(create(normType:crossCheck:));
  72. /**
  73. * Brute-force matcher create method.
  74. * @param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are
  75. * preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and
  76. * BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor
  77. * description).
  78. * nearest neighbors for each query descriptor. If crossCheck==true, then the knnMatch() method with
  79. * k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the
  80. * matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent
  81. * pairs. Such technique usually produces best results with minimal number of outliers when there are
  82. * enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.
  83. */
  84. + (BFMatcher*)createBFMatcher:(NormTypes)normType NS_SWIFT_NAME(create(normType:));
  85. /**
  86. * Brute-force matcher create method.
  87. * preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and
  88. * BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor
  89. * description).
  90. * nearest neighbors for each query descriptor. If crossCheck==true, then the knnMatch() method with
  91. * k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the
  92. * matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent
  93. * pairs. Such technique usually produces best results with minimal number of outliers when there are
  94. * enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.
  95. */
  96. + (BFMatcher*)createBFMatcher NS_SWIFT_NAME(create());
  97. @end
  98. NS_ASSUME_NONNULL_END