IntelligentScissorsMB.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745
  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:25 UTC 2023 -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <title>IntelligentScissorsMB (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="IntelligentScissorsMB (OpenCV 4.8.0 Java documentation)";
  17. }
  18. }
  19. catch(err) {
  20. }
  21. //-->
  22. var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
  23. var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance 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/imgproc/Imgproc.html" title="class in org.opencv.imgproc"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  62. <li><a href="../../../org/opencv/imgproc/LineSegmentDetector.html" title="class in org.opencv.imgproc"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  63. </ul>
  64. <ul class="navList">
  65. <li><a href="../../../index.html?org/opencv/imgproc/IntelligentScissorsMB.html" target="_top">Frames</a></li>
  66. <li><a href="IntelligentScissorsMB.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>Field&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>Field&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.imgproc</div>
  105. <h2 title="Class IntelligentScissorsMB" class="title">Class IntelligentScissorsMB</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.imgproc.IntelligentScissorsMB</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">IntelligentScissorsMB</span>
  122. extends java.lang.Object</pre>
  123. <div class="block">Intelligent Scissors image segmentation
  124. This class is used to find the path (contour) between two points
  125. which can be used for image segmentation.
  126. Usage example:
  127. SNIPPET: snippets/imgproc_segmentation.cpp usage_example_intelligent_scissors
  128. Reference: &lt;a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.138.3811&amp;rep=rep1&amp;type=pdf"&gt;"Intelligent Scissors for Image Composition"&lt;/a&gt;
  129. algorithm designed by Eric N. Mortensen and William A. Barrett, Brigham Young University
  130. CITE: Mortensen95intelligentscissors</div>
  131. </li>
  132. </ul>
  133. </div>
  134. <div class="summary">
  135. <ul class="blockList">
  136. <li class="blockList">
  137. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  138. <ul class="blockList">
  139. <li class="blockList"><a name="constructor.summary">
  140. <!-- -->
  141. </a>
  142. <h3>Constructor Summary</h3>
  143. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  144. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  145. <tr>
  146. <th class="colOne" scope="col">Constructor and Description</th>
  147. </tr>
  148. <tr class="altColor">
  149. <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#IntelligentScissorsMB--">IntelligentScissorsMB</a></span>()</code>&nbsp;</td>
  150. </tr>
  151. </table>
  152. </li>
  153. </ul>
  154. <!-- ========== METHOD SUMMARY =========== -->
  155. <ul class="blockList">
  156. <li class="blockList"><a name="method.summary">
  157. <!-- -->
  158. </a>
  159. <h3>Method Summary</h3>
  160. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  161. <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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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>
  162. <tr>
  163. <th class="colFirst" scope="col">Modifier and Type</th>
  164. <th class="colLast" scope="col">Method and Description</th>
  165. </tr>
  166. <tr id="i0" class="altColor">
  167. <td class="colFirst"><code>static <a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  168. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#Z:Z__fromPtr__-long-">__fromPtr__</a></span>(long&nbsp;addr)</code>&nbsp;</td>
  169. </tr>
  170. <tr id="i1" class="rowColor">
  171. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  172. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#applyImage-org.opencv.core.Mat-">applyImage</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;image)</code>
  173. <div class="block">Specify input image and extract image features</div>
  174. </td>
  175. </tr>
  176. <tr id="i2" class="altColor">
  177. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  178. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#applyImageFeatures-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-">applyImageFeatures</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;non_edge,
  179. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;gradient_direction,
  180. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;gradient_magnitude)</code>
  181. <div class="block">Specify custom features of input image
  182. Customized advanced variant of applyImage() call.</div>
  183. </td>
  184. </tr>
  185. <tr id="i3" class="rowColor">
  186. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  187. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#applyImageFeatures-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-">applyImageFeatures</a></span>(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;non_edge,
  188. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;gradient_direction,
  189. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;gradient_magnitude,
  190. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;image)</code>
  191. <div class="block">Specify custom features of input image
  192. Customized advanced variant of applyImage() call.</div>
  193. </td>
  194. </tr>
  195. <tr id="i4" class="altColor">
  196. <td class="colFirst"><code>void</code></td>
  197. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#buildMap-org.opencv.core.Point-">buildMap</a></span>(<a href="../../../org/opencv/core/Point.html" title="class in org.opencv.core">Point</a>&nbsp;sourcePt)</code>
  198. <div class="block">Prepares a map of optimal paths for the given source point on the image
  199. <b>Note:</b> applyImage() / applyImageFeatures() must be called before this call</div>
  200. </td>
  201. </tr>
  202. <tr id="i5" class="rowColor">
  203. <td class="colFirst"><code>void</code></td>
  204. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#getContour-org.opencv.core.Point-org.opencv.core.Mat-">getContour</a></span>(<a href="../../../org/opencv/core/Point.html" title="class in org.opencv.core">Point</a>&nbsp;targetPt,
  205. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;contour)</code>
  206. <div class="block">Extracts optimal contour for the given target point on the image
  207. <b>Note:</b> buildMap() must be called before this call</div>
  208. </td>
  209. </tr>
  210. <tr id="i6" class="altColor">
  211. <td class="colFirst"><code>void</code></td>
  212. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#getContour-org.opencv.core.Point-org.opencv.core.Mat-boolean-">getContour</a></span>(<a href="../../../org/opencv/core/Point.html" title="class in org.opencv.core">Point</a>&nbsp;targetPt,
  213. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;contour,
  214. boolean&nbsp;backward)</code>
  215. <div class="block">Extracts optimal contour for the given target point on the image
  216. <b>Note:</b> buildMap() must be called before this call</div>
  217. </td>
  218. </tr>
  219. <tr id="i7" class="rowColor">
  220. <td class="colFirst"><code>long</code></td>
  221. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#getNativeObjAddr--">getNativeObjAddr</a></span>()</code>&nbsp;</td>
  222. </tr>
  223. <tr id="i8" class="altColor">
  224. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  225. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#setEdgeFeatureCannyParameters-double-double-">setEdgeFeatureCannyParameters</a></span>(double&nbsp;threshold1,
  226. double&nbsp;threshold2)</code>
  227. <div class="block">Switch edge feature extractor to use Canny edge detector
  228. <b>Note:</b> "Laplacian Zero-Crossing" feature extractor is used by default (following to original article)
  229. SEE: Canny</div>
  230. </td>
  231. </tr>
  232. <tr id="i9" class="rowColor">
  233. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  234. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#setEdgeFeatureCannyParameters-double-double-int-">setEdgeFeatureCannyParameters</a></span>(double&nbsp;threshold1,
  235. double&nbsp;threshold2,
  236. int&nbsp;apertureSize)</code>
  237. <div class="block">Switch edge feature extractor to use Canny edge detector
  238. <b>Note:</b> "Laplacian Zero-Crossing" feature extractor is used by default (following to original article)
  239. SEE: Canny</div>
  240. </td>
  241. </tr>
  242. <tr id="i10" class="altColor">
  243. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  244. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#setEdgeFeatureCannyParameters-double-double-int-boolean-">setEdgeFeatureCannyParameters</a></span>(double&nbsp;threshold1,
  245. double&nbsp;threshold2,
  246. int&nbsp;apertureSize,
  247. boolean&nbsp;L2gradient)</code>
  248. <div class="block">Switch edge feature extractor to use Canny edge detector
  249. <b>Note:</b> "Laplacian Zero-Crossing" feature extractor is used by default (following to original article)
  250. SEE: Canny</div>
  251. </td>
  252. </tr>
  253. <tr id="i11" class="rowColor">
  254. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  255. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#setEdgeFeatureZeroCrossingParameters--">setEdgeFeatureZeroCrossingParameters</a></span>()</code>
  256. <div class="block">Switch to "Laplacian Zero-Crossing" edge feature extractor and specify its parameters
  257. This feature extractor is used by default according to article.</div>
  258. </td>
  259. </tr>
  260. <tr id="i12" class="altColor">
  261. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  262. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#setEdgeFeatureZeroCrossingParameters-float-">setEdgeFeatureZeroCrossingParameters</a></span>(float&nbsp;gradient_magnitude_min_value)</code>
  263. <div class="block">Switch to "Laplacian Zero-Crossing" edge feature extractor and specify its parameters
  264. This feature extractor is used by default according to article.</div>
  265. </td>
  266. </tr>
  267. <tr id="i13" class="rowColor">
  268. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  269. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#setGradientMagnitudeMaxLimit--">setGradientMagnitudeMaxLimit</a></span>()</code>
  270. <div class="block">Specify gradient magnitude max value threshold
  271. Zero limit value is used to disable gradient magnitude thresholding (default behavior, as described in original article).</div>
  272. </td>
  273. </tr>
  274. <tr id="i14" class="altColor">
  275. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  276. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#setGradientMagnitudeMaxLimit-float-">setGradientMagnitudeMaxLimit</a></span>(float&nbsp;gradient_magnitude_threshold_max)</code>
  277. <div class="block">Specify gradient magnitude max value threshold
  278. Zero limit value is used to disable gradient magnitude thresholding (default behavior, as described in original article).</div>
  279. </td>
  280. </tr>
  281. <tr id="i15" class="rowColor">
  282. <td class="colFirst"><code><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a></code></td>
  283. <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html#setWeights-float-float-float-">setWeights</a></span>(float&nbsp;weight_non_edge,
  284. float&nbsp;weight_gradient_direction,
  285. float&nbsp;weight_gradient_magnitude)</code>
  286. <div class="block">Specify weights of feature functions
  287. Consider keeping weights normalized (sum of weights equals to 1.0)
  288. Discrete dynamic programming (DP) goal is minimization of costs between pixels.</div>
  289. </td>
  290. </tr>
  291. </table>
  292. <ul class="blockList">
  293. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  294. <!-- -->
  295. </a>
  296. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  297. <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
  298. </ul>
  299. </li>
  300. </ul>
  301. </li>
  302. </ul>
  303. </div>
  304. <div class="details">
  305. <ul class="blockList">
  306. <li class="blockList">
  307. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  308. <ul class="blockList">
  309. <li class="blockList"><a name="constructor.detail">
  310. <!-- -->
  311. </a>
  312. <h3>Constructor Detail</h3>
  313. <a name="IntelligentScissorsMB--">
  314. <!-- -->
  315. </a>
  316. <ul class="blockListLast">
  317. <li class="blockList">
  318. <h4>IntelligentScissorsMB</h4>
  319. <pre>public&nbsp;IntelligentScissorsMB()</pre>
  320. </li>
  321. </ul>
  322. </li>
  323. </ul>
  324. <!-- ============ METHOD DETAIL ========== -->
  325. <ul class="blockList">
  326. <li class="blockList"><a name="method.detail">
  327. <!-- -->
  328. </a>
  329. <h3>Method Detail</h3>
  330. <a name="Z:Z__fromPtr__-long-">
  331. <!-- -->
  332. </a>
  333. <ul class="blockList">
  334. <li class="blockList">
  335. <h4>__fromPtr__</h4>
  336. <pre>public static&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;__fromPtr__(long&nbsp;addr)</pre>
  337. </li>
  338. </ul>
  339. <a name="applyImage-org.opencv.core.Mat-">
  340. <!-- -->
  341. </a>
  342. <ul class="blockList">
  343. <li class="blockList">
  344. <h4>applyImage</h4>
  345. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;applyImage(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;image)</pre>
  346. <div class="block">Specify input image and extract image features</div>
  347. <dl>
  348. <dt><span class="paramLabel">Parameters:</span></dt>
  349. <dd><code>image</code> - input image. Type is #CV_8UC1 / #CV_8UC3</dd>
  350. <dt><span class="returnLabel">Returns:</span></dt>
  351. <dd>automatically generated</dd>
  352. </dl>
  353. </li>
  354. </ul>
  355. <a name="applyImageFeatures-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-">
  356. <!-- -->
  357. </a>
  358. <ul class="blockList">
  359. <li class="blockList">
  360. <h4>applyImageFeatures</h4>
  361. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;applyImageFeatures(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;non_edge,
  362. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;gradient_direction,
  363. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;gradient_magnitude)</pre>
  364. <div class="block">Specify custom features of input image
  365. Customized advanced variant of applyImage() call.</div>
  366. <dl>
  367. <dt><span class="paramLabel">Parameters:</span></dt>
  368. <dd><code>non_edge</code> - Specify cost of non-edge pixels. Type is CV_8UC1. Expected values are <code>{0, 1}</code>.</dd>
  369. <dd><code>gradient_direction</code> - Specify gradient direction feature. Type is CV_32FC2. Values are expected to be normalized: <code>x^2 + y^2 == 1</code></dd>
  370. <dd><code>gradient_magnitude</code> - Specify cost of gradient magnitude function: Type is CV_32FC1. Values should be in range <code>[0, 1]</code>.</dd>
  371. <dt><span class="returnLabel">Returns:</span></dt>
  372. <dd>automatically generated</dd>
  373. </dl>
  374. </li>
  375. </ul>
  376. <a name="applyImageFeatures-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-org.opencv.core.Mat-">
  377. <!-- -->
  378. </a>
  379. <ul class="blockList">
  380. <li class="blockList">
  381. <h4>applyImageFeatures</h4>
  382. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;applyImageFeatures(<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;non_edge,
  383. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;gradient_direction,
  384. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;gradient_magnitude,
  385. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;image)</pre>
  386. <div class="block">Specify custom features of input image
  387. Customized advanced variant of applyImage() call.</div>
  388. <dl>
  389. <dt><span class="paramLabel">Parameters:</span></dt>
  390. <dd><code>non_edge</code> - Specify cost of non-edge pixels. Type is CV_8UC1. Expected values are <code>{0, 1}</code>.</dd>
  391. <dd><code>gradient_direction</code> - Specify gradient direction feature. Type is CV_32FC2. Values are expected to be normalized: <code>x^2 + y^2 == 1</code></dd>
  392. <dd><code>gradient_magnitude</code> - Specify cost of gradient magnitude function: Type is CV_32FC1. Values should be in range <code>[0, 1]</code>.</dd>
  393. <dd><code>image</code> - <b>Optional parameter</b>. Must be specified if subset of features is specified (non-specified features are calculated internally)</dd>
  394. <dt><span class="returnLabel">Returns:</span></dt>
  395. <dd>automatically generated</dd>
  396. </dl>
  397. </li>
  398. </ul>
  399. <a name="buildMap-org.opencv.core.Point-">
  400. <!-- -->
  401. </a>
  402. <ul class="blockList">
  403. <li class="blockList">
  404. <h4>buildMap</h4>
  405. <pre>public&nbsp;void&nbsp;buildMap(<a href="../../../org/opencv/core/Point.html" title="class in org.opencv.core">Point</a>&nbsp;sourcePt)</pre>
  406. <div class="block">Prepares a map of optimal paths for the given source point on the image
  407. <b>Note:</b> applyImage() / applyImageFeatures() must be called before this call</div>
  408. <dl>
  409. <dt><span class="paramLabel">Parameters:</span></dt>
  410. <dd><code>sourcePt</code> - The source point used to find the paths</dd>
  411. </dl>
  412. </li>
  413. </ul>
  414. <a name="getContour-org.opencv.core.Point-org.opencv.core.Mat-">
  415. <!-- -->
  416. </a>
  417. <ul class="blockList">
  418. <li class="blockList">
  419. <h4>getContour</h4>
  420. <pre>public&nbsp;void&nbsp;getContour(<a href="../../../org/opencv/core/Point.html" title="class in org.opencv.core">Point</a>&nbsp;targetPt,
  421. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;contour)</pre>
  422. <div class="block">Extracts optimal contour for the given target point on the image
  423. <b>Note:</b> buildMap() must be called before this call</div>
  424. <dl>
  425. <dt><span class="paramLabel">Parameters:</span></dt>
  426. <dd><code>targetPt</code> - The target point</dd>
  427. <dd><code>contour</code> - The list of pixels which contains optimal path between the source and the target points of the image. Type is CV_32SC2 (compatible with <code>std::vector&amp;lt;Point&amp;gt;</code>)</dd>
  428. </dl>
  429. </li>
  430. </ul>
  431. <a name="getContour-org.opencv.core.Point-org.opencv.core.Mat-boolean-">
  432. <!-- -->
  433. </a>
  434. <ul class="blockList">
  435. <li class="blockList">
  436. <h4>getContour</h4>
  437. <pre>public&nbsp;void&nbsp;getContour(<a href="../../../org/opencv/core/Point.html" title="class in org.opencv.core">Point</a>&nbsp;targetPt,
  438. <a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core">Mat</a>&nbsp;contour,
  439. boolean&nbsp;backward)</pre>
  440. <div class="block">Extracts optimal contour for the given target point on the image
  441. <b>Note:</b> buildMap() must be called before this call</div>
  442. <dl>
  443. <dt><span class="paramLabel">Parameters:</span></dt>
  444. <dd><code>targetPt</code> - The target point</dd>
  445. <dd><code>contour</code> - The list of pixels which contains optimal path between the source and the target points of the image. Type is CV_32SC2 (compatible with <code>std::vector&amp;lt;Point&amp;gt;</code>)</dd>
  446. <dd><code>backward</code> - Flag to indicate reverse order of retrived pixels (use "true" value to fetch points from the target to the source point)</dd>
  447. </dl>
  448. </li>
  449. </ul>
  450. <a name="getNativeObjAddr--">
  451. <!-- -->
  452. </a>
  453. <ul class="blockList">
  454. <li class="blockList">
  455. <h4>getNativeObjAddr</h4>
  456. <pre>public&nbsp;long&nbsp;getNativeObjAddr()</pre>
  457. </li>
  458. </ul>
  459. <a name="setEdgeFeatureCannyParameters-double-double-">
  460. <!-- -->
  461. </a>
  462. <ul class="blockList">
  463. <li class="blockList">
  464. <h4>setEdgeFeatureCannyParameters</h4>
  465. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;setEdgeFeatureCannyParameters(double&nbsp;threshold1,
  466. double&nbsp;threshold2)</pre>
  467. <div class="block">Switch edge feature extractor to use Canny edge detector
  468. <b>Note:</b> "Laplacian Zero-Crossing" feature extractor is used by default (following to original article)
  469. SEE: Canny</div>
  470. <dl>
  471. <dt><span class="paramLabel">Parameters:</span></dt>
  472. <dd><code>threshold1</code> - automatically generated</dd>
  473. <dd><code>threshold2</code> - automatically generated</dd>
  474. <dt><span class="returnLabel">Returns:</span></dt>
  475. <dd>automatically generated</dd>
  476. </dl>
  477. </li>
  478. </ul>
  479. <a name="setEdgeFeatureCannyParameters-double-double-int-">
  480. <!-- -->
  481. </a>
  482. <ul class="blockList">
  483. <li class="blockList">
  484. <h4>setEdgeFeatureCannyParameters</h4>
  485. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;setEdgeFeatureCannyParameters(double&nbsp;threshold1,
  486. double&nbsp;threshold2,
  487. int&nbsp;apertureSize)</pre>
  488. <div class="block">Switch edge feature extractor to use Canny edge detector
  489. <b>Note:</b> "Laplacian Zero-Crossing" feature extractor is used by default (following to original article)
  490. SEE: Canny</div>
  491. <dl>
  492. <dt><span class="paramLabel">Parameters:</span></dt>
  493. <dd><code>threshold1</code> - automatically generated</dd>
  494. <dd><code>threshold2</code> - automatically generated</dd>
  495. <dd><code>apertureSize</code> - automatically generated</dd>
  496. <dt><span class="returnLabel">Returns:</span></dt>
  497. <dd>automatically generated</dd>
  498. </dl>
  499. </li>
  500. </ul>
  501. <a name="setEdgeFeatureCannyParameters-double-double-int-boolean-">
  502. <!-- -->
  503. </a>
  504. <ul class="blockList">
  505. <li class="blockList">
  506. <h4>setEdgeFeatureCannyParameters</h4>
  507. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;setEdgeFeatureCannyParameters(double&nbsp;threshold1,
  508. double&nbsp;threshold2,
  509. int&nbsp;apertureSize,
  510. boolean&nbsp;L2gradient)</pre>
  511. <div class="block">Switch edge feature extractor to use Canny edge detector
  512. <b>Note:</b> "Laplacian Zero-Crossing" feature extractor is used by default (following to original article)
  513. SEE: Canny</div>
  514. <dl>
  515. <dt><span class="paramLabel">Parameters:</span></dt>
  516. <dd><code>threshold1</code> - automatically generated</dd>
  517. <dd><code>threshold2</code> - automatically generated</dd>
  518. <dd><code>apertureSize</code> - automatically generated</dd>
  519. <dd><code>L2gradient</code> - automatically generated</dd>
  520. <dt><span class="returnLabel">Returns:</span></dt>
  521. <dd>automatically generated</dd>
  522. </dl>
  523. </li>
  524. </ul>
  525. <a name="setEdgeFeatureZeroCrossingParameters--">
  526. <!-- -->
  527. </a>
  528. <ul class="blockList">
  529. <li class="blockList">
  530. <h4>setEdgeFeatureZeroCrossingParameters</h4>
  531. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;setEdgeFeatureZeroCrossingParameters()</pre>
  532. <div class="block">Switch to "Laplacian Zero-Crossing" edge feature extractor and specify its parameters
  533. This feature extractor is used by default according to article.
  534. Implementation has additional filtering for regions with low-amplitude noise.
  535. This filtering is enabled through parameter of minimal gradient amplitude (use some small value 4, 8, 16).
  536. <b>Note:</b> Current implementation of this feature extractor is based on processing of grayscale images (color image is converted to grayscale image first).
  537. <b>Note:</b> Canny edge detector is a bit slower, but provides better results (especially on color images): use setEdgeFeatureCannyParameters().</div>
  538. <dl>
  539. <dt><span class="returnLabel">Returns:</span></dt>
  540. <dd>automatically generated</dd>
  541. </dl>
  542. </li>
  543. </ul>
  544. <a name="setEdgeFeatureZeroCrossingParameters-float-">
  545. <!-- -->
  546. </a>
  547. <ul class="blockList">
  548. <li class="blockList">
  549. <h4>setEdgeFeatureZeroCrossingParameters</h4>
  550. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;setEdgeFeatureZeroCrossingParameters(float&nbsp;gradient_magnitude_min_value)</pre>
  551. <div class="block">Switch to "Laplacian Zero-Crossing" edge feature extractor and specify its parameters
  552. This feature extractor is used by default according to article.
  553. Implementation has additional filtering for regions with low-amplitude noise.
  554. This filtering is enabled through parameter of minimal gradient amplitude (use some small value 4, 8, 16).
  555. <b>Note:</b> Current implementation of this feature extractor is based on processing of grayscale images (color image is converted to grayscale image first).
  556. <b>Note:</b> Canny edge detector is a bit slower, but provides better results (especially on color images): use setEdgeFeatureCannyParameters().</div>
  557. <dl>
  558. <dt><span class="paramLabel">Parameters:</span></dt>
  559. <dd><code>gradient_magnitude_min_value</code> - Minimal gradient magnitude value for edge pixels (default: 0, check is disabled)</dd>
  560. <dt><span class="returnLabel">Returns:</span></dt>
  561. <dd>automatically generated</dd>
  562. </dl>
  563. </li>
  564. </ul>
  565. <a name="setGradientMagnitudeMaxLimit--">
  566. <!-- -->
  567. </a>
  568. <ul class="blockList">
  569. <li class="blockList">
  570. <h4>setGradientMagnitudeMaxLimit</h4>
  571. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;setGradientMagnitudeMaxLimit()</pre>
  572. <div class="block">Specify gradient magnitude max value threshold
  573. Zero limit value is used to disable gradient magnitude thresholding (default behavior, as described in original article).
  574. Otherwize pixels with <code>gradient magnitude &amp;gt;= threshold</code> have zero cost.
  575. <b>Note:</b> Thresholding should be used for images with irregular regions (to avoid stuck on parameters from high-contract areas, like embedded logos).</div>
  576. <dl>
  577. <dt><span class="returnLabel">Returns:</span></dt>
  578. <dd>automatically generated</dd>
  579. </dl>
  580. </li>
  581. </ul>
  582. <a name="setGradientMagnitudeMaxLimit-float-">
  583. <!-- -->
  584. </a>
  585. <ul class="blockList">
  586. <li class="blockList">
  587. <h4>setGradientMagnitudeMaxLimit</h4>
  588. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;setGradientMagnitudeMaxLimit(float&nbsp;gradient_magnitude_threshold_max)</pre>
  589. <div class="block">Specify gradient magnitude max value threshold
  590. Zero limit value is used to disable gradient magnitude thresholding (default behavior, as described in original article).
  591. Otherwize pixels with <code>gradient magnitude &amp;gt;= threshold</code> have zero cost.
  592. <b>Note:</b> Thresholding should be used for images with irregular regions (to avoid stuck on parameters from high-contract areas, like embedded logos).</div>
  593. <dl>
  594. <dt><span class="paramLabel">Parameters:</span></dt>
  595. <dd><code>gradient_magnitude_threshold_max</code> - Specify gradient magnitude max value threshold (default: 0, disabled)</dd>
  596. <dt><span class="returnLabel">Returns:</span></dt>
  597. <dd>automatically generated</dd>
  598. </dl>
  599. </li>
  600. </ul>
  601. <a name="setWeights-float-float-float-">
  602. <!-- -->
  603. </a>
  604. <ul class="blockListLast">
  605. <li class="blockList">
  606. <h4>setWeights</h4>
  607. <pre>public&nbsp;<a href="../../../org/opencv/imgproc/IntelligentScissorsMB.html" title="class in org.opencv.imgproc">IntelligentScissorsMB</a>&nbsp;setWeights(float&nbsp;weight_non_edge,
  608. float&nbsp;weight_gradient_direction,
  609. float&nbsp;weight_gradient_magnitude)</pre>
  610. <div class="block">Specify weights of feature functions
  611. Consider keeping weights normalized (sum of weights equals to 1.0)
  612. Discrete dynamic programming (DP) goal is minimization of costs between pixels.</div>
  613. <dl>
  614. <dt><span class="paramLabel">Parameters:</span></dt>
  615. <dd><code>weight_non_edge</code> - Specify cost of non-edge pixels (default: 0.43f)</dd>
  616. <dd><code>weight_gradient_direction</code> - Specify cost of gradient direction function (default: 0.43f)</dd>
  617. <dd><code>weight_gradient_magnitude</code> - Specify cost of gradient magnitude function (default: 0.14f)</dd>
  618. <dt><span class="returnLabel">Returns:</span></dt>
  619. <dd>automatically generated</dd>
  620. </dl>
  621. </li>
  622. </ul>
  623. </li>
  624. </ul>
  625. </li>
  626. </ul>
  627. </div>
  628. </div>
  629. <!-- ========= END OF CLASS DATA ========= -->
  630. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  631. <div class="bottomNav"><a name="navbar.bottom">
  632. <!-- -->
  633. </a>
  634. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  635. <a name="navbar.bottom.firstrow">
  636. <!-- -->
  637. </a>
  638. <ul class="navList" title="Navigation">
  639. <li><a href="../../../overview-summary.html">Overview</a></li>
  640. <li><a href="package-summary.html">Package</a></li>
  641. <li class="navBarCell1Rev">Class</li>
  642. <li><a href="package-tree.html">Tree</a></li>
  643. <li><a href="../../../index-all.html">Index</a></li>
  644. <li><a href="../../../help-doc.html">Help</a></li>
  645. </ul>
  646. <div class="aboutLanguage">
  647. <script>
  648. var url = window.location.href;
  649. var pos = url.lastIndexOf('/javadoc/');
  650. url = pos >= 0 ? (url.substring(0, pos) + '/javadoc/mymath.js') : (window.location.origin + '/mymath.js');
  651. var script = document.createElement('script');
  652. script.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML,' + url;
  653. document.getElementsByTagName('head')[0].appendChild(script);
  654. </script>
  655. </div>
  656. </div>
  657. <div class="subNav">
  658. <ul class="navList">
  659. <li><a href="../../../org/opencv/imgproc/Imgproc.html" title="class in org.opencv.imgproc"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  660. <li><a href="../../../org/opencv/imgproc/LineSegmentDetector.html" title="class in org.opencv.imgproc"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  661. </ul>
  662. <ul class="navList">
  663. <li><a href="../../../index.html?org/opencv/imgproc/IntelligentScissorsMB.html" target="_top">Frames</a></li>
  664. <li><a href="IntelligentScissorsMB.html" target="_top">No&nbsp;Frames</a></li>
  665. </ul>
  666. <ul class="navList" id="allclasses_navbar_bottom">
  667. <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  668. </ul>
  669. <div>
  670. <script type="text/javascript"><!--
  671. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  672. if(window==top) {
  673. allClassesLink.style.display = "block";
  674. }
  675. else {
  676. allClassesLink.style.display = "none";
  677. }
  678. //-->
  679. </script>
  680. </div>
  681. <div>
  682. <ul class="subNavList">
  683. <li>Summary:&nbsp;</li>
  684. <li>Nested&nbsp;|&nbsp;</li>
  685. <li>Field&nbsp;|&nbsp;</li>
  686. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  687. <li><a href="#method.summary">Method</a></li>
  688. </ul>
  689. <ul class="subNavList">
  690. <li>Detail:&nbsp;</li>
  691. <li>Field&nbsp;|&nbsp;</li>
  692. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  693. <li><a href="#method.detail">Method</a></li>
  694. </ul>
  695. </div>
  696. <a name="skip.navbar.bottom">
  697. <!-- -->
  698. </a></div>
  699. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  700. <p class="legalCopy"><small>Generated on 2023-06-28 12:47:21 / OpenCV 4.8.0</small></p>
  701. </body>
  702. </html>