EigenFaceRecognizer.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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/face.hpp"
  8. #import "opencv2/face/facerec.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "BasicFaceRecognizer.h"
  14. NS_ASSUME_NONNULL_BEGIN
  15. // C++: class EigenFaceRecognizer
  16. /**
  17. * The EigenFaceRecognizer module
  18. *
  19. * Member of `Face`
  20. */
  21. CV_EXPORTS @interface EigenFaceRecognizer : BasicFaceRecognizer
  22. #ifdef __cplusplus
  23. @property(readonly)cv::Ptr<cv::face::EigenFaceRecognizer> nativePtrEigenFaceRecognizer;
  24. #endif
  25. #ifdef __cplusplus
  26. - (instancetype)initWithNativePtr:(cv::Ptr<cv::face::EigenFaceRecognizer>)nativePtr;
  27. + (instancetype)fromNative:(cv::Ptr<cv::face::EigenFaceRecognizer>)nativePtr;
  28. #endif
  29. #pragma mark - Methods
  30. //
  31. // static Ptr_EigenFaceRecognizer cv::face::EigenFaceRecognizer::create(int num_components = 0, double threshold = DBL_MAX)
  32. //
  33. /**
  34. * @param num_components The number of components (read: Eigenfaces) kept for this Principal
  35. * Component Analysis. As a hint: There's no rule how many components (read: Eigenfaces) should be
  36. * kept for good reconstruction capabilities. It is based on your input data, so experiment with the
  37. * number. Keeping 80 components should almost always be sufficient.
  38. * @param threshold The threshold applied in the prediction.
  39. *
  40. * ### Notes:
  41. *
  42. * - Training and prediction must be done on grayscale images, use cvtColor to convert between the
  43. * color spaces.
  44. * - **THE EIGENFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL
  45. * SIZE.** (caps-lock, because I got so many mails asking for this). You have to make sure your
  46. * input data has the correct shape, else a meaningful exception is thrown. Use resize to resize
  47. * the images.
  48. * - This model does not support updating.
  49. *
  50. * ### Model internal data:
  51. *
  52. * - num_components see EigenFaceRecognizer::create.
  53. * - threshold see EigenFaceRecognizer::create.
  54. * - eigenvalues The eigenvalues for this Principal Component Analysis (ordered descending).
  55. * - eigenvectors The eigenvectors for this Principal Component Analysis (ordered by their
  56. * eigenvalue).
  57. * - mean The sample mean calculated from the training data.
  58. * - projections The projections of the training data.
  59. * - labels The threshold applied in the prediction. If the distance to the nearest neighbor is
  60. * larger than the threshold, this method returns -1.
  61. */
  62. + (EigenFaceRecognizer*)create:(int)num_components threshold:(double)threshold NS_SWIFT_NAME(create(num_components:threshold:));
  63. /**
  64. * @param num_components The number of components (read: Eigenfaces) kept for this Principal
  65. * Component Analysis. As a hint: There's no rule how many components (read: Eigenfaces) should be
  66. * kept for good reconstruction capabilities. It is based on your input data, so experiment with the
  67. * number. Keeping 80 components should almost always be sufficient.
  68. *
  69. * ### Notes:
  70. *
  71. * - Training and prediction must be done on grayscale images, use cvtColor to convert between the
  72. * color spaces.
  73. * - **THE EIGENFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL
  74. * SIZE.** (caps-lock, because I got so many mails asking for this). You have to make sure your
  75. * input data has the correct shape, else a meaningful exception is thrown. Use resize to resize
  76. * the images.
  77. * - This model does not support updating.
  78. *
  79. * ### Model internal data:
  80. *
  81. * - num_components see EigenFaceRecognizer::create.
  82. * - threshold see EigenFaceRecognizer::create.
  83. * - eigenvalues The eigenvalues for this Principal Component Analysis (ordered descending).
  84. * - eigenvectors The eigenvectors for this Principal Component Analysis (ordered by their
  85. * eigenvalue).
  86. * - mean The sample mean calculated from the training data.
  87. * - projections The projections of the training data.
  88. * - labels The threshold applied in the prediction. If the distance to the nearest neighbor is
  89. * larger than the threshold, this method returns -1.
  90. */
  91. + (EigenFaceRecognizer*)create:(int)num_components NS_SWIFT_NAME(create(num_components:));
  92. /**
  93. * Component Analysis. As a hint: There's no rule how many components (read: Eigenfaces) should be
  94. * kept for good reconstruction capabilities. It is based on your input data, so experiment with the
  95. * number. Keeping 80 components should almost always be sufficient.
  96. *
  97. * ### Notes:
  98. *
  99. * - Training and prediction must be done on grayscale images, use cvtColor to convert between the
  100. * color spaces.
  101. * - **THE EIGENFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL
  102. * SIZE.** (caps-lock, because I got so many mails asking for this). You have to make sure your
  103. * input data has the correct shape, else a meaningful exception is thrown. Use resize to resize
  104. * the images.
  105. * - This model does not support updating.
  106. *
  107. * ### Model internal data:
  108. *
  109. * - num_components see EigenFaceRecognizer::create.
  110. * - threshold see EigenFaceRecognizer::create.
  111. * - eigenvalues The eigenvalues for this Principal Component Analysis (ordered descending).
  112. * - eigenvectors The eigenvectors for this Principal Component Analysis (ordered by their
  113. * eigenvalue).
  114. * - mean The sample mean calculated from the training data.
  115. * - projections The projections of the training data.
  116. * - labels The threshold applied in the prediction. If the distance to the nearest neighbor is
  117. * larger than the threshold, this method returns -1.
  118. */
  119. + (EigenFaceRecognizer*)create NS_SWIFT_NAME(create());
  120. @end
  121. NS_ASSUME_NONNULL_END