Bgsegm.cs 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using OpenCVForUnity.VideoModule;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Runtime.InteropServices;
  7. namespace OpenCVForUnity.BgsegmModule
  8. {
  9. // C++: class Bgsegm
  10. public class Bgsegm
  11. {
  12. // C++: enum cv.bgsegm.LSBPCameraMotionCompensation
  13. public const int LSBP_CAMERA_MOTION_COMPENSATION_NONE = 0;
  14. public const int LSBP_CAMERA_MOTION_COMPENSATION_LK = 0 + 1;
  15. //
  16. // C++: Ptr_BackgroundSubtractorMOG cv::bgsegm::createBackgroundSubtractorMOG(int history = 200, int nmixtures = 5, double backgroundRatio = 0.7, double noiseSigma = 0)
  17. //
  18. /**
  19. * Creates mixture-of-gaussian background subtractor
  20. *
  21. * param history Length of the history.
  22. * param nmixtures Number of Gaussian mixtures.
  23. * param backgroundRatio Background ratio.
  24. * param noiseSigma Noise strength (standard deviation of the brightness or each color channel). 0
  25. * means some automatic value.
  26. * return automatically generated
  27. */
  28. public static BackgroundSubtractorMOG createBackgroundSubtractorMOG(int history, int nmixtures, double backgroundRatio, double noiseSigma)
  29. {
  30. return BackgroundSubtractorMOG.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorMOG_10(history, nmixtures, backgroundRatio, noiseSigma)));
  31. }
  32. /**
  33. * Creates mixture-of-gaussian background subtractor
  34. *
  35. * param history Length of the history.
  36. * param nmixtures Number of Gaussian mixtures.
  37. * param backgroundRatio Background ratio.
  38. * means some automatic value.
  39. * return automatically generated
  40. */
  41. public static BackgroundSubtractorMOG createBackgroundSubtractorMOG(int history, int nmixtures, double backgroundRatio)
  42. {
  43. return BackgroundSubtractorMOG.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorMOG_11(history, nmixtures, backgroundRatio)));
  44. }
  45. /**
  46. * Creates mixture-of-gaussian background subtractor
  47. *
  48. * param history Length of the history.
  49. * param nmixtures Number of Gaussian mixtures.
  50. * means some automatic value.
  51. * return automatically generated
  52. */
  53. public static BackgroundSubtractorMOG createBackgroundSubtractorMOG(int history, int nmixtures)
  54. {
  55. return BackgroundSubtractorMOG.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorMOG_12(history, nmixtures)));
  56. }
  57. /**
  58. * Creates mixture-of-gaussian background subtractor
  59. *
  60. * param history Length of the history.
  61. * means some automatic value.
  62. * return automatically generated
  63. */
  64. public static BackgroundSubtractorMOG createBackgroundSubtractorMOG(int history)
  65. {
  66. return BackgroundSubtractorMOG.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorMOG_13(history)));
  67. }
  68. /**
  69. * Creates mixture-of-gaussian background subtractor
  70. *
  71. * means some automatic value.
  72. * return automatically generated
  73. */
  74. public static BackgroundSubtractorMOG createBackgroundSubtractorMOG()
  75. {
  76. return BackgroundSubtractorMOG.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorMOG_14()));
  77. }
  78. //
  79. // C++: Ptr_BackgroundSubtractorGMG cv::bgsegm::createBackgroundSubtractorGMG(int initializationFrames = 120, double decisionThreshold = 0.8)
  80. //
  81. /**
  82. * Creates a GMG Background Subtractor
  83. *
  84. * param initializationFrames number of frames used to initialize the background models.
  85. * param decisionThreshold Threshold value, above which it is marked foreground, else background.
  86. * return automatically generated
  87. */
  88. public static BackgroundSubtractorGMG createBackgroundSubtractorGMG(int initializationFrames, double decisionThreshold)
  89. {
  90. return BackgroundSubtractorGMG.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGMG_10(initializationFrames, decisionThreshold)));
  91. }
  92. /**
  93. * Creates a GMG Background Subtractor
  94. *
  95. * param initializationFrames number of frames used to initialize the background models.
  96. * return automatically generated
  97. */
  98. public static BackgroundSubtractorGMG createBackgroundSubtractorGMG(int initializationFrames)
  99. {
  100. return BackgroundSubtractorGMG.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGMG_11(initializationFrames)));
  101. }
  102. /**
  103. * Creates a GMG Background Subtractor
  104. *
  105. * return automatically generated
  106. */
  107. public static BackgroundSubtractorGMG createBackgroundSubtractorGMG()
  108. {
  109. return BackgroundSubtractorGMG.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGMG_12()));
  110. }
  111. //
  112. // C++: Ptr_BackgroundSubtractorCNT cv::bgsegm::createBackgroundSubtractorCNT(int minPixelStability = 15, bool useHistory = true, int maxPixelStability = 15*60, bool isParallel = true)
  113. //
  114. /**
  115. * Creates a CNT Background Subtractor
  116. *
  117. * param minPixelStability number of frames with same pixel color to consider stable
  118. * param useHistory determines if we're giving a pixel credit for being stable for a long time
  119. * param maxPixelStability maximum allowed credit for a pixel in history
  120. * param isParallel determines if we're parallelizing the algorithm
  121. * return automatically generated
  122. */
  123. public static BackgroundSubtractorCNT createBackgroundSubtractorCNT(int minPixelStability, bool useHistory, int maxPixelStability, bool isParallel)
  124. {
  125. return BackgroundSubtractorCNT.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorCNT_10(minPixelStability, useHistory, maxPixelStability, isParallel)));
  126. }
  127. /**
  128. * Creates a CNT Background Subtractor
  129. *
  130. * param minPixelStability number of frames with same pixel color to consider stable
  131. * param useHistory determines if we're giving a pixel credit for being stable for a long time
  132. * param maxPixelStability maximum allowed credit for a pixel in history
  133. * return automatically generated
  134. */
  135. public static BackgroundSubtractorCNT createBackgroundSubtractorCNT(int minPixelStability, bool useHistory, int maxPixelStability)
  136. {
  137. return BackgroundSubtractorCNT.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorCNT_11(minPixelStability, useHistory, maxPixelStability)));
  138. }
  139. /**
  140. * Creates a CNT Background Subtractor
  141. *
  142. * param minPixelStability number of frames with same pixel color to consider stable
  143. * param useHistory determines if we're giving a pixel credit for being stable for a long time
  144. * return automatically generated
  145. */
  146. public static BackgroundSubtractorCNT createBackgroundSubtractorCNT(int minPixelStability, bool useHistory)
  147. {
  148. return BackgroundSubtractorCNT.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorCNT_12(minPixelStability, useHistory)));
  149. }
  150. /**
  151. * Creates a CNT Background Subtractor
  152. *
  153. * param minPixelStability number of frames with same pixel color to consider stable
  154. * return automatically generated
  155. */
  156. public static BackgroundSubtractorCNT createBackgroundSubtractorCNT(int minPixelStability)
  157. {
  158. return BackgroundSubtractorCNT.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorCNT_13(minPixelStability)));
  159. }
  160. /**
  161. * Creates a CNT Background Subtractor
  162. *
  163. * return automatically generated
  164. */
  165. public static BackgroundSubtractorCNT createBackgroundSubtractorCNT()
  166. {
  167. return BackgroundSubtractorCNT.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorCNT_14()));
  168. }
  169. //
  170. // C++: Ptr_BackgroundSubtractorGSOC cv::bgsegm::createBackgroundSubtractorGSOC(int mc = LSBP_CAMERA_MOTION_COMPENSATION_NONE, int nSamples = 20, float replaceRate = 0.003f, float propagationRate = 0.01f, int hitsThreshold = 32, float alpha = 0.01f, float beta = 0.0022f, float blinkingSupressionDecay = 0.1f, float blinkingSupressionMultiplier = 0.1f, float noiseRemovalThresholdFacBG = 0.0004f, float noiseRemovalThresholdFacFG = 0.0008f)
  171. //
  172. /**
  173. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  174. *
  175. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  176. *
  177. * param mc Whether to use camera motion compensation.
  178. * param nSamples Number of samples to maintain at each point of the frame.
  179. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  180. * param propagationRate Probability of propagating to neighbors.
  181. * param hitsThreshold How many positives the sample must get before it will be considered as a possible replacement.
  182. * param alpha Scale coefficient for threshold.
  183. * param beta Bias coefficient for threshold.
  184. * param blinkingSupressionDecay Blinking supression decay factor.
  185. * param blinkingSupressionMultiplier Blinking supression multiplier.
  186. * param noiseRemovalThresholdFacBG Strength of the noise removal for background points.
  187. * param noiseRemovalThresholdFacFG Strength of the noise removal for foreground points.
  188. * return automatically generated
  189. */
  190. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta, float blinkingSupressionDecay, float blinkingSupressionMultiplier, float noiseRemovalThresholdFacBG, float noiseRemovalThresholdFacFG)
  191. {
  192. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_10(mc, nSamples, replaceRate, propagationRate, hitsThreshold, alpha, beta, blinkingSupressionDecay, blinkingSupressionMultiplier, noiseRemovalThresholdFacBG, noiseRemovalThresholdFacFG)));
  193. }
  194. /**
  195. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  196. *
  197. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  198. *
  199. * param mc Whether to use camera motion compensation.
  200. * param nSamples Number of samples to maintain at each point of the frame.
  201. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  202. * param propagationRate Probability of propagating to neighbors.
  203. * param hitsThreshold How many positives the sample must get before it will be considered as a possible replacement.
  204. * param alpha Scale coefficient for threshold.
  205. * param beta Bias coefficient for threshold.
  206. * param blinkingSupressionDecay Blinking supression decay factor.
  207. * param blinkingSupressionMultiplier Blinking supression multiplier.
  208. * param noiseRemovalThresholdFacBG Strength of the noise removal for background points.
  209. * return automatically generated
  210. */
  211. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta, float blinkingSupressionDecay, float blinkingSupressionMultiplier, float noiseRemovalThresholdFacBG)
  212. {
  213. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_11(mc, nSamples, replaceRate, propagationRate, hitsThreshold, alpha, beta, blinkingSupressionDecay, blinkingSupressionMultiplier, noiseRemovalThresholdFacBG)));
  214. }
  215. /**
  216. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  217. *
  218. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  219. *
  220. * param mc Whether to use camera motion compensation.
  221. * param nSamples Number of samples to maintain at each point of the frame.
  222. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  223. * param propagationRate Probability of propagating to neighbors.
  224. * param hitsThreshold How many positives the sample must get before it will be considered as a possible replacement.
  225. * param alpha Scale coefficient for threshold.
  226. * param beta Bias coefficient for threshold.
  227. * param blinkingSupressionDecay Blinking supression decay factor.
  228. * param blinkingSupressionMultiplier Blinking supression multiplier.
  229. * return automatically generated
  230. */
  231. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta, float blinkingSupressionDecay, float blinkingSupressionMultiplier)
  232. {
  233. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_12(mc, nSamples, replaceRate, propagationRate, hitsThreshold, alpha, beta, blinkingSupressionDecay, blinkingSupressionMultiplier)));
  234. }
  235. /**
  236. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  237. *
  238. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  239. *
  240. * param mc Whether to use camera motion compensation.
  241. * param nSamples Number of samples to maintain at each point of the frame.
  242. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  243. * param propagationRate Probability of propagating to neighbors.
  244. * param hitsThreshold How many positives the sample must get before it will be considered as a possible replacement.
  245. * param alpha Scale coefficient for threshold.
  246. * param beta Bias coefficient for threshold.
  247. * param blinkingSupressionDecay Blinking supression decay factor.
  248. * return automatically generated
  249. */
  250. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta, float blinkingSupressionDecay)
  251. {
  252. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_13(mc, nSamples, replaceRate, propagationRate, hitsThreshold, alpha, beta, blinkingSupressionDecay)));
  253. }
  254. /**
  255. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  256. *
  257. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  258. *
  259. * param mc Whether to use camera motion compensation.
  260. * param nSamples Number of samples to maintain at each point of the frame.
  261. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  262. * param propagationRate Probability of propagating to neighbors.
  263. * param hitsThreshold How many positives the sample must get before it will be considered as a possible replacement.
  264. * param alpha Scale coefficient for threshold.
  265. * param beta Bias coefficient for threshold.
  266. * return automatically generated
  267. */
  268. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta)
  269. {
  270. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_14(mc, nSamples, replaceRate, propagationRate, hitsThreshold, alpha, beta)));
  271. }
  272. /**
  273. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  274. *
  275. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  276. *
  277. * param mc Whether to use camera motion compensation.
  278. * param nSamples Number of samples to maintain at each point of the frame.
  279. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  280. * param propagationRate Probability of propagating to neighbors.
  281. * param hitsThreshold How many positives the sample must get before it will be considered as a possible replacement.
  282. * param alpha Scale coefficient for threshold.
  283. * return automatically generated
  284. */
  285. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha)
  286. {
  287. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_15(mc, nSamples, replaceRate, propagationRate, hitsThreshold, alpha)));
  288. }
  289. /**
  290. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  291. *
  292. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  293. *
  294. * param mc Whether to use camera motion compensation.
  295. * param nSamples Number of samples to maintain at each point of the frame.
  296. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  297. * param propagationRate Probability of propagating to neighbors.
  298. * param hitsThreshold How many positives the sample must get before it will be considered as a possible replacement.
  299. * return automatically generated
  300. */
  301. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold)
  302. {
  303. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_16(mc, nSamples, replaceRate, propagationRate, hitsThreshold)));
  304. }
  305. /**
  306. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  307. *
  308. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  309. *
  310. * param mc Whether to use camera motion compensation.
  311. * param nSamples Number of samples to maintain at each point of the frame.
  312. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  313. * param propagationRate Probability of propagating to neighbors.
  314. * return automatically generated
  315. */
  316. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate, float propagationRate)
  317. {
  318. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_17(mc, nSamples, replaceRate, propagationRate)));
  319. }
  320. /**
  321. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  322. *
  323. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  324. *
  325. * param mc Whether to use camera motion compensation.
  326. * param nSamples Number of samples to maintain at each point of the frame.
  327. * param replaceRate Probability of replacing the old sample - how fast the model will update itself.
  328. * return automatically generated
  329. */
  330. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples, float replaceRate)
  331. {
  332. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_18(mc, nSamples, replaceRate)));
  333. }
  334. /**
  335. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  336. *
  337. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  338. *
  339. * param mc Whether to use camera motion compensation.
  340. * param nSamples Number of samples to maintain at each point of the frame.
  341. * return automatically generated
  342. */
  343. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc, int nSamples)
  344. {
  345. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_19(mc, nSamples)));
  346. }
  347. /**
  348. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  349. *
  350. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  351. *
  352. * param mc Whether to use camera motion compensation.
  353. * return automatically generated
  354. */
  355. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC(int mc)
  356. {
  357. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_110(mc)));
  358. }
  359. /**
  360. * Creates an instance of BackgroundSubtractorGSOC algorithm.
  361. *
  362. * Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.
  363. *
  364. * return automatically generated
  365. */
  366. public static BackgroundSubtractorGSOC createBackgroundSubtractorGSOC()
  367. {
  368. return BackgroundSubtractorGSOC.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorGSOC_111()));
  369. }
  370. //
  371. // C++: Ptr_BackgroundSubtractorLSBP cv::bgsegm::createBackgroundSubtractorLSBP(int mc = LSBP_CAMERA_MOTION_COMPENSATION_NONE, int nSamples = 20, int LSBPRadius = 16, float Tlower = 2.0f, float Tupper = 32.0f, float Tinc = 1.0f, float Tdec = 0.05f, float Rscale = 10.0f, float Rincdec = 0.005f, float noiseRemovalThresholdFacBG = 0.0004f, float noiseRemovalThresholdFacFG = 0.0008f, int LSBPthreshold = 8, int minCount = 2)
  372. //
  373. /**
  374. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  375. *
  376. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  377. *
  378. * param mc Whether to use camera motion compensation.
  379. * param nSamples Number of samples to maintain at each point of the frame.
  380. * param LSBPRadius LSBP descriptor radius.
  381. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  382. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  383. * param Tinc Increase step for T-values. See CITE: LGuo2016 for details.
  384. * param Tdec Decrease step for T-values. See CITE: LGuo2016 for details.
  385. * param Rscale Scale coefficient for threshold values.
  386. * param Rincdec Increase/Decrease step for threshold values.
  387. * param noiseRemovalThresholdFacBG Strength of the noise removal for background points.
  388. * param noiseRemovalThresholdFacFG Strength of the noise removal for foreground points.
  389. * param LSBPthreshold Threshold for LSBP binary string.
  390. * param minCount Minimal number of matches for sample to be considered as foreground.
  391. * return automatically generated
  392. */
  393. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec, float noiseRemovalThresholdFacBG, float noiseRemovalThresholdFacFG, int LSBPthreshold, int minCount)
  394. {
  395. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_10(mc, nSamples, LSBPRadius, Tlower, Tupper, Tinc, Tdec, Rscale, Rincdec, noiseRemovalThresholdFacBG, noiseRemovalThresholdFacFG, LSBPthreshold, minCount)));
  396. }
  397. /**
  398. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  399. *
  400. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  401. *
  402. * param mc Whether to use camera motion compensation.
  403. * param nSamples Number of samples to maintain at each point of the frame.
  404. * param LSBPRadius LSBP descriptor radius.
  405. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  406. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  407. * param Tinc Increase step for T-values. See CITE: LGuo2016 for details.
  408. * param Tdec Decrease step for T-values. See CITE: LGuo2016 for details.
  409. * param Rscale Scale coefficient for threshold values.
  410. * param Rincdec Increase/Decrease step for threshold values.
  411. * param noiseRemovalThresholdFacBG Strength of the noise removal for background points.
  412. * param noiseRemovalThresholdFacFG Strength of the noise removal for foreground points.
  413. * param LSBPthreshold Threshold for LSBP binary string.
  414. * return automatically generated
  415. */
  416. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec, float noiseRemovalThresholdFacBG, float noiseRemovalThresholdFacFG, int LSBPthreshold)
  417. {
  418. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_11(mc, nSamples, LSBPRadius, Tlower, Tupper, Tinc, Tdec, Rscale, Rincdec, noiseRemovalThresholdFacBG, noiseRemovalThresholdFacFG, LSBPthreshold)));
  419. }
  420. /**
  421. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  422. *
  423. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  424. *
  425. * param mc Whether to use camera motion compensation.
  426. * param nSamples Number of samples to maintain at each point of the frame.
  427. * param LSBPRadius LSBP descriptor radius.
  428. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  429. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  430. * param Tinc Increase step for T-values. See CITE: LGuo2016 for details.
  431. * param Tdec Decrease step for T-values. See CITE: LGuo2016 for details.
  432. * param Rscale Scale coefficient for threshold values.
  433. * param Rincdec Increase/Decrease step for threshold values.
  434. * param noiseRemovalThresholdFacBG Strength of the noise removal for background points.
  435. * param noiseRemovalThresholdFacFG Strength of the noise removal for foreground points.
  436. * return automatically generated
  437. */
  438. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec, float noiseRemovalThresholdFacBG, float noiseRemovalThresholdFacFG)
  439. {
  440. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_12(mc, nSamples, LSBPRadius, Tlower, Tupper, Tinc, Tdec, Rscale, Rincdec, noiseRemovalThresholdFacBG, noiseRemovalThresholdFacFG)));
  441. }
  442. /**
  443. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  444. *
  445. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  446. *
  447. * param mc Whether to use camera motion compensation.
  448. * param nSamples Number of samples to maintain at each point of the frame.
  449. * param LSBPRadius LSBP descriptor radius.
  450. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  451. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  452. * param Tinc Increase step for T-values. See CITE: LGuo2016 for details.
  453. * param Tdec Decrease step for T-values. See CITE: LGuo2016 for details.
  454. * param Rscale Scale coefficient for threshold values.
  455. * param Rincdec Increase/Decrease step for threshold values.
  456. * param noiseRemovalThresholdFacBG Strength of the noise removal for background points.
  457. * return automatically generated
  458. */
  459. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec, float noiseRemovalThresholdFacBG)
  460. {
  461. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_13(mc, nSamples, LSBPRadius, Tlower, Tupper, Tinc, Tdec, Rscale, Rincdec, noiseRemovalThresholdFacBG)));
  462. }
  463. /**
  464. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  465. *
  466. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  467. *
  468. * param mc Whether to use camera motion compensation.
  469. * param nSamples Number of samples to maintain at each point of the frame.
  470. * param LSBPRadius LSBP descriptor radius.
  471. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  472. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  473. * param Tinc Increase step for T-values. See CITE: LGuo2016 for details.
  474. * param Tdec Decrease step for T-values. See CITE: LGuo2016 for details.
  475. * param Rscale Scale coefficient for threshold values.
  476. * param Rincdec Increase/Decrease step for threshold values.
  477. * return automatically generated
  478. */
  479. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec)
  480. {
  481. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_14(mc, nSamples, LSBPRadius, Tlower, Tupper, Tinc, Tdec, Rscale, Rincdec)));
  482. }
  483. /**
  484. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  485. *
  486. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  487. *
  488. * param mc Whether to use camera motion compensation.
  489. * param nSamples Number of samples to maintain at each point of the frame.
  490. * param LSBPRadius LSBP descriptor radius.
  491. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  492. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  493. * param Tinc Increase step for T-values. See CITE: LGuo2016 for details.
  494. * param Tdec Decrease step for T-values. See CITE: LGuo2016 for details.
  495. * param Rscale Scale coefficient for threshold values.
  496. * return automatically generated
  497. */
  498. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale)
  499. {
  500. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_15(mc, nSamples, LSBPRadius, Tlower, Tupper, Tinc, Tdec, Rscale)));
  501. }
  502. /**
  503. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  504. *
  505. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  506. *
  507. * param mc Whether to use camera motion compensation.
  508. * param nSamples Number of samples to maintain at each point of the frame.
  509. * param LSBPRadius LSBP descriptor radius.
  510. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  511. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  512. * param Tinc Increase step for T-values. See CITE: LGuo2016 for details.
  513. * param Tdec Decrease step for T-values. See CITE: LGuo2016 for details.
  514. * return automatically generated
  515. */
  516. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec)
  517. {
  518. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_16(mc, nSamples, LSBPRadius, Tlower, Tupper, Tinc, Tdec)));
  519. }
  520. /**
  521. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  522. *
  523. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  524. *
  525. * param mc Whether to use camera motion compensation.
  526. * param nSamples Number of samples to maintain at each point of the frame.
  527. * param LSBPRadius LSBP descriptor radius.
  528. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  529. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  530. * param Tinc Increase step for T-values. See CITE: LGuo2016 for details.
  531. * return automatically generated
  532. */
  533. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc)
  534. {
  535. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_17(mc, nSamples, LSBPRadius, Tlower, Tupper, Tinc)));
  536. }
  537. /**
  538. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  539. *
  540. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  541. *
  542. * param mc Whether to use camera motion compensation.
  543. * param nSamples Number of samples to maintain at each point of the frame.
  544. * param LSBPRadius LSBP descriptor radius.
  545. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  546. * param Tupper Upper bound for T-values. See CITE: LGuo2016 for details.
  547. * return automatically generated
  548. */
  549. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper)
  550. {
  551. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_18(mc, nSamples, LSBPRadius, Tlower, Tupper)));
  552. }
  553. /**
  554. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  555. *
  556. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  557. *
  558. * param mc Whether to use camera motion compensation.
  559. * param nSamples Number of samples to maintain at each point of the frame.
  560. * param LSBPRadius LSBP descriptor radius.
  561. * param Tlower Lower bound for T-values. See CITE: LGuo2016 for details.
  562. * return automatically generated
  563. */
  564. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius, float Tlower)
  565. {
  566. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_19(mc, nSamples, LSBPRadius, Tlower)));
  567. }
  568. /**
  569. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  570. *
  571. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  572. *
  573. * param mc Whether to use camera motion compensation.
  574. * param nSamples Number of samples to maintain at each point of the frame.
  575. * param LSBPRadius LSBP descriptor radius.
  576. * return automatically generated
  577. */
  578. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples, int LSBPRadius)
  579. {
  580. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_110(mc, nSamples, LSBPRadius)));
  581. }
  582. /**
  583. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  584. *
  585. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  586. *
  587. * param mc Whether to use camera motion compensation.
  588. * param nSamples Number of samples to maintain at each point of the frame.
  589. * return automatically generated
  590. */
  591. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc, int nSamples)
  592. {
  593. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_111(mc, nSamples)));
  594. }
  595. /**
  596. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  597. *
  598. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  599. *
  600. * param mc Whether to use camera motion compensation.
  601. * return automatically generated
  602. */
  603. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP(int mc)
  604. {
  605. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_112(mc)));
  606. }
  607. /**
  608. * Creates an instance of BackgroundSubtractorLSBP algorithm.
  609. *
  610. * Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at CITE: LGuo2016
  611. *
  612. * return automatically generated
  613. */
  614. public static BackgroundSubtractorLSBP createBackgroundSubtractorLSBP()
  615. {
  616. return BackgroundSubtractorLSBP.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createBackgroundSubtractorLSBP_113()));
  617. }
  618. //
  619. // C++: Ptr_SyntheticSequenceGenerator cv::bgsegm::createSyntheticSequenceGenerator(Mat background, Mat _object, double amplitude = 2.0, double wavelength = 20.0, double wavespeed = 0.2, double objspeed = 6.0)
  620. //
  621. /**
  622. * Creates an instance of SyntheticSequenceGenerator.
  623. *
  624. * param background Background image for object.
  625. * param amplitude Amplitude of wave distortion applied to background.
  626. * param wavelength Length of waves in distortion applied to background.
  627. * param wavespeed How fast waves will move.
  628. * param objspeed How fast object will fly over background.
  629. * param _object automatically generated
  630. * return automatically generated
  631. */
  632. public static SyntheticSequenceGenerator createSyntheticSequenceGenerator(Mat background, Mat _object, double amplitude, double wavelength, double wavespeed, double objspeed)
  633. {
  634. if (background != null) background.ThrowIfDisposed();
  635. if (_object != null) _object.ThrowIfDisposed();
  636. return SyntheticSequenceGenerator.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createSyntheticSequenceGenerator_10(background.nativeObj, _object.nativeObj, amplitude, wavelength, wavespeed, objspeed)));
  637. }
  638. /**
  639. * Creates an instance of SyntheticSequenceGenerator.
  640. *
  641. * param background Background image for object.
  642. * param amplitude Amplitude of wave distortion applied to background.
  643. * param wavelength Length of waves in distortion applied to background.
  644. * param wavespeed How fast waves will move.
  645. * param _object automatically generated
  646. * return automatically generated
  647. */
  648. public static SyntheticSequenceGenerator createSyntheticSequenceGenerator(Mat background, Mat _object, double amplitude, double wavelength, double wavespeed)
  649. {
  650. if (background != null) background.ThrowIfDisposed();
  651. if (_object != null) _object.ThrowIfDisposed();
  652. return SyntheticSequenceGenerator.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createSyntheticSequenceGenerator_11(background.nativeObj, _object.nativeObj, amplitude, wavelength, wavespeed)));
  653. }
  654. /**
  655. * Creates an instance of SyntheticSequenceGenerator.
  656. *
  657. * param background Background image for object.
  658. * param amplitude Amplitude of wave distortion applied to background.
  659. * param wavelength Length of waves in distortion applied to background.
  660. * param _object automatically generated
  661. * return automatically generated
  662. */
  663. public static SyntheticSequenceGenerator createSyntheticSequenceGenerator(Mat background, Mat _object, double amplitude, double wavelength)
  664. {
  665. if (background != null) background.ThrowIfDisposed();
  666. if (_object != null) _object.ThrowIfDisposed();
  667. return SyntheticSequenceGenerator.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createSyntheticSequenceGenerator_12(background.nativeObj, _object.nativeObj, amplitude, wavelength)));
  668. }
  669. /**
  670. * Creates an instance of SyntheticSequenceGenerator.
  671. *
  672. * param background Background image for object.
  673. * param amplitude Amplitude of wave distortion applied to background.
  674. * param _object automatically generated
  675. * return automatically generated
  676. */
  677. public static SyntheticSequenceGenerator createSyntheticSequenceGenerator(Mat background, Mat _object, double amplitude)
  678. {
  679. if (background != null) background.ThrowIfDisposed();
  680. if (_object != null) _object.ThrowIfDisposed();
  681. return SyntheticSequenceGenerator.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createSyntheticSequenceGenerator_13(background.nativeObj, _object.nativeObj, amplitude)));
  682. }
  683. /**
  684. * Creates an instance of SyntheticSequenceGenerator.
  685. *
  686. * param background Background image for object.
  687. * param _object automatically generated
  688. * return automatically generated
  689. */
  690. public static SyntheticSequenceGenerator createSyntheticSequenceGenerator(Mat background, Mat _object)
  691. {
  692. if (background != null) background.ThrowIfDisposed();
  693. if (_object != null) _object.ThrowIfDisposed();
  694. return SyntheticSequenceGenerator.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(bgsegm_Bgsegm_createSyntheticSequenceGenerator_14(background.nativeObj, _object.nativeObj)));
  695. }
  696. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  697. const string LIBNAME = "__Internal";
  698. #else
  699. const string LIBNAME = "opencvforunity";
  700. #endif
  701. // C++: Ptr_BackgroundSubtractorMOG cv::bgsegm::createBackgroundSubtractorMOG(int history = 200, int nmixtures = 5, double backgroundRatio = 0.7, double noiseSigma = 0)
  702. [DllImport(LIBNAME)]
  703. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorMOG_10(int history, int nmixtures, double backgroundRatio, double noiseSigma);
  704. [DllImport(LIBNAME)]
  705. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorMOG_11(int history, int nmixtures, double backgroundRatio);
  706. [DllImport(LIBNAME)]
  707. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorMOG_12(int history, int nmixtures);
  708. [DllImport(LIBNAME)]
  709. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorMOG_13(int history);
  710. [DllImport(LIBNAME)]
  711. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorMOG_14();
  712. // C++: Ptr_BackgroundSubtractorGMG cv::bgsegm::createBackgroundSubtractorGMG(int initializationFrames = 120, double decisionThreshold = 0.8)
  713. [DllImport(LIBNAME)]
  714. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGMG_10(int initializationFrames, double decisionThreshold);
  715. [DllImport(LIBNAME)]
  716. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGMG_11(int initializationFrames);
  717. [DllImport(LIBNAME)]
  718. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGMG_12();
  719. // C++: Ptr_BackgroundSubtractorCNT cv::bgsegm::createBackgroundSubtractorCNT(int minPixelStability = 15, bool useHistory = true, int maxPixelStability = 15*60, bool isParallel = true)
  720. [DllImport(LIBNAME)]
  721. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorCNT_10(int minPixelStability, [MarshalAs(UnmanagedType.U1)] bool useHistory, int maxPixelStability, [MarshalAs(UnmanagedType.U1)] bool isParallel);
  722. [DllImport(LIBNAME)]
  723. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorCNT_11(int minPixelStability, [MarshalAs(UnmanagedType.U1)] bool useHistory, int maxPixelStability);
  724. [DllImport(LIBNAME)]
  725. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorCNT_12(int minPixelStability, [MarshalAs(UnmanagedType.U1)] bool useHistory);
  726. [DllImport(LIBNAME)]
  727. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorCNT_13(int minPixelStability);
  728. [DllImport(LIBNAME)]
  729. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorCNT_14();
  730. // C++: Ptr_BackgroundSubtractorGSOC cv::bgsegm::createBackgroundSubtractorGSOC(int mc = LSBP_CAMERA_MOTION_COMPENSATION_NONE, int nSamples = 20, float replaceRate = 0.003f, float propagationRate = 0.01f, int hitsThreshold = 32, float alpha = 0.01f, float beta = 0.0022f, float blinkingSupressionDecay = 0.1f, float blinkingSupressionMultiplier = 0.1f, float noiseRemovalThresholdFacBG = 0.0004f, float noiseRemovalThresholdFacFG = 0.0008f)
  731. [DllImport(LIBNAME)]
  732. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_10(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta, float blinkingSupressionDecay, float blinkingSupressionMultiplier, float noiseRemovalThresholdFacBG, float noiseRemovalThresholdFacFG);
  733. [DllImport(LIBNAME)]
  734. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_11(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta, float blinkingSupressionDecay, float blinkingSupressionMultiplier, float noiseRemovalThresholdFacBG);
  735. [DllImport(LIBNAME)]
  736. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_12(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta, float blinkingSupressionDecay, float blinkingSupressionMultiplier);
  737. [DllImport(LIBNAME)]
  738. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_13(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta, float blinkingSupressionDecay);
  739. [DllImport(LIBNAME)]
  740. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_14(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha, float beta);
  741. [DllImport(LIBNAME)]
  742. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_15(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold, float alpha);
  743. [DllImport(LIBNAME)]
  744. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_16(int mc, int nSamples, float replaceRate, float propagationRate, int hitsThreshold);
  745. [DllImport(LIBNAME)]
  746. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_17(int mc, int nSamples, float replaceRate, float propagationRate);
  747. [DllImport(LIBNAME)]
  748. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_18(int mc, int nSamples, float replaceRate);
  749. [DllImport(LIBNAME)]
  750. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_19(int mc, int nSamples);
  751. [DllImport(LIBNAME)]
  752. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_110(int mc);
  753. [DllImport(LIBNAME)]
  754. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorGSOC_111();
  755. // C++: Ptr_BackgroundSubtractorLSBP cv::bgsegm::createBackgroundSubtractorLSBP(int mc = LSBP_CAMERA_MOTION_COMPENSATION_NONE, int nSamples = 20, int LSBPRadius = 16, float Tlower = 2.0f, float Tupper = 32.0f, float Tinc = 1.0f, float Tdec = 0.05f, float Rscale = 10.0f, float Rincdec = 0.005f, float noiseRemovalThresholdFacBG = 0.0004f, float noiseRemovalThresholdFacFG = 0.0008f, int LSBPthreshold = 8, int minCount = 2)
  756. [DllImport(LIBNAME)]
  757. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_10(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec, float noiseRemovalThresholdFacBG, float noiseRemovalThresholdFacFG, int LSBPthreshold, int minCount);
  758. [DllImport(LIBNAME)]
  759. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_11(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec, float noiseRemovalThresholdFacBG, float noiseRemovalThresholdFacFG, int LSBPthreshold);
  760. [DllImport(LIBNAME)]
  761. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_12(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec, float noiseRemovalThresholdFacBG, float noiseRemovalThresholdFacFG);
  762. [DllImport(LIBNAME)]
  763. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_13(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec, float noiseRemovalThresholdFacBG);
  764. [DllImport(LIBNAME)]
  765. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_14(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale, float Rincdec);
  766. [DllImport(LIBNAME)]
  767. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_15(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec, float Rscale);
  768. [DllImport(LIBNAME)]
  769. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_16(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc, float Tdec);
  770. [DllImport(LIBNAME)]
  771. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_17(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper, float Tinc);
  772. [DllImport(LIBNAME)]
  773. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_18(int mc, int nSamples, int LSBPRadius, float Tlower, float Tupper);
  774. [DllImport(LIBNAME)]
  775. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_19(int mc, int nSamples, int LSBPRadius, float Tlower);
  776. [DllImport(LIBNAME)]
  777. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_110(int mc, int nSamples, int LSBPRadius);
  778. [DllImport(LIBNAME)]
  779. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_111(int mc, int nSamples);
  780. [DllImport(LIBNAME)]
  781. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_112(int mc);
  782. [DllImport(LIBNAME)]
  783. private static extern IntPtr bgsegm_Bgsegm_createBackgroundSubtractorLSBP_113();
  784. // C++: Ptr_SyntheticSequenceGenerator cv::bgsegm::createSyntheticSequenceGenerator(Mat background, Mat _object, double amplitude = 2.0, double wavelength = 20.0, double wavespeed = 0.2, double objspeed = 6.0)
  785. [DllImport(LIBNAME)]
  786. private static extern IntPtr bgsegm_Bgsegm_createSyntheticSequenceGenerator_10(IntPtr background_nativeObj, IntPtr _object_nativeObj, double amplitude, double wavelength, double wavespeed, double objspeed);
  787. [DllImport(LIBNAME)]
  788. private static extern IntPtr bgsegm_Bgsegm_createSyntheticSequenceGenerator_11(IntPtr background_nativeObj, IntPtr _object_nativeObj, double amplitude, double wavelength, double wavespeed);
  789. [DllImport(LIBNAME)]
  790. private static extern IntPtr bgsegm_Bgsegm_createSyntheticSequenceGenerator_12(IntPtr background_nativeObj, IntPtr _object_nativeObj, double amplitude, double wavelength);
  791. [DllImport(LIBNAME)]
  792. private static extern IntPtr bgsegm_Bgsegm_createSyntheticSequenceGenerator_13(IntPtr background_nativeObj, IntPtr _object_nativeObj, double amplitude);
  793. [DllImport(LIBNAME)]
  794. private static extern IntPtr bgsegm_Bgsegm_createSyntheticSequenceGenerator_14(IntPtr background_nativeObj, IntPtr _object_nativeObj);
  795. }
  796. }