DISOpticalFlow.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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/video.hpp"
  8. #import "opencv2/video/tracking.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "DenseOpticalFlow.h"
  14. NS_ASSUME_NONNULL_BEGIN
  15. // C++: class DISOpticalFlow
  16. /**
  17. * DIS optical flow algorithm.
  18. *
  19. * This class implements the Dense Inverse Search (DIS) optical flow algorithm. More
  20. * details about the algorithm can be found at CITE: Kroeger2016 . Includes three presets with preselected
  21. * parameters to provide reasonable trade-off between speed and quality. However, even the slowest preset is
  22. * still relatively fast, use DeepFlow if you need better quality and don't care about speed.
  23. *
  24. * This implementation includes several additional features compared to the algorithm described in the paper,
  25. * including spatial propagation of flow vectors (REF: getUseSpatialPropagation), as well as an option to
  26. * utilize an initial flow approximation passed to REF: calc (which is, essentially, temporal propagation,
  27. * if the previous frame's flow field is passed).
  28. *
  29. * Member of `Video`
  30. */
  31. CV_EXPORTS @interface DISOpticalFlow : DenseOpticalFlow
  32. #ifdef __cplusplus
  33. @property(readonly)cv::Ptr<cv::DISOpticalFlow> nativePtrDISOpticalFlow;
  34. #endif
  35. #ifdef __cplusplus
  36. - (instancetype)initWithNativePtr:(cv::Ptr<cv::DISOpticalFlow>)nativePtr;
  37. + (instancetype)fromNative:(cv::Ptr<cv::DISOpticalFlow>)nativePtr;
  38. #endif
  39. #pragma mark - Class Constants
  40. @property (class, readonly) int PRESET_ULTRAFAST NS_SWIFT_NAME(PRESET_ULTRAFAST);
  41. @property (class, readonly) int PRESET_FAST NS_SWIFT_NAME(PRESET_FAST);
  42. @property (class, readonly) int PRESET_MEDIUM NS_SWIFT_NAME(PRESET_MEDIUM);
  43. #pragma mark - Methods
  44. //
  45. // int cv::DISOpticalFlow::getFinestScale()
  46. //
  47. /**
  48. * Finest level of the Gaussian pyramid on which the flow is computed (zero level
  49. * corresponds to the original image resolution). The final flow is obtained by bilinear upscaling.
  50. * @see `-setFinestScale:`
  51. */
  52. - (int)getFinestScale NS_SWIFT_NAME(getFinestScale());
  53. //
  54. // void cv::DISOpticalFlow::setFinestScale(int val)
  55. //
  56. /**
  57. * getFinestScale @see `-getFinestScale:`
  58. */
  59. - (void)setFinestScale:(int)val NS_SWIFT_NAME(setFinestScale(val:));
  60. //
  61. // int cv::DISOpticalFlow::getPatchSize()
  62. //
  63. /**
  64. * Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well
  65. * enough in most cases.
  66. * @see `-setPatchSize:`
  67. */
  68. - (int)getPatchSize NS_SWIFT_NAME(getPatchSize());
  69. //
  70. // void cv::DISOpticalFlow::setPatchSize(int val)
  71. //
  72. /**
  73. * getPatchSize @see `-getPatchSize:`
  74. */
  75. - (void)setPatchSize:(int)val NS_SWIFT_NAME(setPatchSize(val:));
  76. //
  77. // int cv::DISOpticalFlow::getPatchStride()
  78. //
  79. /**
  80. * Stride between neighbor patches. Must be less than patch size. Lower values correspond
  81. * to higher flow quality.
  82. * @see `-setPatchStride:`
  83. */
  84. - (int)getPatchStride NS_SWIFT_NAME(getPatchStride());
  85. //
  86. // void cv::DISOpticalFlow::setPatchStride(int val)
  87. //
  88. /**
  89. * getPatchStride @see `-getPatchStride:`
  90. */
  91. - (void)setPatchStride:(int)val NS_SWIFT_NAME(setPatchStride(val:));
  92. //
  93. // int cv::DISOpticalFlow::getGradientDescentIterations()
  94. //
  95. /**
  96. * Maximum number of gradient descent iterations in the patch inverse search stage. Higher values
  97. * may improve quality in some cases.
  98. * @see `-setGradientDescentIterations:`
  99. */
  100. - (int)getGradientDescentIterations NS_SWIFT_NAME(getGradientDescentIterations());
  101. //
  102. // void cv::DISOpticalFlow::setGradientDescentIterations(int val)
  103. //
  104. /**
  105. * getGradientDescentIterations @see `-getGradientDescentIterations:`
  106. */
  107. - (void)setGradientDescentIterations:(int)val NS_SWIFT_NAME(setGradientDescentIterations(val:));
  108. //
  109. // int cv::DISOpticalFlow::getVariationalRefinementIterations()
  110. //
  111. /**
  112. * Number of fixed point iterations of variational refinement per scale. Set to zero to
  113. * disable variational refinement completely. Higher values will typically result in more smooth and
  114. * high-quality flow.
  115. * @see `-setGradientDescentIterations:`
  116. */
  117. - (int)getVariationalRefinementIterations NS_SWIFT_NAME(getVariationalRefinementIterations());
  118. //
  119. // void cv::DISOpticalFlow::setVariationalRefinementIterations(int val)
  120. //
  121. /**
  122. * getGradientDescentIterations @see `-getGradientDescentIterations:`
  123. */
  124. - (void)setVariationalRefinementIterations:(int)val NS_SWIFT_NAME(setVariationalRefinementIterations(val:));
  125. //
  126. // float cv::DISOpticalFlow::getVariationalRefinementAlpha()
  127. //
  128. /**
  129. * Weight of the smoothness term
  130. * @see `-setVariationalRefinementAlpha:`
  131. */
  132. - (float)getVariationalRefinementAlpha NS_SWIFT_NAME(getVariationalRefinementAlpha());
  133. //
  134. // void cv::DISOpticalFlow::setVariationalRefinementAlpha(float val)
  135. //
  136. /**
  137. * getVariationalRefinementAlpha @see `-getVariationalRefinementAlpha:`
  138. */
  139. - (void)setVariationalRefinementAlpha:(float)val NS_SWIFT_NAME(setVariationalRefinementAlpha(val:));
  140. //
  141. // float cv::DISOpticalFlow::getVariationalRefinementDelta()
  142. //
  143. /**
  144. * Weight of the color constancy term
  145. * @see `-setVariationalRefinementDelta:`
  146. */
  147. - (float)getVariationalRefinementDelta NS_SWIFT_NAME(getVariationalRefinementDelta());
  148. //
  149. // void cv::DISOpticalFlow::setVariationalRefinementDelta(float val)
  150. //
  151. /**
  152. * getVariationalRefinementDelta @see `-getVariationalRefinementDelta:`
  153. */
  154. - (void)setVariationalRefinementDelta:(float)val NS_SWIFT_NAME(setVariationalRefinementDelta(val:));
  155. //
  156. // float cv::DISOpticalFlow::getVariationalRefinementGamma()
  157. //
  158. /**
  159. * Weight of the gradient constancy term
  160. * @see `-setVariationalRefinementGamma:`
  161. */
  162. - (float)getVariationalRefinementGamma NS_SWIFT_NAME(getVariationalRefinementGamma());
  163. //
  164. // void cv::DISOpticalFlow::setVariationalRefinementGamma(float val)
  165. //
  166. /**
  167. * getVariationalRefinementGamma @see `-getVariationalRefinementGamma:`
  168. */
  169. - (void)setVariationalRefinementGamma:(float)val NS_SWIFT_NAME(setVariationalRefinementGamma(val:));
  170. //
  171. // bool cv::DISOpticalFlow::getUseMeanNormalization()
  172. //
  173. /**
  174. * Whether to use mean-normalization of patches when computing patch distance. It is turned on
  175. * by default as it typically provides a noticeable quality boost because of increased robustness to
  176. * illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes
  177. * in illumination.
  178. * @see `-setUseMeanNormalization:`
  179. */
  180. - (BOOL)getUseMeanNormalization NS_SWIFT_NAME(getUseMeanNormalization());
  181. //
  182. // void cv::DISOpticalFlow::setUseMeanNormalization(bool val)
  183. //
  184. /**
  185. * getUseMeanNormalization @see `-getUseMeanNormalization:`
  186. */
  187. - (void)setUseMeanNormalization:(BOOL)val NS_SWIFT_NAME(setUseMeanNormalization(val:));
  188. //
  189. // bool cv::DISOpticalFlow::getUseSpatialPropagation()
  190. //
  191. /**
  192. * Whether to use spatial propagation of good optical flow vectors. This option is turned on by
  193. * default, as it tends to work better on average and can sometimes help recover from major errors
  194. * introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this
  195. * option off can make the output flow field a bit smoother, however.
  196. * @see `-setUseSpatialPropagation:`
  197. */
  198. - (BOOL)getUseSpatialPropagation NS_SWIFT_NAME(getUseSpatialPropagation());
  199. //
  200. // void cv::DISOpticalFlow::setUseSpatialPropagation(bool val)
  201. //
  202. /**
  203. * getUseSpatialPropagation @see `-getUseSpatialPropagation:`
  204. */
  205. - (void)setUseSpatialPropagation:(BOOL)val NS_SWIFT_NAME(setUseSpatialPropagation(val:));
  206. //
  207. // static Ptr_DISOpticalFlow cv::DISOpticalFlow::create(int preset = DISOpticalFlow::PRESET_FAST)
  208. //
  209. /**
  210. * Creates an instance of DISOpticalFlow
  211. *
  212. * @param preset one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM
  213. */
  214. + (DISOpticalFlow*)create:(int)preset NS_SWIFT_NAME(create(preset:));
  215. /**
  216. * Creates an instance of DISOpticalFlow
  217. *
  218. */
  219. + (DISOpticalFlow*)create NS_SWIFT_NAME(create());
  220. @end
  221. NS_ASSUME_NONNULL_END