TEBLID.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. #import "Feature2D.h"
  13. // C++: enum TeblidSize (cv.xfeatures2d.TEBLID.TeblidSize)
  14. typedef NS_ENUM(int, TeblidSize) {
  15. TEBLID_SIZE_256_BITS NS_SWIFT_NAME(SIZE_256_BITS) = 102,
  16. TEBLID_SIZE_512_BITS NS_SWIFT_NAME(SIZE_512_BITS) = 103
  17. };
  18. NS_ASSUME_NONNULL_BEGIN
  19. // C++: class TEBLID
  20. /**
  21. * Class implementing TEBLID (Triplet-based Efficient Binary Local Image Descriptor),
  22. * described in CITE: Suarez2021TEBLID.
  23. *
  24. * TEBLID stands for Triplet-based Efficient Binary Local Image Descriptor, although originally it was called BAD
  25. * \cite Suarez2021TEBLID. It is an improvement over BEBLID \cite Suarez2020BEBLID, that uses triplet loss,
  26. * hard negative mining, and anchor swap to improve the image matching results.
  27. * It is able to describe keypoints from any detector just by changing the scale_factor parameter.
  28. * TEBLID is as efficient as ORB, BEBLID or BRISK, but the triplet-based training objective selected more
  29. * discriminative features that explain the accuracy gain. It is also more compact than BEBLID,
  30. * when running the [AKAZE example](https://github.com/opencv/opencv/blob/4.x/samples/cpp/tutorial_code/features2D/AKAZE_match.cpp)
  31. * with 10000 keypoints detected by ORB, BEBLID obtains 561 inliers (75%) with 512 bits, whereas
  32. * TEBLID obtains 621 (75.2%) with 256 bits. ORB obtains only 493 inliers (63%).
  33. *
  34. * If you find this code useful, please add a reference to the following paper:
  35. * <BLOCKQUOTE> Iago Suárez, José M. Buenaposada, and Luis Baumela.
  36. * Revisiting Binary Local Image Description for Resource Limited Devices.
  37. * IEEE Robotics and Automation Letters, vol. 6, no. 4, pp. 8317-8324, Oct. 2021. </BLOCKQUOTE>
  38. *
  39. * The descriptor was trained in Liberty split of the UBC datasets \cite winder2007learning .
  40. *
  41. * Member of `Xfeatures2d`
  42. */
  43. CV_EXPORTS @interface TEBLID : Feature2D
  44. #ifdef __cplusplus
  45. @property(readonly)cv::Ptr<cv::xfeatures2d::TEBLID> nativePtrTEBLID;
  46. #endif
  47. #ifdef __cplusplus
  48. - (instancetype)initWithNativePtr:(cv::Ptr<cv::xfeatures2d::TEBLID>)nativePtr;
  49. + (instancetype)fromNative:(cv::Ptr<cv::xfeatures2d::TEBLID>)nativePtr;
  50. #endif
  51. #pragma mark - Methods
  52. //
  53. // static Ptr_TEBLID cv::xfeatures2d::TEBLID::create(float scale_factor, int n_bits = TEBLID::SIZE_256_BITS)
  54. //
  55. /**
  56. * Creates the TEBLID descriptor.
  57. * @param scale_factor Adjust the sampling window around detected keypoints:
  58. * - <b> 1.00f </b> should be the scale for ORB keypoints
  59. * - <b> 6.75f </b> should be the scale for SIFT detected keypoints
  60. * - <b> 6.25f </b> is default and fits for KAZE, SURF detected keypoints
  61. * - <b> 5.00f </b> should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints
  62. * @param n_bits Determine the number of bits in the descriptor. Should be either
  63. * TEBLID::SIZE_256_BITS or TEBLID::SIZE_512_BITS.
  64. */
  65. + (TEBLID*)create:(float)scale_factor n_bits:(int)n_bits NS_SWIFT_NAME(create(scale_factor:n_bits:));
  66. /**
  67. * Creates the TEBLID descriptor.
  68. * @param scale_factor Adjust the sampling window around detected keypoints:
  69. * - <b> 1.00f </b> should be the scale for ORB keypoints
  70. * - <b> 6.75f </b> should be the scale for SIFT detected keypoints
  71. * - <b> 6.25f </b> is default and fits for KAZE, SURF detected keypoints
  72. * - <b> 5.00f </b> should be the scale for AKAZE, MSD, AGAST, FAST, BRISK keypoints
  73. * TEBLID::SIZE_256_BITS or TEBLID::SIZE_512_BITS.
  74. */
  75. + (TEBLID*)create:(float)scale_factor NS_SWIFT_NAME(create(scale_factor:));
  76. //
  77. // String cv::xfeatures2d::TEBLID::getDefaultName()
  78. //
  79. - (NSString*)getDefaultName NS_SWIFT_NAME(getDefaultName());
  80. @end
  81. NS_ASSUME_NONNULL_END