Video.html 109 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_312) on Wed Jun 28 12:47:24 UTC 2023 -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <title>Video (OpenCV 4.8.0 Java documentation)</title>
  8. <meta name="date" content="2023-06-28">
  9. <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
  10. <script type="text/javascript" src="../../../script.js"></script>
  11. </head>
  12. <body>
  13. <script type="text/javascript"><!--
  14. try {
  15. if (location.href.indexOf('is-external=true') == -1) {
  16. parent.document.title="Video (OpenCV 4.8.0 Java documentation)";
  17. }
  18. }
  19. catch(err) {
  20. }
  21. //-->
  22. var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9};
  23. var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
  24. var altColor = "altColor";
  25. var rowColor = "rowColor";
  26. var tableTab = "tableTab";
  27. var activeTableTab = "activeTableTab";
  28. </script>
  29. <noscript>
  30. <div>JavaScript is disabled on your browser.</div>
  31. </noscript>
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <div class="topNav"><a name="navbar.top">
  34. <!-- -->
  35. </a>
  36. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  37. <a name="navbar.top.firstrow">
  38. <!-- -->
  39. </a>
  40. <ul class="navList" title="Navigation">
  41. <li><a href="../../../overview-summary.html">Overview</a></li>
  42. <li><a href="package-summary.html">Package</a></li>
  43. <li class="navBarCell1Rev">Class</li>
  44. <li><a href="package-tree.html">Tree</a></li>
  45. <li><a href="../../../index-all.html">Index</a></li>
  46. <li><a href="../../../help-doc.html">Help</a></li>
  47. </ul>
  48. <div class="aboutLanguage">
  49. <script>
  50. var url = window.location.href;
  51. var pos = url.lastIndexOf('/javadoc/');
  52. url = pos >= 0 ? (url.substring(0, pos) + '/javadoc/mymath.js') : (window.location.origin + '/mymath.js');
  53. var script = document.createElement('script');
  54. script.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML,' + url;
  55. document.getElementsByTagName('head')[0].appendChild(script);
  56. </script>
  57. </div>
  58. </div>
  59. <div class="subNav">
  60. <ul class="navList">
  61. <li><a href="../../../org/opencv/video/VariationalRefinement.html" title="class in org.opencv.video"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  62. <li>Next&nbsp;Class</li>
  63. </ul>
  64. <ul class="navList">
  65. <li><a href="../../../index.html?org/opencv/video/Video.html" target="_top">Frames</a></li>
  66. <li><a href="Video.html" target="_top">No&nbsp;Frames</a></li>
  67. </ul>
  68. <ul class="navList" id="allclasses_navbar_top">
  69. <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  70. </ul>
  71. <div>
  72. <script type="text/javascript"><!--
  73. allClassesLink = document.getElementById("allclasses_navbar_top");
  74. if(window==top) {
  75. allClassesLink.style.display = "block";
  76. }
  77. else {
  78. allClassesLink.style.display = "none";
  79. }
  80. //-->
  81. </script>
  82. </div>
  83. <div>
  84. <ul class="subNavList">
  85. <li>Summary:&nbsp;</li>
  86. <li>Nested&nbsp;|&nbsp;</li>
  87. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  88. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  89. <li><a href="#method.summary">Method</a></li>
  90. </ul>
  91. <ul class="subNavList">
  92. <li>Detail:&nbsp;</li>
  93. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  94. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  95. <li><a href="#method.detail">Method</a></li>
  96. </ul>
  97. </div>
  98. <a name="skip.navbar.top">
  99. <!-- -->
  100. </a></div>
  101. <!-- ========= END OF TOP NAVBAR ========= -->
  102. <!-- ======== START OF CLASS DATA ======== -->
  103. <div class="header">
  104. <div class="subTitle">org.opencv.video</div>
  105. <h2 title="Class Video" class="title">Class Video</h2>
  106. </div>
  107. <div class="contentContainer">
  108. <ul class="inheritance">
  109. <li>java.lang.Object</li>
  110. <li>
  111. <ul class="inheritance">
  112. <li>org.opencv.video.Video</li>
  113. </ul>
  114. </li>
  115. </ul>
  116. <div class="description">
  117. <ul class="blockList">
  118. <li class="blockList">
  119. <hr>
  120. <br>
  121. <pre>public class <span class="typeNameLabel">Video</span>
  122. extends java.lang.Object</pre>
  123. </li>
  124. </ul>
  125. </div>
  126. <div class="summary">
  127. <ul class="blockList">
  128. <li class="blockList">
  129. <!-- =========== FIELD SUMMARY =========== -->
  130. <ul class="blockList">
  131. <li class="blockList"><a name="field.summary">
  132. <!-- -->
  133. </a>
  134. <h3>Field Summary</h3>
  135. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  136. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  137. <tr>
  138. <th class="colFirst" scope="col">Modifier and Type</th>
  139. <th class="colLast" scope="col">Field and Description</th>
  140. </tr>
  141. <tr class="altColor">
  142. <td class="colFirst"><code>static int</code></td>
  143. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#MOTION_AFFINE">MOTION_AFFINE</a></span></code>&nbsp;</td>
  144. </tr>
  145. <tr class="rowColor">
  146. <td class="colFirst"><code>static int</code></td>
  147. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#MOTION_EUCLIDEAN">MOTION_EUCLIDEAN</a></span></code>&nbsp;</td>
  148. </tr>
  149. <tr class="altColor">
  150. <td class="colFirst"><code>static int</code></td>
  151. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#MOTION_HOMOGRAPHY">MOTION_HOMOGRAPHY</a></span></code>&nbsp;</td>
  152. </tr>
  153. <tr class="rowColor">
  154. <td class="colFirst"><code>static int</code></td>
  155. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#MOTION_TRANSLATION">MOTION_TRANSLATION</a></span></code>&nbsp;</td>
  156. </tr>
  157. <tr class="altColor">
  158. <td class="colFirst"><code>static int</code></td>
  159. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#OPTFLOW_FARNEBACK_GAUSSIAN">OPTFLOW_FARNEBACK_GAUSSIAN</a></span></code>&nbsp;</td>
  160. </tr>
  161. <tr class="rowColor">
  162. <td class="colFirst"><code>static int</code></td>
  163. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#OPTFLOW_LK_GET_MIN_EIGENVALS">OPTFLOW_LK_GET_MIN_EIGENVALS</a></span></code>&nbsp;</td>
  164. </tr>
  165. <tr class="altColor">
  166. <td class="colFirst"><code>static int</code></td>
  167. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#OPTFLOW_USE_INITIAL_FLOW">OPTFLOW_USE_INITIAL_FLOW</a></span></code>&nbsp;</td>
  168. </tr>
  169. <tr class="rowColor">
  170. <td class="colFirst"><code>static int</code></td>
  171. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#TrackerSamplerCSC_MODE_DETECT">TrackerSamplerCSC_MODE_DETECT</a></span></code>&nbsp;</td>
  172. </tr>
  173. <tr class="altColor">
  174. <td class="colFirst"><code>static int</code></td>
  175. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#TrackerSamplerCSC_MODE_INIT_NEG">TrackerSamplerCSC_MODE_INIT_NEG</a></span></code>&nbsp;</td>
  176. </tr>
  177. <tr class="rowColor">
  178. <td class="colFirst"><code>static int</code></td>
  179. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#TrackerSamplerCSC_MODE_INIT_POS">TrackerSamplerCSC_MODE_INIT_POS</a></span></code>&nbsp;</td>
  180. </tr>
  181. <tr class="altColor">
  182. <td class="colFirst"><code>static int</code></td>
  183. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#TrackerSamplerCSC_MODE_TRACK_NEG">TrackerSamplerCSC_MODE_TRACK_NEG</a></span></code>&nbsp;</td>
  184. </tr>
  185. <tr class="rowColor">
  186. <td class="colFirst"><code>static int</code></td>
  187. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#TrackerSamplerCSC_MODE_TRACK_POS">TrackerSamplerCSC_MODE_TRACK_POS</a></span></code>&nbsp;</td>
  188. </tr>
  189. </table>
  190. </li>
  191. </ul>
  192. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  193. <ul class="blockList">
  194. <li class="blockList"><a name="constructor.summary">
  195. <!-- -->
  196. </a>
  197. <h3>Constructor Summary</h3>
  198. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  199. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  200. <tr>
  201. <th class="colOne" scope="col">Constructor and Description</th>
  202. </tr>
  203. <tr class="altColor">
  204. <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#Video--">Video</a></span>()</code>&nbsp;</td>
  205. </tr>
  206. </table>
  207. </li>
  208. </ul>
  209. <!-- ========== METHOD SUMMARY =========== -->
  210. <ul class="blockList">
  211. <li class="blockList"><a name="method.summary">
  212. <!-- -->
  213. </a>
  214. <h3>Method Summary</h3>
  215. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  216. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  217. <tr>
  218. <th class="colFirst" scope="col">Modifier and Type</th>
  219. <th class="colLast" scope="col">Method and Description</th>
  220. </tr>
  221. <tr id="i0" class="altColor">
  222. <td class="colFirst"><code>static int</code></td>
  223. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-">buildOpticalFlowPyramid</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  224. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  225. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  226. int&nbsp;maxLevel)</code>
  227. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  228. </td>
  229. </tr>
  230. <tr id="i1" class="rowColor">
  231. <td class="colFirst"><code>static int</code></td>
  232. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-boolean-">buildOpticalFlowPyramid</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  233. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  234. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  235. int&nbsp;maxLevel,
  236. boolean&nbsp;withDerivatives)</code>
  237. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  238. </td>
  239. </tr>
  240. <tr id="i2" class="altColor">
  241. <td class="colFirst"><code>static int</code></td>
  242. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-boolean-int-">buildOpticalFlowPyramid</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  243. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  244. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  245. int&nbsp;maxLevel,
  246. boolean&nbsp;withDerivatives,
  247. int&nbsp;pyrBorder)</code>
  248. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  249. </td>
  250. </tr>
  251. <tr id="i3" class="rowColor">
  252. <td class="colFirst"><code>static int</code></td>
  253. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-boolean-int-int-">buildOpticalFlowPyramid</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  254. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  255. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  256. int&nbsp;maxLevel,
  257. boolean&nbsp;withDerivatives,
  258. int&nbsp;pyrBorder,
  259. int&nbsp;derivBorder)</code>
  260. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  261. </td>
  262. </tr>
  263. <tr id="i4" class="altColor">
  264. <td class="colFirst"><code>static int</code></td>
  265. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-boolean-int-int-boolean-">buildOpticalFlowPyramid</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  266. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  267. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  268. int&nbsp;maxLevel,
  269. boolean&nbsp;withDerivatives,
  270. int&nbsp;pyrBorder,
  271. int&nbsp;derivBorder,
  272. boolean&nbsp;tryReuseInputImage)</code>
  273. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  274. </td>
  275. </tr>
  276. <tr id="i5" class="rowColor">
  277. <td class="colFirst"><code>static void</code></td>
  278. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#calcOpticalFlowFarneback-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-double-int-int-int-int-double-int-">calcOpticalFlowFarneback</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prev,
  279. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;next,
  280. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;flow,
  281. double&nbsp;pyr_scale,
  282. int&nbsp;levels,
  283. int&nbsp;winsize,
  284. int&nbsp;iterations,
  285. int&nbsp;poly_n,
  286. double&nbsp;poly_sigma,
  287. int&nbsp;flags)</code>
  288. <div class="block">Computes a dense optical flow using the Gunnar Farneback's algorithm.</div>
  289. </td>
  290. </tr>
  291. <tr id="i6" class="altColor">
  292. <td class="colFirst"><code>static void</code></td>
  293. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-">calcOpticalFlowPyrLK</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  294. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  295. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  296. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  297. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  298. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err)</code>
  299. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  300. pyramids.</div>
  301. </td>
  302. </tr>
  303. <tr id="i7" class="rowColor">
  304. <td class="colFirst"><code>static void</code></td>
  305. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-">calcOpticalFlowPyrLK</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  306. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  307. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  308. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  309. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  310. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  311. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize)</code>
  312. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  313. pyramids.</div>
  314. </td>
  315. </tr>
  316. <tr id="i8" class="altColor">
  317. <td class="colFirst"><code>static void</code></td>
  318. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-int-">calcOpticalFlowPyrLK</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  319. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  320. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  321. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  322. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  323. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  324. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  325. int&nbsp;maxLevel)</code>
  326. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  327. pyramids.</div>
  328. </td>
  329. </tr>
  330. <tr id="i9" class="rowColor">
  331. <td class="colFirst"><code>static void</code></td>
  332. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-int-org.opencv.core.TermCriteria-">calcOpticalFlowPyrLK</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  333. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  334. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  335. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  336. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  337. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  338. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  339. int&nbsp;maxLevel,
  340. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria)</code>
  341. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  342. pyramids.</div>
  343. </td>
  344. </tr>
  345. <tr id="i10" class="altColor">
  346. <td class="colFirst"><code>static void</code></td>
  347. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-int-org.opencv.core.TermCriteria-int-">calcOpticalFlowPyrLK</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  348. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  349. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  350. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  351. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  352. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  353. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  354. int&nbsp;maxLevel,
  355. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria,
  356. int&nbsp;flags)</code>
  357. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  358. pyramids.</div>
  359. </td>
  360. </tr>
  361. <tr id="i11" class="rowColor">
  362. <td class="colFirst"><code>static void</code></td>
  363. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-int-org.opencv.core.TermCriteria-int-double-">calcOpticalFlowPyrLK</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  364. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  365. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  366. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  367. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  368. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  369. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  370. int&nbsp;maxLevel,
  371. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria,
  372. int&nbsp;flags,
  373. double&nbsp;minEigThreshold)</code>
  374. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  375. pyramids.</div>
  376. </td>
  377. </tr>
  378. <tr id="i12" class="altColor">
  379. <td class="colFirst"><code>static <a href="../../../org/opencv/core/RotatedRect.html" title="class in org.opencv.core">RotatedRect</a></code></td>
  380. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#CamShift-org.opencv.core.Mat-org.opencv.core.Rect-org.opencv.core.TermCriteria-">CamShift</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;probImage,
  381. <a href="../../../org/opencv/core/Rect.html" title="class in org.opencv.core">Rect</a>&nbsp;window,
  382. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria)</code>
  383. <div class="block">Finds an object center, size, and orientation.</div>
  384. </td>
  385. </tr>
  386. <tr id="i13" class="rowColor">
  387. <td class="colFirst"><code>static double</code></td>
  388. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#computeECC-org.opencv.core.Mat-org.opencv.core.Mat-">computeECC</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  389. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage)</code>
  390. <div class="block">Computes the Enhanced Correlation Coefficient value between two images CITE: EP08 .</div>
  391. </td>
  392. </tr>
  393. <tr id="i14" class="altColor">
  394. <td class="colFirst"><code>static double</code></td>
  395. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#computeECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-">computeECC</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  396. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  397. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputMask)</code>
  398. <div class="block">Computes the Enhanced Correlation Coefficient value between two images CITE: EP08 .</div>
  399. </td>
  400. </tr>
  401. <tr id="i15" class="rowColor">
  402. <td class="colFirst"><code>static <a href="../../../org/opencv/video/BackgroundSubtractorKNN.html" title="class in org.opencv.video">BackgroundSubtractorKNN</a></code></td>
  403. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#createBackgroundSubtractorKNN--">createBackgroundSubtractorKNN</a></span>()</code>
  404. <div class="block">Creates KNN Background Subtractor
  405. whether a pixel is close to that sample.</div>
  406. </td>
  407. </tr>
  408. <tr id="i16" class="altColor">
  409. <td class="colFirst"><code>static <a href="../../../org/opencv/video/BackgroundSubtractorKNN.html" title="class in org.opencv.video">BackgroundSubtractorKNN</a></code></td>
  410. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#createBackgroundSubtractorKNN-int-">createBackgroundSubtractorKNN</a></span>(int&nbsp;history)</code>
  411. <div class="block">Creates KNN Background Subtractor</div>
  412. </td>
  413. </tr>
  414. <tr id="i17" class="rowColor">
  415. <td class="colFirst"><code>static <a href="../../../org/opencv/video/BackgroundSubtractorKNN.html" title="class in org.opencv.video">BackgroundSubtractorKNN</a></code></td>
  416. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#createBackgroundSubtractorKNN-int-double-">createBackgroundSubtractorKNN</a></span>(int&nbsp;history,
  417. double&nbsp;dist2Threshold)</code>
  418. <div class="block">Creates KNN Background Subtractor</div>
  419. </td>
  420. </tr>
  421. <tr id="i18" class="altColor">
  422. <td class="colFirst"><code>static <a href="../../../org/opencv/video/BackgroundSubtractorKNN.html" title="class in org.opencv.video">BackgroundSubtractorKNN</a></code></td>
  423. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#createBackgroundSubtractorKNN-int-double-boolean-">createBackgroundSubtractorKNN</a></span>(int&nbsp;history,
  424. double&nbsp;dist2Threshold,
  425. boolean&nbsp;detectShadows)</code>
  426. <div class="block">Creates KNN Background Subtractor</div>
  427. </td>
  428. </tr>
  429. <tr id="i19" class="rowColor">
  430. <td class="colFirst"><code>static <a href="../../../org/opencv/video/BackgroundSubtractorMOG2.html" title="class in org.opencv.video">BackgroundSubtractorMOG2</a></code></td>
  431. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#createBackgroundSubtractorMOG2--">createBackgroundSubtractorMOG2</a></span>()</code>
  432. <div class="block">Creates MOG2 Background Subtractor
  433. to decide whether a pixel is well described by the background model.</div>
  434. </td>
  435. </tr>
  436. <tr id="i20" class="altColor">
  437. <td class="colFirst"><code>static <a href="../../../org/opencv/video/BackgroundSubtractorMOG2.html" title="class in org.opencv.video">BackgroundSubtractorMOG2</a></code></td>
  438. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#createBackgroundSubtractorMOG2-int-">createBackgroundSubtractorMOG2</a></span>(int&nbsp;history)</code>
  439. <div class="block">Creates MOG2 Background Subtractor</div>
  440. </td>
  441. </tr>
  442. <tr id="i21" class="rowColor">
  443. <td class="colFirst"><code>static <a href="../../../org/opencv/video/BackgroundSubtractorMOG2.html" title="class in org.opencv.video">BackgroundSubtractorMOG2</a></code></td>
  444. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#createBackgroundSubtractorMOG2-int-double-">createBackgroundSubtractorMOG2</a></span>(int&nbsp;history,
  445. double&nbsp;varThreshold)</code>
  446. <div class="block">Creates MOG2 Background Subtractor</div>
  447. </td>
  448. </tr>
  449. <tr id="i22" class="altColor">
  450. <td class="colFirst"><code>static <a href="../../../org/opencv/video/BackgroundSubtractorMOG2.html" title="class in org.opencv.video">BackgroundSubtractorMOG2</a></code></td>
  451. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#createBackgroundSubtractorMOG2-int-double-boolean-">createBackgroundSubtractorMOG2</a></span>(int&nbsp;history,
  452. double&nbsp;varThreshold,
  453. boolean&nbsp;detectShadows)</code>
  454. <div class="block">Creates MOG2 Background Subtractor</div>
  455. </td>
  456. </tr>
  457. <tr id="i23" class="rowColor">
  458. <td class="colFirst"><code>static double</code></td>
  459. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-">findTransformECC</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  460. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  461. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix)</code>&nbsp;</td>
  462. </tr>
  463. <tr id="i24" class="altColor">
  464. <td class="colFirst"><code>static double</code></td>
  465. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-int-">findTransformECC</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  466. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  467. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix,
  468. int&nbsp;motionType)</code>&nbsp;</td>
  469. </tr>
  470. <tr id="i25" class="rowColor">
  471. <td class="colFirst"><code>static double</code></td>
  472. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-int-org.opencv.core.TermCriteria-">findTransformECC</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  473. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  474. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix,
  475. int&nbsp;motionType,
  476. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria)</code>&nbsp;</td>
  477. </tr>
  478. <tr id="i26" class="altColor">
  479. <td class="colFirst"><code>static double</code></td>
  480. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-int-org.opencv.core.TermCriteria-org.opencv.core.Mat-">findTransformECC</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  481. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  482. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix,
  483. int&nbsp;motionType,
  484. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria,
  485. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputMask)</code>&nbsp;</td>
  486. </tr>
  487. <tr id="i27" class="rowColor">
  488. <td class="colFirst"><code>static double</code></td>
  489. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-int-org.opencv.core.TermCriteria-org.opencv.core.Mat-int-">findTransformECC</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  490. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  491. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix,
  492. int&nbsp;motionType,
  493. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria,
  494. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputMask,
  495. int&nbsp;gaussFiltSize)</code>
  496. <div class="block">Finds the geometric transform (warp) between two images in terms of the ECC criterion CITE: EP08 .</div>
  497. </td>
  498. </tr>
  499. <tr id="i28" class="altColor">
  500. <td class="colFirst"><code>static int</code></td>
  501. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#meanShift-org.opencv.core.Mat-org.opencv.core.Rect-org.opencv.core.TermCriteria-">meanShift</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;probImage,
  502. <a href="../../../org/opencv/core/Rect.html" title="class in org.opencv.core">Rect</a>&nbsp;window,
  503. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria)</code>
  504. <div class="block">Finds an object on a back projection image.</div>
  505. </td>
  506. </tr>
  507. <tr id="i29" class="rowColor">
  508. <td class="colFirst"><code>static <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a></code></td>
  509. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#readOpticalFlow-java.lang.String-">readOpticalFlow</a></span>(java.lang.String&nbsp;path)</code>
  510. <div class="block">Read a .flo file</div>
  511. </td>
  512. </tr>
  513. <tr id="i30" class="altColor">
  514. <td class="colFirst"><code>static boolean</code></td>
  515. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/video/Video.html#writeOpticalFlow-java.lang.String-org.opencv.core.Mat-">writeOpticalFlow</a></span>(java.lang.String&nbsp;path,
  516. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;flow)</code>
  517. <div class="block">Write a .flo to disk</div>
  518. </td>
  519. </tr>
  520. </table>
  521. <ul class="blockList">
  522. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  523. <!-- -->
  524. </a>
  525. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  526. <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
  527. </ul>
  528. </li>
  529. </ul>
  530. </li>
  531. </ul>
  532. </div>
  533. <div class="details">
  534. <ul class="blockList">
  535. <li class="blockList">
  536. <!-- ============ FIELD DETAIL =========== -->
  537. <ul class="blockList">
  538. <li class="blockList"><a name="field.detail">
  539. <!-- -->
  540. </a>
  541. <h3>Field Detail</h3>
  542. <a name="MOTION_AFFINE">
  543. <!-- -->
  544. </a>
  545. <ul class="blockList">
  546. <li class="blockList">
  547. <h4>MOTION_AFFINE</h4>
  548. <pre>public static final&nbsp;int MOTION_AFFINE</pre>
  549. <dl>
  550. <dt><span class="seeLabel">See Also:</span></dt>
  551. <dd><a href="../../../constant-values.html#org.opencv.video.Video.MOTION_AFFINE">Constant Field Values</a></dd>
  552. </dl>
  553. </li>
  554. </ul>
  555. <a name="MOTION_EUCLIDEAN">
  556. <!-- -->
  557. </a>
  558. <ul class="blockList">
  559. <li class="blockList">
  560. <h4>MOTION_EUCLIDEAN</h4>
  561. <pre>public static final&nbsp;int MOTION_EUCLIDEAN</pre>
  562. <dl>
  563. <dt><span class="seeLabel">See Also:</span></dt>
  564. <dd><a href="../../../constant-values.html#org.opencv.video.Video.MOTION_EUCLIDEAN">Constant Field Values</a></dd>
  565. </dl>
  566. </li>
  567. </ul>
  568. <a name="MOTION_HOMOGRAPHY">
  569. <!-- -->
  570. </a>
  571. <ul class="blockList">
  572. <li class="blockList">
  573. <h4>MOTION_HOMOGRAPHY</h4>
  574. <pre>public static final&nbsp;int MOTION_HOMOGRAPHY</pre>
  575. <dl>
  576. <dt><span class="seeLabel">See Also:</span></dt>
  577. <dd><a href="../../../constant-values.html#org.opencv.video.Video.MOTION_HOMOGRAPHY">Constant Field Values</a></dd>
  578. </dl>
  579. </li>
  580. </ul>
  581. <a name="MOTION_TRANSLATION">
  582. <!-- -->
  583. </a>
  584. <ul class="blockList">
  585. <li class="blockList">
  586. <h4>MOTION_TRANSLATION</h4>
  587. <pre>public static final&nbsp;int MOTION_TRANSLATION</pre>
  588. <dl>
  589. <dt><span class="seeLabel">See Also:</span></dt>
  590. <dd><a href="../../../constant-values.html#org.opencv.video.Video.MOTION_TRANSLATION">Constant Field Values</a></dd>
  591. </dl>
  592. </li>
  593. </ul>
  594. <a name="OPTFLOW_FARNEBACK_GAUSSIAN">
  595. <!-- -->
  596. </a>
  597. <ul class="blockList">
  598. <li class="blockList">
  599. <h4>OPTFLOW_FARNEBACK_GAUSSIAN</h4>
  600. <pre>public static final&nbsp;int OPTFLOW_FARNEBACK_GAUSSIAN</pre>
  601. <dl>
  602. <dt><span class="seeLabel">See Also:</span></dt>
  603. <dd><a href="../../../constant-values.html#org.opencv.video.Video.OPTFLOW_FARNEBACK_GAUSSIAN">Constant Field Values</a></dd>
  604. </dl>
  605. </li>
  606. </ul>
  607. <a name="OPTFLOW_LK_GET_MIN_EIGENVALS">
  608. <!-- -->
  609. </a>
  610. <ul class="blockList">
  611. <li class="blockList">
  612. <h4>OPTFLOW_LK_GET_MIN_EIGENVALS</h4>
  613. <pre>public static final&nbsp;int OPTFLOW_LK_GET_MIN_EIGENVALS</pre>
  614. <dl>
  615. <dt><span class="seeLabel">See Also:</span></dt>
  616. <dd><a href="../../../constant-values.html#org.opencv.video.Video.OPTFLOW_LK_GET_MIN_EIGENVALS">Constant Field Values</a></dd>
  617. </dl>
  618. </li>
  619. </ul>
  620. <a name="OPTFLOW_USE_INITIAL_FLOW">
  621. <!-- -->
  622. </a>
  623. <ul class="blockList">
  624. <li class="blockList">
  625. <h4>OPTFLOW_USE_INITIAL_FLOW</h4>
  626. <pre>public static final&nbsp;int OPTFLOW_USE_INITIAL_FLOW</pre>
  627. <dl>
  628. <dt><span class="seeLabel">See Also:</span></dt>
  629. <dd><a href="../../../constant-values.html#org.opencv.video.Video.OPTFLOW_USE_INITIAL_FLOW">Constant Field Values</a></dd>
  630. </dl>
  631. </li>
  632. </ul>
  633. <a name="TrackerSamplerCSC_MODE_DETECT">
  634. <!-- -->
  635. </a>
  636. <ul class="blockList">
  637. <li class="blockList">
  638. <h4>TrackerSamplerCSC_MODE_DETECT</h4>
  639. <pre>public static final&nbsp;int TrackerSamplerCSC_MODE_DETECT</pre>
  640. <dl>
  641. <dt><span class="seeLabel">See Also:</span></dt>
  642. <dd><a href="../../../constant-values.html#org.opencv.video.Video.TrackerSamplerCSC_MODE_DETECT">Constant Field Values</a></dd>
  643. </dl>
  644. </li>
  645. </ul>
  646. <a name="TrackerSamplerCSC_MODE_INIT_NEG">
  647. <!-- -->
  648. </a>
  649. <ul class="blockList">
  650. <li class="blockList">
  651. <h4>TrackerSamplerCSC_MODE_INIT_NEG</h4>
  652. <pre>public static final&nbsp;int TrackerSamplerCSC_MODE_INIT_NEG</pre>
  653. <dl>
  654. <dt><span class="seeLabel">See Also:</span></dt>
  655. <dd><a href="../../../constant-values.html#org.opencv.video.Video.TrackerSamplerCSC_MODE_INIT_NEG">Constant Field Values</a></dd>
  656. </dl>
  657. </li>
  658. </ul>
  659. <a name="TrackerSamplerCSC_MODE_INIT_POS">
  660. <!-- -->
  661. </a>
  662. <ul class="blockList">
  663. <li class="blockList">
  664. <h4>TrackerSamplerCSC_MODE_INIT_POS</h4>
  665. <pre>public static final&nbsp;int TrackerSamplerCSC_MODE_INIT_POS</pre>
  666. <dl>
  667. <dt><span class="seeLabel">See Also:</span></dt>
  668. <dd><a href="../../../constant-values.html#org.opencv.video.Video.TrackerSamplerCSC_MODE_INIT_POS">Constant Field Values</a></dd>
  669. </dl>
  670. </li>
  671. </ul>
  672. <a name="TrackerSamplerCSC_MODE_TRACK_NEG">
  673. <!-- -->
  674. </a>
  675. <ul class="blockList">
  676. <li class="blockList">
  677. <h4>TrackerSamplerCSC_MODE_TRACK_NEG</h4>
  678. <pre>public static final&nbsp;int TrackerSamplerCSC_MODE_TRACK_NEG</pre>
  679. <dl>
  680. <dt><span class="seeLabel">See Also:</span></dt>
  681. <dd><a href="../../../constant-values.html#org.opencv.video.Video.TrackerSamplerCSC_MODE_TRACK_NEG">Constant Field Values</a></dd>
  682. </dl>
  683. </li>
  684. </ul>
  685. <a name="TrackerSamplerCSC_MODE_TRACK_POS">
  686. <!-- -->
  687. </a>
  688. <ul class="blockListLast">
  689. <li class="blockList">
  690. <h4>TrackerSamplerCSC_MODE_TRACK_POS</h4>
  691. <pre>public static final&nbsp;int TrackerSamplerCSC_MODE_TRACK_POS</pre>
  692. <dl>
  693. <dt><span class="seeLabel">See Also:</span></dt>
  694. <dd><a href="../../../constant-values.html#org.opencv.video.Video.TrackerSamplerCSC_MODE_TRACK_POS">Constant Field Values</a></dd>
  695. </dl>
  696. </li>
  697. </ul>
  698. </li>
  699. </ul>
  700. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  701. <ul class="blockList">
  702. <li class="blockList"><a name="constructor.detail">
  703. <!-- -->
  704. </a>
  705. <h3>Constructor Detail</h3>
  706. <a name="Video--">
  707. <!-- -->
  708. </a>
  709. <ul class="blockListLast">
  710. <li class="blockList">
  711. <h4>Video</h4>
  712. <pre>public&nbsp;Video()</pre>
  713. </li>
  714. </ul>
  715. </li>
  716. </ul>
  717. <!-- ============ METHOD DETAIL ========== -->
  718. <ul class="blockList">
  719. <li class="blockList"><a name="method.detail">
  720. <!-- -->
  721. </a>
  722. <h3>Method Detail</h3>
  723. <a name="buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-">
  724. <!-- -->
  725. </a>
  726. <ul class="blockList">
  727. <li class="blockList">
  728. <h4>buildOpticalFlowPyramid</h4>
  729. <pre>public static&nbsp;int&nbsp;buildOpticalFlowPyramid(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  730. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  731. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  732. int&nbsp;maxLevel)</pre>
  733. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  734. <dl>
  735. <dt><span class="paramLabel">Parameters:</span></dt>
  736. <dd><code>img</code> - 8-bit input image.</dd>
  737. <dd><code>pyramid</code> - output pyramid.</dd>
  738. <dd><code>winSize</code> - window size of optical flow algorithm. Must be not less than winSize argument of
  739. calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels.</dd>
  740. <dd><code>maxLevel</code> - 0-based maximal pyramid level number.
  741. constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.
  742. to force data copying.</dd>
  743. <dt><span class="returnLabel">Returns:</span></dt>
  744. <dd>number of levels in constructed pyramid. Can be less than maxLevel.</dd>
  745. </dl>
  746. </li>
  747. </ul>
  748. <a name="buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-boolean-">
  749. <!-- -->
  750. </a>
  751. <ul class="blockList">
  752. <li class="blockList">
  753. <h4>buildOpticalFlowPyramid</h4>
  754. <pre>public static&nbsp;int&nbsp;buildOpticalFlowPyramid(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  755. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  756. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  757. int&nbsp;maxLevel,
  758. boolean&nbsp;withDerivatives)</pre>
  759. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  760. <dl>
  761. <dt><span class="paramLabel">Parameters:</span></dt>
  762. <dd><code>img</code> - 8-bit input image.</dd>
  763. <dd><code>pyramid</code> - output pyramid.</dd>
  764. <dd><code>winSize</code> - window size of optical flow algorithm. Must be not less than winSize argument of
  765. calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels.</dd>
  766. <dd><code>maxLevel</code> - 0-based maximal pyramid level number.</dd>
  767. <dd><code>withDerivatives</code> - set to precompute gradients for the every pyramid level. If pyramid is
  768. constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.
  769. to force data copying.</dd>
  770. <dt><span class="returnLabel">Returns:</span></dt>
  771. <dd>number of levels in constructed pyramid. Can be less than maxLevel.</dd>
  772. </dl>
  773. </li>
  774. </ul>
  775. <a name="buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-boolean-int-">
  776. <!-- -->
  777. </a>
  778. <ul class="blockList">
  779. <li class="blockList">
  780. <h4>buildOpticalFlowPyramid</h4>
  781. <pre>public static&nbsp;int&nbsp;buildOpticalFlowPyramid(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  782. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  783. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  784. int&nbsp;maxLevel,
  785. boolean&nbsp;withDerivatives,
  786. int&nbsp;pyrBorder)</pre>
  787. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  788. <dl>
  789. <dt><span class="paramLabel">Parameters:</span></dt>
  790. <dd><code>img</code> - 8-bit input image.</dd>
  791. <dd><code>pyramid</code> - output pyramid.</dd>
  792. <dd><code>winSize</code> - window size of optical flow algorithm. Must be not less than winSize argument of
  793. calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels.</dd>
  794. <dd><code>maxLevel</code> - 0-based maximal pyramid level number.</dd>
  795. <dd><code>withDerivatives</code> - set to precompute gradients for the every pyramid level. If pyramid is
  796. constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.</dd>
  797. <dd><code>pyrBorder</code> - the border mode for pyramid layers.
  798. to force data copying.</dd>
  799. <dt><span class="returnLabel">Returns:</span></dt>
  800. <dd>number of levels in constructed pyramid. Can be less than maxLevel.</dd>
  801. </dl>
  802. </li>
  803. </ul>
  804. <a name="buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-boolean-int-int-">
  805. <!-- -->
  806. </a>
  807. <ul class="blockList">
  808. <li class="blockList">
  809. <h4>buildOpticalFlowPyramid</h4>
  810. <pre>public static&nbsp;int&nbsp;buildOpticalFlowPyramid(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  811. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  812. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  813. int&nbsp;maxLevel,
  814. boolean&nbsp;withDerivatives,
  815. int&nbsp;pyrBorder,
  816. int&nbsp;derivBorder)</pre>
  817. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  818. <dl>
  819. <dt><span class="paramLabel">Parameters:</span></dt>
  820. <dd><code>img</code> - 8-bit input image.</dd>
  821. <dd><code>pyramid</code> - output pyramid.</dd>
  822. <dd><code>winSize</code> - window size of optical flow algorithm. Must be not less than winSize argument of
  823. calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels.</dd>
  824. <dd><code>maxLevel</code> - 0-based maximal pyramid level number.</dd>
  825. <dd><code>withDerivatives</code> - set to precompute gradients for the every pyramid level. If pyramid is
  826. constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.</dd>
  827. <dd><code>pyrBorder</code> - the border mode for pyramid layers.</dd>
  828. <dd><code>derivBorder</code> - the border mode for gradients.
  829. to force data copying.</dd>
  830. <dt><span class="returnLabel">Returns:</span></dt>
  831. <dd>number of levels in constructed pyramid. Can be less than maxLevel.</dd>
  832. </dl>
  833. </li>
  834. </ul>
  835. <a name="buildOpticalFlowPyramid-org.opencv.core.Mat-java.util.List-org.opencv.core.Size-int-boolean-int-int-boolean-">
  836. <!-- -->
  837. </a>
  838. <ul class="blockList">
  839. <li class="blockList">
  840. <h4>buildOpticalFlowPyramid</h4>
  841. <pre>public static&nbsp;int&nbsp;buildOpticalFlowPyramid(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;img,
  842. java.util.List&lt;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&gt;&nbsp;pyramid,
  843. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  844. int&nbsp;maxLevel,
  845. boolean&nbsp;withDerivatives,
  846. int&nbsp;pyrBorder,
  847. int&nbsp;derivBorder,
  848. boolean&nbsp;tryReuseInputImage)</pre>
  849. <div class="block">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.</div>
  850. <dl>
  851. <dt><span class="paramLabel">Parameters:</span></dt>
  852. <dd><code>img</code> - 8-bit input image.</dd>
  853. <dd><code>pyramid</code> - output pyramid.</dd>
  854. <dd><code>winSize</code> - window size of optical flow algorithm. Must be not less than winSize argument of
  855. calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels.</dd>
  856. <dd><code>maxLevel</code> - 0-based maximal pyramid level number.</dd>
  857. <dd><code>withDerivatives</code> - set to precompute gradients for the every pyramid level. If pyramid is
  858. constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.</dd>
  859. <dd><code>pyrBorder</code> - the border mode for pyramid layers.</dd>
  860. <dd><code>derivBorder</code> - the border mode for gradients.</dd>
  861. <dd><code>tryReuseInputImage</code> - put ROI of input image into the pyramid if possible. You can pass false
  862. to force data copying.</dd>
  863. <dt><span class="returnLabel">Returns:</span></dt>
  864. <dd>number of levels in constructed pyramid. Can be less than maxLevel.</dd>
  865. </dl>
  866. </li>
  867. </ul>
  868. <a name="calcOpticalFlowFarneback-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-double-int-int-int-int-double-int-">
  869. <!-- -->
  870. </a>
  871. <ul class="blockList">
  872. <li class="blockList">
  873. <h4>calcOpticalFlowFarneback</h4>
  874. <pre>public static&nbsp;void&nbsp;calcOpticalFlowFarneback(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prev,
  875. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;next,
  876. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;flow,
  877. double&nbsp;pyr_scale,
  878. int&nbsp;levels,
  879. int&nbsp;winsize,
  880. int&nbsp;iterations,
  881. int&nbsp;poly_n,
  882. double&nbsp;poly_sigma,
  883. int&nbsp;flags)</pre>
  884. <div class="block">Computes a dense optical flow using the Gunnar Farneback's algorithm.</div>
  885. <dl>
  886. <dt><span class="paramLabel">Parameters:</span></dt>
  887. <dd><code>prev</code> - first 8-bit single-channel input image.</dd>
  888. <dd><code>next</code> - second input image of the same size and the same type as prev.</dd>
  889. <dd><code>flow</code> - computed flow image that has the same size as prev and type CV_32FC2.</dd>
  890. <dd><code>pyr_scale</code> - parameter, specifying the image scale (&lt;1) to build pyramids for each image;
  891. pyr_scale=0.5 means a classical pyramid, where each next layer is twice smaller than the previous
  892. one.</dd>
  893. <dd><code>levels</code> - number of pyramid layers including the initial image; levels=1 means that no extra
  894. layers are created and only the original images are used.</dd>
  895. <dd><code>winsize</code> - averaging window size; larger values increase the algorithm robustness to image
  896. noise and give more chances for fast motion detection, but yield more blurred motion field.</dd>
  897. <dd><code>iterations</code> - number of iterations the algorithm does at each pyramid level.</dd>
  898. <dd><code>poly_n</code> - size of the pixel neighborhood used to find polynomial expansion in each pixel;
  899. larger values mean that the image will be approximated with smoother surfaces, yielding more
  900. robust algorithm and more blurred motion field, typically poly_n =5 or 7.</dd>
  901. <dd><code>poly_sigma</code> - standard deviation of the Gaussian that is used to smooth derivatives used as a
  902. basis for the polynomial expansion; for poly_n=5, you can set poly_sigma=1.1, for poly_n=7, a
  903. good value would be poly_sigma=1.5.</dd>
  904. <dd><code>flags</code> - operation flags that can be a combination of the following:
  905. <ul>
  906. <li>
  907. <b>OPTFLOW_USE_INITIAL_FLOW</b> uses the input flow as an initial flow approximation.
  908. </li>
  909. <li>
  910. <b>OPTFLOW_FARNEBACK_GAUSSIAN</b> uses the Gaussian \(\texttt{winsize}\times\texttt{winsize}\)
  911. filter instead of a box filter of the same size for optical flow estimation; usually, this
  912. option gives z more accurate flow than with a box filter, at the cost of lower speed;
  913. normally, winsize for a Gaussian window should be set to a larger value to achieve the same
  914. level of robustness.
  915. </li>
  916. </ul>
  917. The function finds an optical flow for each prev pixel using the CITE: Farneback2003 algorithm so that
  918. \(\texttt{prev} (y,x) \sim \texttt{next} ( y + \texttt{flow} (y,x)[1], x + \texttt{flow} (y,x)[0])\)
  919. <b>Note:</b>
  920. <ul>
  921. <li>
  922. An example using the optical flow algorithm described by Gunnar Farneback can be found at
  923. opencv_source_code/samples/cpp/fback.cpp
  924. </li>
  925. <li>
  926. (Python) An example using the optical flow algorithm described by Gunnar Farneback can be
  927. found at opencv_source_code/samples/python/opt_flow.py
  928. </li>
  929. </ul></dd>
  930. </dl>
  931. </li>
  932. </ul>
  933. <a name="calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-">
  934. <!-- -->
  935. </a>
  936. <ul class="blockList">
  937. <li class="blockList">
  938. <h4>calcOpticalFlowPyrLK</h4>
  939. <pre>public static&nbsp;void&nbsp;calcOpticalFlowPyrLK(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  940. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  941. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  942. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  943. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  944. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err)</pre>
  945. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  946. pyramids.</div>
  947. <dl>
  948. <dt><span class="paramLabel">Parameters:</span></dt>
  949. <dd><code>prevImg</code> - first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.</dd>
  950. <dd><code>nextImg</code> - second input image or pyramid of the same size and the same type as prevImg.</dd>
  951. <dd><code>prevPts</code> - vector of 2D points for which the flow needs to be found; point coordinates must be
  952. single-precision floating-point numbers.</dd>
  953. <dd><code>nextPts</code> - output vector of 2D points (with single-precision floating-point coordinates)
  954. containing the calculated new positions of input features in the second image; when
  955. OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.</dd>
  956. <dd><code>status</code> - output status vector (of unsigned chars); each element of the vector is set to 1 if
  957. the flow for the corresponding features has been found, otherwise, it is set to 0.</dd>
  958. <dd><code>err</code> - output vector of errors; each element of the vector is set to an error for the
  959. corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't
  960. found then the error is not defined (use the status parameter to find such cases).
  961. level), if set to 1, two levels are used, and so on; if pyramids are passed to input then
  962. algorithm will use as many levels as pyramids have but no more than maxLevel.
  963. (after the specified maximum number of iterations criteria.maxCount or when the search window
  964. moves by less than criteria.epsilon.
  965. <ul>
  966. <li>
  967. <b>OPTFLOW_USE_INITIAL_FLOW</b> uses initial estimations, stored in nextPts; if the flag is
  968. not set, then prevPts is copied to nextPts and is considered the initial estimate.
  969. </li>
  970. <li>
  971. <b>OPTFLOW_LK_GET_MIN_EIGENVALS</b> use minimum eigen values as an error measure (see
  972. minEigThreshold description); if the flag is not set, then L1 distance between patches
  973. around the original and a moved point, divided by number of pixels in a window, is used as a
  974. error measure.
  975. </li>
  976. </ul>
  977. optical flow equations (this matrix is called a spatial gradient matrix in CITE: Bouguet00), divided
  978. by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding
  979. feature is filtered out and its flow is not processed, so it allows to remove bad points and get a
  980. performance boost.
  981. The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
  982. CITE: Bouguet00 . The function is parallelized with the TBB library.
  983. <b>Note:</b>
  984. <ul>
  985. <li>
  986. An example using the Lucas-Kanade optical flow algorithm can be found at
  987. opencv_source_code/samples/cpp/lkdemo.cpp
  988. </li>
  989. <li>
  990. (Python) An example using the Lucas-Kanade optical flow algorithm can be found at
  991. opencv_source_code/samples/python/lk_track.py
  992. </li>
  993. <li>
  994. (Python) An example using the Lucas-Kanade tracker for homography matching can be found at
  995. opencv_source_code/samples/python/lk_homography.py
  996. </li>
  997. </ul></dd>
  998. </dl>
  999. </li>
  1000. </ul>
  1001. <a name="calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-">
  1002. <!-- -->
  1003. </a>
  1004. <ul class="blockList">
  1005. <li class="blockList">
  1006. <h4>calcOpticalFlowPyrLK</h4>
  1007. <pre>public static&nbsp;void&nbsp;calcOpticalFlowPyrLK(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  1008. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  1009. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  1010. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  1011. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  1012. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  1013. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize)</pre>
  1014. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  1015. pyramids.</div>
  1016. <dl>
  1017. <dt><span class="paramLabel">Parameters:</span></dt>
  1018. <dd><code>prevImg</code> - first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.</dd>
  1019. <dd><code>nextImg</code> - second input image or pyramid of the same size and the same type as prevImg.</dd>
  1020. <dd><code>prevPts</code> - vector of 2D points for which the flow needs to be found; point coordinates must be
  1021. single-precision floating-point numbers.</dd>
  1022. <dd><code>nextPts</code> - output vector of 2D points (with single-precision floating-point coordinates)
  1023. containing the calculated new positions of input features in the second image; when
  1024. OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.</dd>
  1025. <dd><code>status</code> - output status vector (of unsigned chars); each element of the vector is set to 1 if
  1026. the flow for the corresponding features has been found, otherwise, it is set to 0.</dd>
  1027. <dd><code>err</code> - output vector of errors; each element of the vector is set to an error for the
  1028. corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't
  1029. found then the error is not defined (use the status parameter to find such cases).</dd>
  1030. <dd><code>winSize</code> - size of the search window at each pyramid level.
  1031. level), if set to 1, two levels are used, and so on; if pyramids are passed to input then
  1032. algorithm will use as many levels as pyramids have but no more than maxLevel.
  1033. (after the specified maximum number of iterations criteria.maxCount or when the search window
  1034. moves by less than criteria.epsilon.
  1035. <ul>
  1036. <li>
  1037. <b>OPTFLOW_USE_INITIAL_FLOW</b> uses initial estimations, stored in nextPts; if the flag is
  1038. not set, then prevPts is copied to nextPts and is considered the initial estimate.
  1039. </li>
  1040. <li>
  1041. <b>OPTFLOW_LK_GET_MIN_EIGENVALS</b> use minimum eigen values as an error measure (see
  1042. minEigThreshold description); if the flag is not set, then L1 distance between patches
  1043. around the original and a moved point, divided by number of pixels in a window, is used as a
  1044. error measure.
  1045. </li>
  1046. </ul>
  1047. optical flow equations (this matrix is called a spatial gradient matrix in CITE: Bouguet00), divided
  1048. by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding
  1049. feature is filtered out and its flow is not processed, so it allows to remove bad points and get a
  1050. performance boost.
  1051. The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
  1052. CITE: Bouguet00 . The function is parallelized with the TBB library.
  1053. <b>Note:</b>
  1054. <ul>
  1055. <li>
  1056. An example using the Lucas-Kanade optical flow algorithm can be found at
  1057. opencv_source_code/samples/cpp/lkdemo.cpp
  1058. </li>
  1059. <li>
  1060. (Python) An example using the Lucas-Kanade optical flow algorithm can be found at
  1061. opencv_source_code/samples/python/lk_track.py
  1062. </li>
  1063. <li>
  1064. (Python) An example using the Lucas-Kanade tracker for homography matching can be found at
  1065. opencv_source_code/samples/python/lk_homography.py
  1066. </li>
  1067. </ul></dd>
  1068. </dl>
  1069. </li>
  1070. </ul>
  1071. <a name="calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-int-">
  1072. <!-- -->
  1073. </a>
  1074. <ul class="blockList">
  1075. <li class="blockList">
  1076. <h4>calcOpticalFlowPyrLK</h4>
  1077. <pre>public static&nbsp;void&nbsp;calcOpticalFlowPyrLK(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  1078. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  1079. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  1080. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  1081. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  1082. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  1083. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  1084. int&nbsp;maxLevel)</pre>
  1085. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  1086. pyramids.</div>
  1087. <dl>
  1088. <dt><span class="paramLabel">Parameters:</span></dt>
  1089. <dd><code>prevImg</code> - first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.</dd>
  1090. <dd><code>nextImg</code> - second input image or pyramid of the same size and the same type as prevImg.</dd>
  1091. <dd><code>prevPts</code> - vector of 2D points for which the flow needs to be found; point coordinates must be
  1092. single-precision floating-point numbers.</dd>
  1093. <dd><code>nextPts</code> - output vector of 2D points (with single-precision floating-point coordinates)
  1094. containing the calculated new positions of input features in the second image; when
  1095. OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.</dd>
  1096. <dd><code>status</code> - output status vector (of unsigned chars); each element of the vector is set to 1 if
  1097. the flow for the corresponding features has been found, otherwise, it is set to 0.</dd>
  1098. <dd><code>err</code> - output vector of errors; each element of the vector is set to an error for the
  1099. corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't
  1100. found then the error is not defined (use the status parameter to find such cases).</dd>
  1101. <dd><code>winSize</code> - size of the search window at each pyramid level.</dd>
  1102. <dd><code>maxLevel</code> - 0-based maximal pyramid level number; if set to 0, pyramids are not used (single
  1103. level), if set to 1, two levels are used, and so on; if pyramids are passed to input then
  1104. algorithm will use as many levels as pyramids have but no more than maxLevel.
  1105. (after the specified maximum number of iterations criteria.maxCount or when the search window
  1106. moves by less than criteria.epsilon.
  1107. <ul>
  1108. <li>
  1109. <b>OPTFLOW_USE_INITIAL_FLOW</b> uses initial estimations, stored in nextPts; if the flag is
  1110. not set, then prevPts is copied to nextPts and is considered the initial estimate.
  1111. </li>
  1112. <li>
  1113. <b>OPTFLOW_LK_GET_MIN_EIGENVALS</b> use minimum eigen values as an error measure (see
  1114. minEigThreshold description); if the flag is not set, then L1 distance between patches
  1115. around the original and a moved point, divided by number of pixels in a window, is used as a
  1116. error measure.
  1117. </li>
  1118. </ul>
  1119. optical flow equations (this matrix is called a spatial gradient matrix in CITE: Bouguet00), divided
  1120. by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding
  1121. feature is filtered out and its flow is not processed, so it allows to remove bad points and get a
  1122. performance boost.
  1123. The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
  1124. CITE: Bouguet00 . The function is parallelized with the TBB library.
  1125. <b>Note:</b>
  1126. <ul>
  1127. <li>
  1128. An example using the Lucas-Kanade optical flow algorithm can be found at
  1129. opencv_source_code/samples/cpp/lkdemo.cpp
  1130. </li>
  1131. <li>
  1132. (Python) An example using the Lucas-Kanade optical flow algorithm can be found at
  1133. opencv_source_code/samples/python/lk_track.py
  1134. </li>
  1135. <li>
  1136. (Python) An example using the Lucas-Kanade tracker for homography matching can be found at
  1137. opencv_source_code/samples/python/lk_homography.py
  1138. </li>
  1139. </ul></dd>
  1140. </dl>
  1141. </li>
  1142. </ul>
  1143. <a name="calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-int-org.opencv.core.TermCriteria-">
  1144. <!-- -->
  1145. </a>
  1146. <ul class="blockList">
  1147. <li class="blockList">
  1148. <h4>calcOpticalFlowPyrLK</h4>
  1149. <pre>public static&nbsp;void&nbsp;calcOpticalFlowPyrLK(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  1150. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  1151. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  1152. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  1153. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  1154. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  1155. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  1156. int&nbsp;maxLevel,
  1157. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria)</pre>
  1158. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  1159. pyramids.</div>
  1160. <dl>
  1161. <dt><span class="paramLabel">Parameters:</span></dt>
  1162. <dd><code>prevImg</code> - first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.</dd>
  1163. <dd><code>nextImg</code> - second input image or pyramid of the same size and the same type as prevImg.</dd>
  1164. <dd><code>prevPts</code> - vector of 2D points for which the flow needs to be found; point coordinates must be
  1165. single-precision floating-point numbers.</dd>
  1166. <dd><code>nextPts</code> - output vector of 2D points (with single-precision floating-point coordinates)
  1167. containing the calculated new positions of input features in the second image; when
  1168. OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.</dd>
  1169. <dd><code>status</code> - output status vector (of unsigned chars); each element of the vector is set to 1 if
  1170. the flow for the corresponding features has been found, otherwise, it is set to 0.</dd>
  1171. <dd><code>err</code> - output vector of errors; each element of the vector is set to an error for the
  1172. corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't
  1173. found then the error is not defined (use the status parameter to find such cases).</dd>
  1174. <dd><code>winSize</code> - size of the search window at each pyramid level.</dd>
  1175. <dd><code>maxLevel</code> - 0-based maximal pyramid level number; if set to 0, pyramids are not used (single
  1176. level), if set to 1, two levels are used, and so on; if pyramids are passed to input then
  1177. algorithm will use as many levels as pyramids have but no more than maxLevel.</dd>
  1178. <dd><code>criteria</code> - parameter, specifying the termination criteria of the iterative search algorithm
  1179. (after the specified maximum number of iterations criteria.maxCount or when the search window
  1180. moves by less than criteria.epsilon.
  1181. <ul>
  1182. <li>
  1183. <b>OPTFLOW_USE_INITIAL_FLOW</b> uses initial estimations, stored in nextPts; if the flag is
  1184. not set, then prevPts is copied to nextPts and is considered the initial estimate.
  1185. </li>
  1186. <li>
  1187. <b>OPTFLOW_LK_GET_MIN_EIGENVALS</b> use minimum eigen values as an error measure (see
  1188. minEigThreshold description); if the flag is not set, then L1 distance between patches
  1189. around the original and a moved point, divided by number of pixels in a window, is used as a
  1190. error measure.
  1191. </li>
  1192. </ul>
  1193. optical flow equations (this matrix is called a spatial gradient matrix in CITE: Bouguet00), divided
  1194. by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding
  1195. feature is filtered out and its flow is not processed, so it allows to remove bad points and get a
  1196. performance boost.
  1197. The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
  1198. CITE: Bouguet00 . The function is parallelized with the TBB library.
  1199. <b>Note:</b>
  1200. <ul>
  1201. <li>
  1202. An example using the Lucas-Kanade optical flow algorithm can be found at
  1203. opencv_source_code/samples/cpp/lkdemo.cpp
  1204. </li>
  1205. <li>
  1206. (Python) An example using the Lucas-Kanade optical flow algorithm can be found at
  1207. opencv_source_code/samples/python/lk_track.py
  1208. </li>
  1209. <li>
  1210. (Python) An example using the Lucas-Kanade tracker for homography matching can be found at
  1211. opencv_source_code/samples/python/lk_homography.py
  1212. </li>
  1213. </ul></dd>
  1214. </dl>
  1215. </li>
  1216. </ul>
  1217. <a name="calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-int-org.opencv.core.TermCriteria-int-">
  1218. <!-- -->
  1219. </a>
  1220. <ul class="blockList">
  1221. <li class="blockList">
  1222. <h4>calcOpticalFlowPyrLK</h4>
  1223. <pre>public static&nbsp;void&nbsp;calcOpticalFlowPyrLK(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  1224. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  1225. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  1226. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  1227. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  1228. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  1229. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  1230. int&nbsp;maxLevel,
  1231. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria,
  1232. int&nbsp;flags)</pre>
  1233. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  1234. pyramids.</div>
  1235. <dl>
  1236. <dt><span class="paramLabel">Parameters:</span></dt>
  1237. <dd><code>prevImg</code> - first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.</dd>
  1238. <dd><code>nextImg</code> - second input image or pyramid of the same size and the same type as prevImg.</dd>
  1239. <dd><code>prevPts</code> - vector of 2D points for which the flow needs to be found; point coordinates must be
  1240. single-precision floating-point numbers.</dd>
  1241. <dd><code>nextPts</code> - output vector of 2D points (with single-precision floating-point coordinates)
  1242. containing the calculated new positions of input features in the second image; when
  1243. OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.</dd>
  1244. <dd><code>status</code> - output status vector (of unsigned chars); each element of the vector is set to 1 if
  1245. the flow for the corresponding features has been found, otherwise, it is set to 0.</dd>
  1246. <dd><code>err</code> - output vector of errors; each element of the vector is set to an error for the
  1247. corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't
  1248. found then the error is not defined (use the status parameter to find such cases).</dd>
  1249. <dd><code>winSize</code> - size of the search window at each pyramid level.</dd>
  1250. <dd><code>maxLevel</code> - 0-based maximal pyramid level number; if set to 0, pyramids are not used (single
  1251. level), if set to 1, two levels are used, and so on; if pyramids are passed to input then
  1252. algorithm will use as many levels as pyramids have but no more than maxLevel.</dd>
  1253. <dd><code>criteria</code> - parameter, specifying the termination criteria of the iterative search algorithm
  1254. (after the specified maximum number of iterations criteria.maxCount or when the search window
  1255. moves by less than criteria.epsilon.</dd>
  1256. <dd><code>flags</code> - operation flags:
  1257. <ul>
  1258. <li>
  1259. <b>OPTFLOW_USE_INITIAL_FLOW</b> uses initial estimations, stored in nextPts; if the flag is
  1260. not set, then prevPts is copied to nextPts and is considered the initial estimate.
  1261. </li>
  1262. <li>
  1263. <b>OPTFLOW_LK_GET_MIN_EIGENVALS</b> use minimum eigen values as an error measure (see
  1264. minEigThreshold description); if the flag is not set, then L1 distance between patches
  1265. around the original and a moved point, divided by number of pixels in a window, is used as a
  1266. error measure.
  1267. </li>
  1268. </ul>
  1269. optical flow equations (this matrix is called a spatial gradient matrix in CITE: Bouguet00), divided
  1270. by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding
  1271. feature is filtered out and its flow is not processed, so it allows to remove bad points and get a
  1272. performance boost.
  1273. The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
  1274. CITE: Bouguet00 . The function is parallelized with the TBB library.
  1275. <b>Note:</b>
  1276. <ul>
  1277. <li>
  1278. An example using the Lucas-Kanade optical flow algorithm can be found at
  1279. opencv_source_code/samples/cpp/lkdemo.cpp
  1280. </li>
  1281. <li>
  1282. (Python) An example using the Lucas-Kanade optical flow algorithm can be found at
  1283. opencv_source_code/samples/python/lk_track.py
  1284. </li>
  1285. <li>
  1286. (Python) An example using the Lucas-Kanade tracker for homography matching can be found at
  1287. opencv_source_code/samples/python/lk_homography.py
  1288. </li>
  1289. </ul></dd>
  1290. </dl>
  1291. </li>
  1292. </ul>
  1293. <a name="calcOpticalFlowPyrLK-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfPoint2f-org.opencv.core.MatOfByte-org.opencv.core.MatOfFloat-org.opencv.core.Size-int-org.opencv.core.TermCriteria-int-double-">
  1294. <!-- -->
  1295. </a>
  1296. <ul class="blockList">
  1297. <li class="blockList">
  1298. <h4>calcOpticalFlowPyrLK</h4>
  1299. <pre>public static&nbsp;void&nbsp;calcOpticalFlowPyrLK(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;prevImg,
  1300. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;nextImg,
  1301. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;prevPts,
  1302. <a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core">MatOfPoint2f</a>&nbsp;nextPts,
  1303. <a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core">MatOfByte</a>&nbsp;status,
  1304. <a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core">MatOfFloat</a>&nbsp;err,
  1305. <a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core">Size</a>&nbsp;winSize,
  1306. int&nbsp;maxLevel,
  1307. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria,
  1308. int&nbsp;flags,
  1309. double&nbsp;minEigThreshold)</pre>
  1310. <div class="block">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
  1311. pyramids.</div>
  1312. <dl>
  1313. <dt><span class="paramLabel">Parameters:</span></dt>
  1314. <dd><code>prevImg</code> - first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.</dd>
  1315. <dd><code>nextImg</code> - second input image or pyramid of the same size and the same type as prevImg.</dd>
  1316. <dd><code>prevPts</code> - vector of 2D points for which the flow needs to be found; point coordinates must be
  1317. single-precision floating-point numbers.</dd>
  1318. <dd><code>nextPts</code> - output vector of 2D points (with single-precision floating-point coordinates)
  1319. containing the calculated new positions of input features in the second image; when
  1320. OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.</dd>
  1321. <dd><code>status</code> - output status vector (of unsigned chars); each element of the vector is set to 1 if
  1322. the flow for the corresponding features has been found, otherwise, it is set to 0.</dd>
  1323. <dd><code>err</code> - output vector of errors; each element of the vector is set to an error for the
  1324. corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't
  1325. found then the error is not defined (use the status parameter to find such cases).</dd>
  1326. <dd><code>winSize</code> - size of the search window at each pyramid level.</dd>
  1327. <dd><code>maxLevel</code> - 0-based maximal pyramid level number; if set to 0, pyramids are not used (single
  1328. level), if set to 1, two levels are used, and so on; if pyramids are passed to input then
  1329. algorithm will use as many levels as pyramids have but no more than maxLevel.</dd>
  1330. <dd><code>criteria</code> - parameter, specifying the termination criteria of the iterative search algorithm
  1331. (after the specified maximum number of iterations criteria.maxCount or when the search window
  1332. moves by less than criteria.epsilon.</dd>
  1333. <dd><code>flags</code> - operation flags:
  1334. <ul>
  1335. <li>
  1336. <b>OPTFLOW_USE_INITIAL_FLOW</b> uses initial estimations, stored in nextPts; if the flag is
  1337. not set, then prevPts is copied to nextPts and is considered the initial estimate.
  1338. </li>
  1339. <li>
  1340. <b>OPTFLOW_LK_GET_MIN_EIGENVALS</b> use minimum eigen values as an error measure (see
  1341. minEigThreshold description); if the flag is not set, then L1 distance between patches
  1342. around the original and a moved point, divided by number of pixels in a window, is used as a
  1343. error measure.
  1344. </li>
  1345. </ul></dd>
  1346. <dd><code>minEigThreshold</code> - the algorithm calculates the minimum eigen value of a 2x2 normal matrix of
  1347. optical flow equations (this matrix is called a spatial gradient matrix in CITE: Bouguet00), divided
  1348. by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding
  1349. feature is filtered out and its flow is not processed, so it allows to remove bad points and get a
  1350. performance boost.
  1351. The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
  1352. CITE: Bouguet00 . The function is parallelized with the TBB library.
  1353. <b>Note:</b>
  1354. <ul>
  1355. <li>
  1356. An example using the Lucas-Kanade optical flow algorithm can be found at
  1357. opencv_source_code/samples/cpp/lkdemo.cpp
  1358. </li>
  1359. <li>
  1360. (Python) An example using the Lucas-Kanade optical flow algorithm can be found at
  1361. opencv_source_code/samples/python/lk_track.py
  1362. </li>
  1363. <li>
  1364. (Python) An example using the Lucas-Kanade tracker for homography matching can be found at
  1365. opencv_source_code/samples/python/lk_homography.py
  1366. </li>
  1367. </ul></dd>
  1368. </dl>
  1369. </li>
  1370. </ul>
  1371. <a name="CamShift-org.opencv.core.Mat-org.opencv.core.Rect-org.opencv.core.TermCriteria-">
  1372. <!-- -->
  1373. </a>
  1374. <ul class="blockList">
  1375. <li class="blockList">
  1376. <h4>CamShift</h4>
  1377. <pre>public static&nbsp;<a href="../../../org/opencv/core/RotatedRect.html" title="class in org.opencv.core">RotatedRect</a>&nbsp;CamShift(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;probImage,
  1378. <a href="../../../org/opencv/core/Rect.html" title="class in org.opencv.core">Rect</a>&nbsp;window,
  1379. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria)</pre>
  1380. <div class="block">Finds an object center, size, and orientation.</div>
  1381. <dl>
  1382. <dt><span class="paramLabel">Parameters:</span></dt>
  1383. <dd><code>probImage</code> - Back projection of the object histogram. See calcBackProject.</dd>
  1384. <dd><code>window</code> - Initial search window.</dd>
  1385. <dd><code>criteria</code> - Stop criteria for the underlying meanShift.
  1386. returns
  1387. (in old interfaces) Number of iterations CAMSHIFT took to converge
  1388. The function implements the CAMSHIFT object tracking algorithm CITE: Bradski98 . First, it finds an
  1389. object center using meanShift and then adjusts the window size and finds the optimal rotation. The
  1390. function returns the rotated rectangle structure that includes the object position, size, and
  1391. orientation. The next position of the search window can be obtained with RotatedRect::boundingRect()
  1392. See the OpenCV sample camshiftdemo.c that tracks colored objects.
  1393. <b>Note:</b>
  1394. <ul>
  1395. <li>
  1396. (Python) A sample explaining the camshift tracking algorithm can be found at
  1397. opencv_source_code/samples/python/camshift.py
  1398. </li>
  1399. </ul></dd>
  1400. <dt><span class="returnLabel">Returns:</span></dt>
  1401. <dd>automatically generated</dd>
  1402. </dl>
  1403. </li>
  1404. </ul>
  1405. <a name="computeECC-org.opencv.core.Mat-org.opencv.core.Mat-">
  1406. <!-- -->
  1407. </a>
  1408. <ul class="blockList">
  1409. <li class="blockList">
  1410. <h4>computeECC</h4>
  1411. <pre>public static&nbsp;double&nbsp;computeECC(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  1412. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage)</pre>
  1413. <div class="block">Computes the Enhanced Correlation Coefficient value between two images CITE: EP08 .</div>
  1414. <dl>
  1415. <dt><span class="paramLabel">Parameters:</span></dt>
  1416. <dd><code>templateImage</code> - single-channel template image; CV_8U or CV_32F array.</dd>
  1417. <dd><code>inputImage</code> - single-channel input image to be warped to provide an image similar to
  1418. templateImage, same type as templateImage.
  1419. SEE:
  1420. findTransformECC</dd>
  1421. <dt><span class="returnLabel">Returns:</span></dt>
  1422. <dd>automatically generated</dd>
  1423. </dl>
  1424. </li>
  1425. </ul>
  1426. <a name="computeECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-">
  1427. <!-- -->
  1428. </a>
  1429. <ul class="blockList">
  1430. <li class="blockList">
  1431. <h4>computeECC</h4>
  1432. <pre>public static&nbsp;double&nbsp;computeECC(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  1433. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  1434. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputMask)</pre>
  1435. <div class="block">Computes the Enhanced Correlation Coefficient value between two images CITE: EP08 .</div>
  1436. <dl>
  1437. <dt><span class="paramLabel">Parameters:</span></dt>
  1438. <dd><code>templateImage</code> - single-channel template image; CV_8U or CV_32F array.</dd>
  1439. <dd><code>inputImage</code> - single-channel input image to be warped to provide an image similar to
  1440. templateImage, same type as templateImage.</dd>
  1441. <dd><code>inputMask</code> - An optional mask to indicate valid values of inputImage.
  1442. SEE:
  1443. findTransformECC</dd>
  1444. <dt><span class="returnLabel">Returns:</span></dt>
  1445. <dd>automatically generated</dd>
  1446. </dl>
  1447. </li>
  1448. </ul>
  1449. <a name="createBackgroundSubtractorKNN--">
  1450. <!-- -->
  1451. </a>
  1452. <ul class="blockList">
  1453. <li class="blockList">
  1454. <h4>createBackgroundSubtractorKNN</h4>
  1455. <pre>public static&nbsp;<a href="../../../org/opencv/video/BackgroundSubtractorKNN.html" title="class in org.opencv.video">BackgroundSubtractorKNN</a>&nbsp;createBackgroundSubtractorKNN()</pre>
  1456. <div class="block">Creates KNN Background Subtractor
  1457. whether a pixel is close to that sample. This parameter does not affect the background update.
  1458. speed a bit, so if you do not need this feature, set the parameter to false.</div>
  1459. <dl>
  1460. <dt><span class="returnLabel">Returns:</span></dt>
  1461. <dd>automatically generated</dd>
  1462. </dl>
  1463. </li>
  1464. </ul>
  1465. <a name="createBackgroundSubtractorKNN-int-">
  1466. <!-- -->
  1467. </a>
  1468. <ul class="blockList">
  1469. <li class="blockList">
  1470. <h4>createBackgroundSubtractorKNN</h4>
  1471. <pre>public static&nbsp;<a href="../../../org/opencv/video/BackgroundSubtractorKNN.html" title="class in org.opencv.video">BackgroundSubtractorKNN</a>&nbsp;createBackgroundSubtractorKNN(int&nbsp;history)</pre>
  1472. <div class="block">Creates KNN Background Subtractor</div>
  1473. <dl>
  1474. <dt><span class="paramLabel">Parameters:</span></dt>
  1475. <dd><code>history</code> - Length of the history.
  1476. whether a pixel is close to that sample. This parameter does not affect the background update.
  1477. speed a bit, so if you do not need this feature, set the parameter to false.</dd>
  1478. <dt><span class="returnLabel">Returns:</span></dt>
  1479. <dd>automatically generated</dd>
  1480. </dl>
  1481. </li>
  1482. </ul>
  1483. <a name="createBackgroundSubtractorKNN-int-double-">
  1484. <!-- -->
  1485. </a>
  1486. <ul class="blockList">
  1487. <li class="blockList">
  1488. <h4>createBackgroundSubtractorKNN</h4>
  1489. <pre>public static&nbsp;<a href="../../../org/opencv/video/BackgroundSubtractorKNN.html" title="class in org.opencv.video">BackgroundSubtractorKNN</a>&nbsp;createBackgroundSubtractorKNN(int&nbsp;history,
  1490. double&nbsp;dist2Threshold)</pre>
  1491. <div class="block">Creates KNN Background Subtractor</div>
  1492. <dl>
  1493. <dt><span class="paramLabel">Parameters:</span></dt>
  1494. <dd><code>history</code> - Length of the history.</dd>
  1495. <dd><code>dist2Threshold</code> - Threshold on the squared distance between the pixel and the sample to decide
  1496. whether a pixel is close to that sample. This parameter does not affect the background update.
  1497. speed a bit, so if you do not need this feature, set the parameter to false.</dd>
  1498. <dt><span class="returnLabel">Returns:</span></dt>
  1499. <dd>automatically generated</dd>
  1500. </dl>
  1501. </li>
  1502. </ul>
  1503. <a name="createBackgroundSubtractorKNN-int-double-boolean-">
  1504. <!-- -->
  1505. </a>
  1506. <ul class="blockList">
  1507. <li class="blockList">
  1508. <h4>createBackgroundSubtractorKNN</h4>
  1509. <pre>public static&nbsp;<a href="../../../org/opencv/video/BackgroundSubtractorKNN.html" title="class in org.opencv.video">BackgroundSubtractorKNN</a>&nbsp;createBackgroundSubtractorKNN(int&nbsp;history,
  1510. double&nbsp;dist2Threshold,
  1511. boolean&nbsp;detectShadows)</pre>
  1512. <div class="block">Creates KNN Background Subtractor</div>
  1513. <dl>
  1514. <dt><span class="paramLabel">Parameters:</span></dt>
  1515. <dd><code>history</code> - Length of the history.</dd>
  1516. <dd><code>dist2Threshold</code> - Threshold on the squared distance between the pixel and the sample to decide
  1517. whether a pixel is close to that sample. This parameter does not affect the background update.</dd>
  1518. <dd><code>detectShadows</code> - If true, the algorithm will detect shadows and mark them. It decreases the
  1519. speed a bit, so if you do not need this feature, set the parameter to false.</dd>
  1520. <dt><span class="returnLabel">Returns:</span></dt>
  1521. <dd>automatically generated</dd>
  1522. </dl>
  1523. </li>
  1524. </ul>
  1525. <a name="createBackgroundSubtractorMOG2--">
  1526. <!-- -->
  1527. </a>
  1528. <ul class="blockList">
  1529. <li class="blockList">
  1530. <h4>createBackgroundSubtractorMOG2</h4>
  1531. <pre>public static&nbsp;<a href="../../../org/opencv/video/BackgroundSubtractorMOG2.html" title="class in org.opencv.video">BackgroundSubtractorMOG2</a>&nbsp;createBackgroundSubtractorMOG2()</pre>
  1532. <div class="block">Creates MOG2 Background Subtractor
  1533. to decide whether a pixel is well described by the background model. This parameter does not
  1534. affect the background update.
  1535. speed a bit, so if you do not need this feature, set the parameter to false.</div>
  1536. <dl>
  1537. <dt><span class="returnLabel">Returns:</span></dt>
  1538. <dd>automatically generated</dd>
  1539. </dl>
  1540. </li>
  1541. </ul>
  1542. <a name="createBackgroundSubtractorMOG2-int-">
  1543. <!-- -->
  1544. </a>
  1545. <ul class="blockList">
  1546. <li class="blockList">
  1547. <h4>createBackgroundSubtractorMOG2</h4>
  1548. <pre>public static&nbsp;<a href="../../../org/opencv/video/BackgroundSubtractorMOG2.html" title="class in org.opencv.video">BackgroundSubtractorMOG2</a>&nbsp;createBackgroundSubtractorMOG2(int&nbsp;history)</pre>
  1549. <div class="block">Creates MOG2 Background Subtractor</div>
  1550. <dl>
  1551. <dt><span class="paramLabel">Parameters:</span></dt>
  1552. <dd><code>history</code> - Length of the history.
  1553. to decide whether a pixel is well described by the background model. This parameter does not
  1554. affect the background update.
  1555. speed a bit, so if you do not need this feature, set the parameter to false.</dd>
  1556. <dt><span class="returnLabel">Returns:</span></dt>
  1557. <dd>automatically generated</dd>
  1558. </dl>
  1559. </li>
  1560. </ul>
  1561. <a name="createBackgroundSubtractorMOG2-int-double-">
  1562. <!-- -->
  1563. </a>
  1564. <ul class="blockList">
  1565. <li class="blockList">
  1566. <h4>createBackgroundSubtractorMOG2</h4>
  1567. <pre>public static&nbsp;<a href="../../../org/opencv/video/BackgroundSubtractorMOG2.html" title="class in org.opencv.video">BackgroundSubtractorMOG2</a>&nbsp;createBackgroundSubtractorMOG2(int&nbsp;history,
  1568. double&nbsp;varThreshold)</pre>
  1569. <div class="block">Creates MOG2 Background Subtractor</div>
  1570. <dl>
  1571. <dt><span class="paramLabel">Parameters:</span></dt>
  1572. <dd><code>history</code> - Length of the history.</dd>
  1573. <dd><code>varThreshold</code> - Threshold on the squared Mahalanobis distance between the pixel and the model
  1574. to decide whether a pixel is well described by the background model. This parameter does not
  1575. affect the background update.
  1576. speed a bit, so if you do not need this feature, set the parameter to false.</dd>
  1577. <dt><span class="returnLabel">Returns:</span></dt>
  1578. <dd>automatically generated</dd>
  1579. </dl>
  1580. </li>
  1581. </ul>
  1582. <a name="createBackgroundSubtractorMOG2-int-double-boolean-">
  1583. <!-- -->
  1584. </a>
  1585. <ul class="blockList">
  1586. <li class="blockList">
  1587. <h4>createBackgroundSubtractorMOG2</h4>
  1588. <pre>public static&nbsp;<a href="../../../org/opencv/video/BackgroundSubtractorMOG2.html" title="class in org.opencv.video">BackgroundSubtractorMOG2</a>&nbsp;createBackgroundSubtractorMOG2(int&nbsp;history,
  1589. double&nbsp;varThreshold,
  1590. boolean&nbsp;detectShadows)</pre>
  1591. <div class="block">Creates MOG2 Background Subtractor</div>
  1592. <dl>
  1593. <dt><span class="paramLabel">Parameters:</span></dt>
  1594. <dd><code>history</code> - Length of the history.</dd>
  1595. <dd><code>varThreshold</code> - Threshold on the squared Mahalanobis distance between the pixel and the model
  1596. to decide whether a pixel is well described by the background model. This parameter does not
  1597. affect the background update.</dd>
  1598. <dd><code>detectShadows</code> - If true, the algorithm will detect shadows and mark them. It decreases the
  1599. speed a bit, so if you do not need this feature, set the parameter to false.</dd>
  1600. <dt><span class="returnLabel">Returns:</span></dt>
  1601. <dd>automatically generated</dd>
  1602. </dl>
  1603. </li>
  1604. </ul>
  1605. <a name="findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-">
  1606. <!-- -->
  1607. </a>
  1608. <ul class="blockList">
  1609. <li class="blockList">
  1610. <h4>findTransformECC</h4>
  1611. <pre>public static&nbsp;double&nbsp;findTransformECC(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  1612. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  1613. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix)</pre>
  1614. </li>
  1615. </ul>
  1616. <a name="findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-int-">
  1617. <!-- -->
  1618. </a>
  1619. <ul class="blockList">
  1620. <li class="blockList">
  1621. <h4>findTransformECC</h4>
  1622. <pre>public static&nbsp;double&nbsp;findTransformECC(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  1623. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  1624. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix,
  1625. int&nbsp;motionType)</pre>
  1626. </li>
  1627. </ul>
  1628. <a name="findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-int-org.opencv.core.TermCriteria-">
  1629. <!-- -->
  1630. </a>
  1631. <ul class="blockList">
  1632. <li class="blockList">
  1633. <h4>findTransformECC</h4>
  1634. <pre>public static&nbsp;double&nbsp;findTransformECC(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  1635. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  1636. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix,
  1637. int&nbsp;motionType,
  1638. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria)</pre>
  1639. </li>
  1640. </ul>
  1641. <a name="findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-int-org.opencv.core.TermCriteria-org.opencv.core.Mat-">
  1642. <!-- -->
  1643. </a>
  1644. <ul class="blockList">
  1645. <li class="blockList">
  1646. <h4>findTransformECC</h4>
  1647. <pre>public static&nbsp;double&nbsp;findTransformECC(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  1648. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  1649. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix,
  1650. int&nbsp;motionType,
  1651. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria,
  1652. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputMask)</pre>
  1653. </li>
  1654. </ul>
  1655. <a name="findTransformECC-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-int-org.opencv.core.TermCriteria-org.opencv.core.Mat-int-">
  1656. <!-- -->
  1657. </a>
  1658. <ul class="blockList">
  1659. <li class="blockList">
  1660. <h4>findTransformECC</h4>
  1661. <pre>public static&nbsp;double&nbsp;findTransformECC(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;templateImage,
  1662. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputImage,
  1663. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;warpMatrix,
  1664. int&nbsp;motionType,
  1665. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria,
  1666. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;inputMask,
  1667. int&nbsp;gaussFiltSize)</pre>
  1668. <div class="block">Finds the geometric transform (warp) between two images in terms of the ECC criterion CITE: EP08 .</div>
  1669. <dl>
  1670. <dt><span class="paramLabel">Parameters:</span></dt>
  1671. <dd><code>templateImage</code> - single-channel template image; CV_8U or CV_32F array.</dd>
  1672. <dd><code>inputImage</code> - single-channel input image which should be warped with the final warpMatrix in
  1673. order to provide an image similar to templateImage, same type as templateImage.</dd>
  1674. <dd><code>warpMatrix</code> - floating-point \(2\times 3\) or \(3\times 3\) mapping matrix (warp).</dd>
  1675. <dd><code>motionType</code> - parameter, specifying the type of motion:
  1676. <ul>
  1677. <li>
  1678. <b>MOTION_TRANSLATION</b> sets a translational motion model; warpMatrix is \(2\times 3\) with
  1679. the first \(2\times 2\) part being the unity matrix and the rest two parameters being
  1680. estimated.
  1681. </li>
  1682. <li>
  1683. <b>MOTION_EUCLIDEAN</b> sets a Euclidean (rigid) transformation as motion model; three
  1684. parameters are estimated; warpMatrix is \(2\times 3\).
  1685. </li>
  1686. <li>
  1687. <b>MOTION_AFFINE</b> sets an affine motion model (DEFAULT); six parameters are estimated;
  1688. warpMatrix is \(2\times 3\).
  1689. </li>
  1690. <li>
  1691. <b>MOTION_HOMOGRAPHY</b> sets a homography as a motion model; eight parameters are
  1692. estimated;\<code>warpMatrix\</code> is \(3\times 3\).
  1693. </li>
  1694. </ul></dd>
  1695. <dd><code>criteria</code> - parameter, specifying the termination criteria of the ECC algorithm;
  1696. criteria.epsilon defines the threshold of the increment in the correlation coefficient between two
  1697. iterations (a negative criteria.epsilon makes criteria.maxcount the only termination criterion).
  1698. Default values are shown in the declaration above.</dd>
  1699. <dd><code>inputMask</code> - An optional mask to indicate valid values of inputImage.</dd>
  1700. <dd><code>gaussFiltSize</code> - An optional value indicating size of gaussian blur filter; (DEFAULT: 5)
  1701. The function estimates the optimum transformation (warpMatrix) with respect to ECC criterion
  1702. (CITE: EP08), that is
  1703. \(\texttt{warpMatrix} = \arg\max_{W} \texttt{ECC}(\texttt{templateImage}(x,y),\texttt{inputImage}(x',y'))\)
  1704. where
  1705. \(\begin{bmatrix} x' \\ y' \end{bmatrix} = W \cdot \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}\)
  1706. (the equation holds with homogeneous coordinates for homography). It returns the final enhanced
  1707. correlation coefficient, that is the correlation coefficient between the template image and the
  1708. final warped input image. When a \(3\times 3\) matrix is given with motionType =0, 1 or 2, the third
  1709. row is ignored.
  1710. Unlike findHomography and estimateRigidTransform, the function findTransformECC implements an
  1711. area-based alignment that builds on intensity similarities. In essence, the function updates the
  1712. initial transformation that roughly aligns the images. If this information is missing, the identity
  1713. warp (unity matrix) is used as an initialization. Note that if images undergo strong
  1714. displacements/rotations, an initial transformation that roughly aligns the images is necessary
  1715. (e.g., a simple euclidean/similarity transform that allows for the images showing the same image
  1716. content approximately). Use inverse warping in the second image to take an image close to the first
  1717. one, i.e. use the flag WARP_INVERSE_MAP with warpAffine or warpPerspective. See also the OpenCV
  1718. sample image_alignment.cpp that demonstrates the use of the function. Note that the function throws
  1719. an exception if algorithm does not converges.
  1720. SEE:
  1721. computeECC, estimateAffine2D, estimateAffinePartial2D, findHomography</dd>
  1722. <dt><span class="returnLabel">Returns:</span></dt>
  1723. <dd>automatically generated</dd>
  1724. </dl>
  1725. </li>
  1726. </ul>
  1727. <a name="meanShift-org.opencv.core.Mat-org.opencv.core.Rect-org.opencv.core.TermCriteria-">
  1728. <!-- -->
  1729. </a>
  1730. <ul class="blockList">
  1731. <li class="blockList">
  1732. <h4>meanShift</h4>
  1733. <pre>public static&nbsp;int&nbsp;meanShift(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;probImage,
  1734. <a href="../../../org/opencv/core/Rect.html" title="class in org.opencv.core">Rect</a>&nbsp;window,
  1735. <a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core">TermCriteria</a>&nbsp;criteria)</pre>
  1736. <div class="block">Finds an object on a back projection image.</div>
  1737. <dl>
  1738. <dt><span class="paramLabel">Parameters:</span></dt>
  1739. <dd><code>probImage</code> - Back projection of the object histogram. See calcBackProject for details.</dd>
  1740. <dd><code>window</code> - Initial search window.</dd>
  1741. <dd><code>criteria</code> - Stop criteria for the iterative search algorithm.
  1742. returns
  1743. : Number of iterations CAMSHIFT took to converge.
  1744. The function implements the iterative object search algorithm. It takes the input back projection of
  1745. an object and the initial position. The mass center in window of the back projection image is
  1746. computed and the search window center shifts to the mass center. The procedure is repeated until the
  1747. specified number of iterations criteria.maxCount is done or until the window center shifts by less
  1748. than criteria.epsilon. The algorithm is used inside CamShift and, unlike CamShift , the search
  1749. window size or orientation do not change during the search. You can simply pass the output of
  1750. calcBackProject to this function. But better results can be obtained if you pre-filter the back
  1751. projection and remove the noise. For example, you can do this by retrieving connected components
  1752. with findContours , throwing away contours with small area ( contourArea ), and rendering the
  1753. remaining contours with drawContours.</dd>
  1754. <dt><span class="returnLabel">Returns:</span></dt>
  1755. <dd>automatically generated</dd>
  1756. </dl>
  1757. </li>
  1758. </ul>
  1759. <a name="readOpticalFlow-java.lang.String-">
  1760. <!-- -->
  1761. </a>
  1762. <ul class="blockList">
  1763. <li class="blockList">
  1764. <h4>readOpticalFlow</h4>
  1765. <pre>public static&nbsp;<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;readOpticalFlow(java.lang.String&nbsp;path)</pre>
  1766. <div class="block">Read a .flo file</div>
  1767. <dl>
  1768. <dt><span class="paramLabel">Parameters:</span></dt>
  1769. <dd><code>path</code> - Path to the file to be loaded
  1770. The function readOpticalFlow loads a flow field from a file and returns it as a single matrix.
  1771. Resulting Mat has a type CV_32FC2 - floating-point, 2-channel. First channel corresponds to the
  1772. flow in the horizontal direction (u), second - vertical (v).</dd>
  1773. <dt><span class="returnLabel">Returns:</span></dt>
  1774. <dd>automatically generated</dd>
  1775. </dl>
  1776. </li>
  1777. </ul>
  1778. <a name="writeOpticalFlow-java.lang.String-org.opencv.core.Mat-">
  1779. <!-- -->
  1780. </a>
  1781. <ul class="blockListLast">
  1782. <li class="blockList">
  1783. <h4>writeOpticalFlow</h4>
  1784. <pre>public static&nbsp;boolean&nbsp;writeOpticalFlow(java.lang.String&nbsp;path,
  1785. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;flow)</pre>
  1786. <div class="block">Write a .flo to disk</div>
  1787. <dl>
  1788. <dt><span class="paramLabel">Parameters:</span></dt>
  1789. <dd><code>path</code> - Path to the file to be written</dd>
  1790. <dd><code>flow</code> - Flow field to be stored
  1791. The function stores a flow field in a file, returns true on success, false otherwise.
  1792. The flow field must be a 2-channel, floating-point matrix (CV_32FC2). First channel corresponds
  1793. to the flow in the horizontal direction (u), second - vertical (v).</dd>
  1794. <dt><span class="returnLabel">Returns:</span></dt>
  1795. <dd>automatically generated</dd>
  1796. </dl>
  1797. </li>
  1798. </ul>
  1799. </li>
  1800. </ul>
  1801. </li>
  1802. </ul>
  1803. </div>
  1804. </div>
  1805. <!-- ========= END OF CLASS DATA ========= -->
  1806. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  1807. <div class="bottomNav"><a name="navbar.bottom">
  1808. <!-- -->
  1809. </a>
  1810. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  1811. <a name="navbar.bottom.firstrow">
  1812. <!-- -->
  1813. </a>
  1814. <ul class="navList" title="Navigation">
  1815. <li><a href="../../../overview-summary.html">Overview</a></li>
  1816. <li><a href="package-summary.html">Package</a></li>
  1817. <li class="navBarCell1Rev">Class</li>
  1818. <li><a href="package-tree.html">Tree</a></li>
  1819. <li><a href="../../../index-all.html">Index</a></li>
  1820. <li><a href="../../../help-doc.html">Help</a></li>
  1821. </ul>
  1822. <div class="aboutLanguage">
  1823. <script>
  1824. var url = window.location.href;
  1825. var pos = url.lastIndexOf('/javadoc/');
  1826. url = pos >= 0 ? (url.substring(0, pos) + '/javadoc/mymath.js') : (window.location.origin + '/mymath.js');
  1827. var script = document.createElement('script');
  1828. script.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML,' + url;
  1829. document.getElementsByTagName('head')[0].appendChild(script);
  1830. </script>
  1831. </div>
  1832. </div>
  1833. <div class="subNav">
  1834. <ul class="navList">
  1835. <li><a href="../../../org/opencv/video/VariationalRefinement.html" title="class in org.opencv.video"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  1836. <li>Next&nbsp;Class</li>
  1837. </ul>
  1838. <ul class="navList">
  1839. <li><a href="../../../index.html?org/opencv/video/Video.html" target="_top">Frames</a></li>
  1840. <li><a href="Video.html" target="_top">No&nbsp;Frames</a></li>
  1841. </ul>
  1842. <ul class="navList" id="allclasses_navbar_bottom">
  1843. <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  1844. </ul>
  1845. <div>
  1846. <script type="text/javascript"><!--
  1847. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  1848. if(window==top) {
  1849. allClassesLink.style.display = "block";
  1850. }
  1851. else {
  1852. allClassesLink.style.display = "none";
  1853. }
  1854. //-->
  1855. </script>
  1856. </div>
  1857. <div>
  1858. <ul class="subNavList">
  1859. <li>Summary:&nbsp;</li>
  1860. <li>Nested&nbsp;|&nbsp;</li>
  1861. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  1862. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  1863. <li><a href="#method.summary">Method</a></li>
  1864. </ul>
  1865. <ul class="subNavList">
  1866. <li>Detail:&nbsp;</li>
  1867. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  1868. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  1869. <li><a href="#method.detail">Method</a></li>
  1870. </ul>
  1871. </div>
  1872. <a name="skip.navbar.bottom">
  1873. <!-- -->
  1874. </a></div>
  1875. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  1876. <p class="legalCopy"><small>Generated on 2023-06-28 12:47:21 / OpenCV 4.8.0</small></p>
  1877. </body>
  1878. </html>