RICInterpolator.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Runtime.InteropServices;
  6. namespace OpenCVForUnity.XimgprocModule
  7. {
  8. // C++: class RICInterpolator
  9. /**
  10. * Sparse match interpolation algorithm based on modified piecewise locally-weighted affine
  11. * estimator called Robust Interpolation method of Correspondences or RIC from CITE: Hu2017 and Variational
  12. * and Fast Global Smoother as post-processing filter. The RICInterpolator is a extension of the EdgeAwareInterpolator.
  13. * Main concept of this extension is an piece-wise affine model based on over-segmentation via SLIC superpixel estimation.
  14. * The method contains an efficient propagation mechanism to estimate among the pieces-wise models.
  15. */
  16. public class RICInterpolator : SparseMatchInterpolator
  17. {
  18. protected override void Dispose(bool disposing)
  19. {
  20. try
  21. {
  22. if (disposing)
  23. {
  24. }
  25. if (IsEnabledDispose)
  26. {
  27. if (nativeObj != IntPtr.Zero)
  28. ximgproc_RICInterpolator_delete(nativeObj);
  29. nativeObj = IntPtr.Zero;
  30. }
  31. }
  32. finally
  33. {
  34. base.Dispose(disposing);
  35. }
  36. }
  37. protected internal RICInterpolator(IntPtr addr) : base(addr) { }
  38. // internal usage only
  39. public static new RICInterpolator __fromPtr__(IntPtr addr) { return new RICInterpolator(addr); }
  40. //
  41. // C++: void cv::ximgproc::RICInterpolator::setK(int k = 32)
  42. //
  43. /**
  44. * K is a number of nearest-neighbor matches considered, when fitting a locally affine
  45. * model for a superpixel segment. However, lower values would make the interpolation
  46. * noticeably faster. The original implementation of CITE: Hu2017 uses 32.
  47. * param k automatically generated
  48. */
  49. public void setK(int k)
  50. {
  51. ThrowIfDisposed();
  52. ximgproc_RICInterpolator_setK_10(nativeObj, k);
  53. }
  54. /**
  55. * K is a number of nearest-neighbor matches considered, when fitting a locally affine
  56. * model for a superpixel segment. However, lower values would make the interpolation
  57. * noticeably faster. The original implementation of CITE: Hu2017 uses 32.
  58. */
  59. public void setK()
  60. {
  61. ThrowIfDisposed();
  62. ximgproc_RICInterpolator_setK_11(nativeObj);
  63. }
  64. //
  65. // C++: int cv::ximgproc::RICInterpolator::getK()
  66. //
  67. /**
  68. * setK
  69. * SEE: setK
  70. * return automatically generated
  71. */
  72. public int getK()
  73. {
  74. ThrowIfDisposed();
  75. return ximgproc_RICInterpolator_getK_10(nativeObj);
  76. }
  77. //
  78. // C++: void cv::ximgproc::RICInterpolator::setCostMap(Mat costMap)
  79. //
  80. /**
  81. * Interface to provide a more elaborated cost map, i.e. edge map, for the edge-aware term.
  82. * This implementation is based on a rather simple gradient-based edge map estimation.
  83. * To used more complex edge map estimator (e.g. StructuredEdgeDetection that has been
  84. * used in the original publication) that may lead to improved accuracies, the internal
  85. * edge map estimation can be bypassed here.
  86. * param costMap a type CV_32FC1 Mat is required.
  87. * SEE: cv::ximgproc::createSuperpixelSLIC
  88. */
  89. public void setCostMap(Mat costMap)
  90. {
  91. ThrowIfDisposed();
  92. if (costMap != null) costMap.ThrowIfDisposed();
  93. ximgproc_RICInterpolator_setCostMap_10(nativeObj, costMap.nativeObj);
  94. }
  95. //
  96. // C++: void cv::ximgproc::RICInterpolator::setSuperpixelSize(int spSize = 15)
  97. //
  98. /**
  99. * Get the internal cost, i.e. edge map, used for estimating the edge-aware term.
  100. * SEE: setCostMap
  101. * param spSize automatically generated
  102. */
  103. public void setSuperpixelSize(int spSize)
  104. {
  105. ThrowIfDisposed();
  106. ximgproc_RICInterpolator_setSuperpixelSize_10(nativeObj, spSize);
  107. }
  108. /**
  109. * Get the internal cost, i.e. edge map, used for estimating the edge-aware term.
  110. * SEE: setCostMap
  111. */
  112. public void setSuperpixelSize()
  113. {
  114. ThrowIfDisposed();
  115. ximgproc_RICInterpolator_setSuperpixelSize_11(nativeObj);
  116. }
  117. //
  118. // C++: int cv::ximgproc::RICInterpolator::getSuperpixelSize()
  119. //
  120. /**
  121. * setSuperpixelSize
  122. * SEE: setSuperpixelSize
  123. * return automatically generated
  124. */
  125. public int getSuperpixelSize()
  126. {
  127. ThrowIfDisposed();
  128. return ximgproc_RICInterpolator_getSuperpixelSize_10(nativeObj);
  129. }
  130. //
  131. // C++: void cv::ximgproc::RICInterpolator::setSuperpixelNNCnt(int spNN = 150)
  132. //
  133. /**
  134. * Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine
  135. * model.
  136. * param spNN automatically generated
  137. */
  138. public void setSuperpixelNNCnt(int spNN)
  139. {
  140. ThrowIfDisposed();
  141. ximgproc_RICInterpolator_setSuperpixelNNCnt_10(nativeObj, spNN);
  142. }
  143. /**
  144. * Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine
  145. * model.
  146. */
  147. public void setSuperpixelNNCnt()
  148. {
  149. ThrowIfDisposed();
  150. ximgproc_RICInterpolator_setSuperpixelNNCnt_11(nativeObj);
  151. }
  152. //
  153. // C++: int cv::ximgproc::RICInterpolator::getSuperpixelNNCnt()
  154. //
  155. /**
  156. * setSuperpixelNNCnt
  157. * SEE: setSuperpixelNNCnt
  158. * return automatically generated
  159. */
  160. public int getSuperpixelNNCnt()
  161. {
  162. ThrowIfDisposed();
  163. return ximgproc_RICInterpolator_getSuperpixelNNCnt_10(nativeObj);
  164. }
  165. //
  166. // C++: void cv::ximgproc::RICInterpolator::setSuperpixelRuler(float ruler = 15.f)
  167. //
  168. /**
  169. * Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.
  170. * SEE: cv::ximgproc::createSuperpixelSLIC
  171. * param ruler automatically generated
  172. */
  173. public void setSuperpixelRuler(float ruler)
  174. {
  175. ThrowIfDisposed();
  176. ximgproc_RICInterpolator_setSuperpixelRuler_10(nativeObj, ruler);
  177. }
  178. /**
  179. * Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.
  180. * SEE: cv::ximgproc::createSuperpixelSLIC
  181. */
  182. public void setSuperpixelRuler()
  183. {
  184. ThrowIfDisposed();
  185. ximgproc_RICInterpolator_setSuperpixelRuler_11(nativeObj);
  186. }
  187. //
  188. // C++: float cv::ximgproc::RICInterpolator::getSuperpixelRuler()
  189. //
  190. /**
  191. * setSuperpixelRuler
  192. * SEE: setSuperpixelRuler
  193. * return automatically generated
  194. */
  195. public float getSuperpixelRuler()
  196. {
  197. ThrowIfDisposed();
  198. return ximgproc_RICInterpolator_getSuperpixelRuler_10(nativeObj);
  199. }
  200. //
  201. // C++: void cv::ximgproc::RICInterpolator::setSuperpixelMode(int mode = 100)
  202. //
  203. /**
  204. * Parameter to choose superpixel algorithm variant to use:
  205. * - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100)
  206. * - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101)
  207. * - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).
  208. * SEE: cv::ximgproc::createSuperpixelSLIC
  209. * param mode automatically generated
  210. */
  211. public void setSuperpixelMode(int mode)
  212. {
  213. ThrowIfDisposed();
  214. ximgproc_RICInterpolator_setSuperpixelMode_10(nativeObj, mode);
  215. }
  216. /**
  217. * Parameter to choose superpixel algorithm variant to use:
  218. * - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100)
  219. * - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101)
  220. * - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).
  221. * SEE: cv::ximgproc::createSuperpixelSLIC
  222. */
  223. public void setSuperpixelMode()
  224. {
  225. ThrowIfDisposed();
  226. ximgproc_RICInterpolator_setSuperpixelMode_11(nativeObj);
  227. }
  228. //
  229. // C++: int cv::ximgproc::RICInterpolator::getSuperpixelMode()
  230. //
  231. /**
  232. * setSuperpixelMode
  233. * SEE: setSuperpixelMode
  234. * return automatically generated
  235. */
  236. public int getSuperpixelMode()
  237. {
  238. ThrowIfDisposed();
  239. return ximgproc_RICInterpolator_getSuperpixelMode_10(nativeObj);
  240. }
  241. //
  242. // C++: void cv::ximgproc::RICInterpolator::setAlpha(float alpha = 0.7f)
  243. //
  244. /**
  245. * Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
  246. * param alpha automatically generated
  247. */
  248. public void setAlpha(float alpha)
  249. {
  250. ThrowIfDisposed();
  251. ximgproc_RICInterpolator_setAlpha_10(nativeObj, alpha);
  252. }
  253. /**
  254. * Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
  255. */
  256. public void setAlpha()
  257. {
  258. ThrowIfDisposed();
  259. ximgproc_RICInterpolator_setAlpha_11(nativeObj);
  260. }
  261. //
  262. // C++: float cv::ximgproc::RICInterpolator::getAlpha()
  263. //
  264. /**
  265. * setAlpha
  266. * SEE: setAlpha
  267. * return automatically generated
  268. */
  269. public float getAlpha()
  270. {
  271. ThrowIfDisposed();
  272. return ximgproc_RICInterpolator_getAlpha_10(nativeObj);
  273. }
  274. //
  275. // C++: void cv::ximgproc::RICInterpolator::setModelIter(int modelIter = 4)
  276. //
  277. /**
  278. * Parameter defining the number of iterations for piece-wise affine model estimation.
  279. * param modelIter automatically generated
  280. */
  281. public void setModelIter(int modelIter)
  282. {
  283. ThrowIfDisposed();
  284. ximgproc_RICInterpolator_setModelIter_10(nativeObj, modelIter);
  285. }
  286. /**
  287. * Parameter defining the number of iterations for piece-wise affine model estimation.
  288. */
  289. public void setModelIter()
  290. {
  291. ThrowIfDisposed();
  292. ximgproc_RICInterpolator_setModelIter_11(nativeObj);
  293. }
  294. //
  295. // C++: int cv::ximgproc::RICInterpolator::getModelIter()
  296. //
  297. /**
  298. * setModelIter
  299. * SEE: setModelIter
  300. * return automatically generated
  301. */
  302. public int getModelIter()
  303. {
  304. ThrowIfDisposed();
  305. return ximgproc_RICInterpolator_getModelIter_10(nativeObj);
  306. }
  307. //
  308. // C++: void cv::ximgproc::RICInterpolator::setRefineModels(bool refineModles = true)
  309. //
  310. /**
  311. * Parameter to choose wether additional refinement of the piece-wise affine models is employed.
  312. * param refineModles automatically generated
  313. */
  314. public void setRefineModels(bool refineModles)
  315. {
  316. ThrowIfDisposed();
  317. ximgproc_RICInterpolator_setRefineModels_10(nativeObj, refineModles);
  318. }
  319. /**
  320. * Parameter to choose wether additional refinement of the piece-wise affine models is employed.
  321. */
  322. public void setRefineModels()
  323. {
  324. ThrowIfDisposed();
  325. ximgproc_RICInterpolator_setRefineModels_11(nativeObj);
  326. }
  327. //
  328. // C++: bool cv::ximgproc::RICInterpolator::getRefineModels()
  329. //
  330. /**
  331. * setRefineModels
  332. * SEE: setRefineModels
  333. * return automatically generated
  334. */
  335. public bool getRefineModels()
  336. {
  337. ThrowIfDisposed();
  338. return ximgproc_RICInterpolator_getRefineModels_10(nativeObj);
  339. }
  340. //
  341. // C++: void cv::ximgproc::RICInterpolator::setMaxFlow(float maxFlow = 250.f)
  342. //
  343. /**
  344. * MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.
  345. * If the prediction exceeds the treshold the translational model will be applied instead.
  346. * param maxFlow automatically generated
  347. */
  348. public void setMaxFlow(float maxFlow)
  349. {
  350. ThrowIfDisposed();
  351. ximgproc_RICInterpolator_setMaxFlow_10(nativeObj, maxFlow);
  352. }
  353. /**
  354. * MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.
  355. * If the prediction exceeds the treshold the translational model will be applied instead.
  356. */
  357. public void setMaxFlow()
  358. {
  359. ThrowIfDisposed();
  360. ximgproc_RICInterpolator_setMaxFlow_11(nativeObj);
  361. }
  362. //
  363. // C++: float cv::ximgproc::RICInterpolator::getMaxFlow()
  364. //
  365. /**
  366. * setMaxFlow
  367. * SEE: setMaxFlow
  368. * return automatically generated
  369. */
  370. public float getMaxFlow()
  371. {
  372. ThrowIfDisposed();
  373. return ximgproc_RICInterpolator_getMaxFlow_10(nativeObj);
  374. }
  375. //
  376. // C++: void cv::ximgproc::RICInterpolator::setUseVariationalRefinement(bool use_variational_refinement = false)
  377. //
  378. /**
  379. * Parameter to choose wether the VariationalRefinement post-processing is employed.
  380. * param use_variational_refinement automatically generated
  381. */
  382. public void setUseVariationalRefinement(bool use_variational_refinement)
  383. {
  384. ThrowIfDisposed();
  385. ximgproc_RICInterpolator_setUseVariationalRefinement_10(nativeObj, use_variational_refinement);
  386. }
  387. /**
  388. * Parameter to choose wether the VariationalRefinement post-processing is employed.
  389. */
  390. public void setUseVariationalRefinement()
  391. {
  392. ThrowIfDisposed();
  393. ximgproc_RICInterpolator_setUseVariationalRefinement_11(nativeObj);
  394. }
  395. //
  396. // C++: bool cv::ximgproc::RICInterpolator::getUseVariationalRefinement()
  397. //
  398. /**
  399. * setUseVariationalRefinement
  400. * SEE: setUseVariationalRefinement
  401. * return automatically generated
  402. */
  403. public bool getUseVariationalRefinement()
  404. {
  405. ThrowIfDisposed();
  406. return ximgproc_RICInterpolator_getUseVariationalRefinement_10(nativeObj);
  407. }
  408. //
  409. // C++: void cv::ximgproc::RICInterpolator::setUseGlobalSmootherFilter(bool use_FGS = true)
  410. //
  411. /**
  412. * Sets whether the fastGlobalSmootherFilter() post-processing is employed.
  413. * param use_FGS automatically generated
  414. */
  415. public void setUseGlobalSmootherFilter(bool use_FGS)
  416. {
  417. ThrowIfDisposed();
  418. ximgproc_RICInterpolator_setUseGlobalSmootherFilter_10(nativeObj, use_FGS);
  419. }
  420. /**
  421. * Sets whether the fastGlobalSmootherFilter() post-processing is employed.
  422. */
  423. public void setUseGlobalSmootherFilter()
  424. {
  425. ThrowIfDisposed();
  426. ximgproc_RICInterpolator_setUseGlobalSmootherFilter_11(nativeObj);
  427. }
  428. //
  429. // C++: bool cv::ximgproc::RICInterpolator::getUseGlobalSmootherFilter()
  430. //
  431. /**
  432. * setUseGlobalSmootherFilter
  433. * SEE: setUseGlobalSmootherFilter
  434. * return automatically generated
  435. */
  436. public bool getUseGlobalSmootherFilter()
  437. {
  438. ThrowIfDisposed();
  439. return ximgproc_RICInterpolator_getUseGlobalSmootherFilter_10(nativeObj);
  440. }
  441. //
  442. // C++: void cv::ximgproc::RICInterpolator::setFGSLambda(float lambda = 500.f)
  443. //
  444. /**
  445. * Sets the respective fastGlobalSmootherFilter() parameter.
  446. * param lambda automatically generated
  447. */
  448. public void setFGSLambda(float lambda)
  449. {
  450. ThrowIfDisposed();
  451. ximgproc_RICInterpolator_setFGSLambda_10(nativeObj, lambda);
  452. }
  453. /**
  454. * Sets the respective fastGlobalSmootherFilter() parameter.
  455. */
  456. public void setFGSLambda()
  457. {
  458. ThrowIfDisposed();
  459. ximgproc_RICInterpolator_setFGSLambda_11(nativeObj);
  460. }
  461. //
  462. // C++: float cv::ximgproc::RICInterpolator::getFGSLambda()
  463. //
  464. /**
  465. * setFGSLambda
  466. * SEE: setFGSLambda
  467. * return automatically generated
  468. */
  469. public float getFGSLambda()
  470. {
  471. ThrowIfDisposed();
  472. return ximgproc_RICInterpolator_getFGSLambda_10(nativeObj);
  473. }
  474. //
  475. // C++: void cv::ximgproc::RICInterpolator::setFGSSigma(float sigma = 1.5f)
  476. //
  477. /**
  478. * Sets the respective fastGlobalSmootherFilter() parameter.
  479. * param sigma automatically generated
  480. */
  481. public void setFGSSigma(float sigma)
  482. {
  483. ThrowIfDisposed();
  484. ximgproc_RICInterpolator_setFGSSigma_10(nativeObj, sigma);
  485. }
  486. /**
  487. * Sets the respective fastGlobalSmootherFilter() parameter.
  488. */
  489. public void setFGSSigma()
  490. {
  491. ThrowIfDisposed();
  492. ximgproc_RICInterpolator_setFGSSigma_11(nativeObj);
  493. }
  494. //
  495. // C++: float cv::ximgproc::RICInterpolator::getFGSSigma()
  496. //
  497. /**
  498. * setFGSSigma
  499. * SEE: setFGSSigma
  500. * return automatically generated
  501. */
  502. public float getFGSSigma()
  503. {
  504. ThrowIfDisposed();
  505. return ximgproc_RICInterpolator_getFGSSigma_10(nativeObj);
  506. }
  507. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  508. const string LIBNAME = "__Internal";
  509. #else
  510. const string LIBNAME = "opencvforunity";
  511. #endif
  512. // C++: void cv::ximgproc::RICInterpolator::setK(int k = 32)
  513. [DllImport(LIBNAME)]
  514. private static extern void ximgproc_RICInterpolator_setK_10(IntPtr nativeObj, int k);
  515. [DllImport(LIBNAME)]
  516. private static extern void ximgproc_RICInterpolator_setK_11(IntPtr nativeObj);
  517. // C++: int cv::ximgproc::RICInterpolator::getK()
  518. [DllImport(LIBNAME)]
  519. private static extern int ximgproc_RICInterpolator_getK_10(IntPtr nativeObj);
  520. // C++: void cv::ximgproc::RICInterpolator::setCostMap(Mat costMap)
  521. [DllImport(LIBNAME)]
  522. private static extern void ximgproc_RICInterpolator_setCostMap_10(IntPtr nativeObj, IntPtr costMap_nativeObj);
  523. // C++: void cv::ximgproc::RICInterpolator::setSuperpixelSize(int spSize = 15)
  524. [DllImport(LIBNAME)]
  525. private static extern void ximgproc_RICInterpolator_setSuperpixelSize_10(IntPtr nativeObj, int spSize);
  526. [DllImport(LIBNAME)]
  527. private static extern void ximgproc_RICInterpolator_setSuperpixelSize_11(IntPtr nativeObj);
  528. // C++: int cv::ximgproc::RICInterpolator::getSuperpixelSize()
  529. [DllImport(LIBNAME)]
  530. private static extern int ximgproc_RICInterpolator_getSuperpixelSize_10(IntPtr nativeObj);
  531. // C++: void cv::ximgproc::RICInterpolator::setSuperpixelNNCnt(int spNN = 150)
  532. [DllImport(LIBNAME)]
  533. private static extern void ximgproc_RICInterpolator_setSuperpixelNNCnt_10(IntPtr nativeObj, int spNN);
  534. [DllImport(LIBNAME)]
  535. private static extern void ximgproc_RICInterpolator_setSuperpixelNNCnt_11(IntPtr nativeObj);
  536. // C++: int cv::ximgproc::RICInterpolator::getSuperpixelNNCnt()
  537. [DllImport(LIBNAME)]
  538. private static extern int ximgproc_RICInterpolator_getSuperpixelNNCnt_10(IntPtr nativeObj);
  539. // C++: void cv::ximgproc::RICInterpolator::setSuperpixelRuler(float ruler = 15.f)
  540. [DllImport(LIBNAME)]
  541. private static extern void ximgproc_RICInterpolator_setSuperpixelRuler_10(IntPtr nativeObj, float ruler);
  542. [DllImport(LIBNAME)]
  543. private static extern void ximgproc_RICInterpolator_setSuperpixelRuler_11(IntPtr nativeObj);
  544. // C++: float cv::ximgproc::RICInterpolator::getSuperpixelRuler()
  545. [DllImport(LIBNAME)]
  546. private static extern float ximgproc_RICInterpolator_getSuperpixelRuler_10(IntPtr nativeObj);
  547. // C++: void cv::ximgproc::RICInterpolator::setSuperpixelMode(int mode = 100)
  548. [DllImport(LIBNAME)]
  549. private static extern void ximgproc_RICInterpolator_setSuperpixelMode_10(IntPtr nativeObj, int mode);
  550. [DllImport(LIBNAME)]
  551. private static extern void ximgproc_RICInterpolator_setSuperpixelMode_11(IntPtr nativeObj);
  552. // C++: int cv::ximgproc::RICInterpolator::getSuperpixelMode()
  553. [DllImport(LIBNAME)]
  554. private static extern int ximgproc_RICInterpolator_getSuperpixelMode_10(IntPtr nativeObj);
  555. // C++: void cv::ximgproc::RICInterpolator::setAlpha(float alpha = 0.7f)
  556. [DllImport(LIBNAME)]
  557. private static extern void ximgproc_RICInterpolator_setAlpha_10(IntPtr nativeObj, float alpha);
  558. [DllImport(LIBNAME)]
  559. private static extern void ximgproc_RICInterpolator_setAlpha_11(IntPtr nativeObj);
  560. // C++: float cv::ximgproc::RICInterpolator::getAlpha()
  561. [DllImport(LIBNAME)]
  562. private static extern float ximgproc_RICInterpolator_getAlpha_10(IntPtr nativeObj);
  563. // C++: void cv::ximgproc::RICInterpolator::setModelIter(int modelIter = 4)
  564. [DllImport(LIBNAME)]
  565. private static extern void ximgproc_RICInterpolator_setModelIter_10(IntPtr nativeObj, int modelIter);
  566. [DllImport(LIBNAME)]
  567. private static extern void ximgproc_RICInterpolator_setModelIter_11(IntPtr nativeObj);
  568. // C++: int cv::ximgproc::RICInterpolator::getModelIter()
  569. [DllImport(LIBNAME)]
  570. private static extern int ximgproc_RICInterpolator_getModelIter_10(IntPtr nativeObj);
  571. // C++: void cv::ximgproc::RICInterpolator::setRefineModels(bool refineModles = true)
  572. [DllImport(LIBNAME)]
  573. private static extern void ximgproc_RICInterpolator_setRefineModels_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool refineModles);
  574. [DllImport(LIBNAME)]
  575. private static extern void ximgproc_RICInterpolator_setRefineModels_11(IntPtr nativeObj);
  576. // C++: bool cv::ximgproc::RICInterpolator::getRefineModels()
  577. [DllImport(LIBNAME)]
  578. [return: MarshalAs(UnmanagedType.U1)]
  579. private static extern bool ximgproc_RICInterpolator_getRefineModels_10(IntPtr nativeObj);
  580. // C++: void cv::ximgproc::RICInterpolator::setMaxFlow(float maxFlow = 250.f)
  581. [DllImport(LIBNAME)]
  582. private static extern void ximgproc_RICInterpolator_setMaxFlow_10(IntPtr nativeObj, float maxFlow);
  583. [DllImport(LIBNAME)]
  584. private static extern void ximgproc_RICInterpolator_setMaxFlow_11(IntPtr nativeObj);
  585. // C++: float cv::ximgproc::RICInterpolator::getMaxFlow()
  586. [DllImport(LIBNAME)]
  587. private static extern float ximgproc_RICInterpolator_getMaxFlow_10(IntPtr nativeObj);
  588. // C++: void cv::ximgproc::RICInterpolator::setUseVariationalRefinement(bool use_variational_refinement = false)
  589. [DllImport(LIBNAME)]
  590. private static extern void ximgproc_RICInterpolator_setUseVariationalRefinement_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool use_variational_refinement);
  591. [DllImport(LIBNAME)]
  592. private static extern void ximgproc_RICInterpolator_setUseVariationalRefinement_11(IntPtr nativeObj);
  593. // C++: bool cv::ximgproc::RICInterpolator::getUseVariationalRefinement()
  594. [DllImport(LIBNAME)]
  595. [return: MarshalAs(UnmanagedType.U1)]
  596. private static extern bool ximgproc_RICInterpolator_getUseVariationalRefinement_10(IntPtr nativeObj);
  597. // C++: void cv::ximgproc::RICInterpolator::setUseGlobalSmootherFilter(bool use_FGS = true)
  598. [DllImport(LIBNAME)]
  599. private static extern void ximgproc_RICInterpolator_setUseGlobalSmootherFilter_10(IntPtr nativeObj, [MarshalAs(UnmanagedType.U1)] bool use_FGS);
  600. [DllImport(LIBNAME)]
  601. private static extern void ximgproc_RICInterpolator_setUseGlobalSmootherFilter_11(IntPtr nativeObj);
  602. // C++: bool cv::ximgproc::RICInterpolator::getUseGlobalSmootherFilter()
  603. [DllImport(LIBNAME)]
  604. [return: MarshalAs(UnmanagedType.U1)]
  605. private static extern bool ximgproc_RICInterpolator_getUseGlobalSmootherFilter_10(IntPtr nativeObj);
  606. // C++: void cv::ximgproc::RICInterpolator::setFGSLambda(float lambda = 500.f)
  607. [DllImport(LIBNAME)]
  608. private static extern void ximgproc_RICInterpolator_setFGSLambda_10(IntPtr nativeObj, float lambda);
  609. [DllImport(LIBNAME)]
  610. private static extern void ximgproc_RICInterpolator_setFGSLambda_11(IntPtr nativeObj);
  611. // C++: float cv::ximgproc::RICInterpolator::getFGSLambda()
  612. [DllImport(LIBNAME)]
  613. private static extern float ximgproc_RICInterpolator_getFGSLambda_10(IntPtr nativeObj);
  614. // C++: void cv::ximgproc::RICInterpolator::setFGSSigma(float sigma = 1.5f)
  615. [DllImport(LIBNAME)]
  616. private static extern void ximgproc_RICInterpolator_setFGSSigma_10(IntPtr nativeObj, float sigma);
  617. [DllImport(LIBNAME)]
  618. private static extern void ximgproc_RICInterpolator_setFGSSigma_11(IntPtr nativeObj);
  619. // C++: float cv::ximgproc::RICInterpolator::getFGSSigma()
  620. [DllImport(LIBNAME)]
  621. private static extern float ximgproc_RICInterpolator_getFGSSigma_10(IntPtr nativeObj);
  622. // native support for java finalize()
  623. [DllImport(LIBNAME)]
  624. private static extern void ximgproc_RICInterpolator_delete(IntPtr nativeObj);
  625. }
  626. }