chillerlan-QRCode-Detector-Detector.html 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="namespaces/chillerlan.html">chillerlan</a></h4>
  56. <ul class="phpdocumentor-list">
  57. <li>
  58. <a href="namespaces/chillerlan-qrcode.html">QRCode</a>
  59. </li>
  60. <li>
  61. <a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a>
  62. </li>
  63. </ul>
  64. </section>
  65. <section class="phpdocumentor-sidebar__category">
  66. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  67. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
  68. </section>
  69. <section class="phpdocumentor-sidebar__category">
  70. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  71. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  72. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  73. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  74. </section>
  75. <section class="phpdocumentor-sidebar__category">
  76. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  78. </section>
  79. </aside>
  80. <div class="phpdocumentor-column -eight phpdocumentor-content">
  81. <ul class="phpdocumentor-breadcrumbs">
  82. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  83. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  84. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-detector.html">Detector</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. Detector
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. </h2>
  96. <aside class="phpdocumentor-element-found-in">
  97. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  98. :
  99. <span class="phpdocumentor-element-found-in__line">26</span>
  100. </aside>
  101. <p class="phpdocumentor-summary">&lt;p&gt;Encapsulates logic that can detect a QR Code in an image, even if the QR Code
  102. is rotated or skewed, or partially obscured.&lt;/p&gt;</p>
  103. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  104. Tags
  105. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  106. </h5>
  107. <dl class="phpdocumentor-tag-list">
  108. <dt class="phpdocumentor-tag-list__entry">
  109. <span class="phpdocumentor-tag__name">author</span>
  110. </dt>
  111. <dd class="phpdocumentor-tag-list__definition">
  112. <section class="phpdocumentor-description"><p>Sean Owen</p>
  113. </section>
  114. </dd>
  115. </dl>
  116. <h3 id="toc">
  117. Table of Contents
  118. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  119. </h3>
  120. <dl class="phpdocumentor-table-of-contents">
  121. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  122. <a href="classes/chillerlan-QRCode-Detector-Detector.html#property_bitMatrix">$bitMatrix</a>
  123. <span>
  124. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  125. </dt>
  126. <dd></dd>
  127. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  128. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method___construct">__construct()</a>
  129. <span>
  130. &nbsp;: mixed </span>
  131. </dt>
  132. <dd>Detector constructor.</dd>
  133. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  134. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_detect">detect()</a>
  135. <span>
  136. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  137. </dt>
  138. <dd>&lt;p&gt;Detects a QR Code in an image.&lt;/p&gt;</dd>
  139. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  140. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSize">calculateModuleSize()</a>
  141. <span>
  142. &nbsp;: float </span>
  143. </dt>
  144. <dd>&lt;p&gt;Computes an average estimated module size based on estimated derived from the positions
  145. of the three finder patterns.&lt;/p&gt;</dd>
  146. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  147. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSizeOneWay">calculateModuleSizeOneWay()</a>
  148. <span>
  149. &nbsp;: float </span>
  150. </dt>
  151. <dd>&lt;p&gt;Estimates module size based on two finder patterns -- it uses
  152. {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the
  153. width of each, measuring along the axis between their centers.&lt;/p&gt;</dd>
  154. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  155. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_computeDimension">computeDimension()</a>
  156. <span>
  157. &nbsp;: int </span>
  158. </dt>
  159. <dd>&lt;p&gt;Computes the dimension (number of modules on a size) of the QR Code based on the position
  160. of the finder patterns and estimated module size.&lt;/p&gt;</dd>
  161. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  162. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_createTransform">createTransform()</a>
  163. <span>
  164. &nbsp;: <a href="classes/chillerlan-QRCode-Detector-PerspectiveTransform.html"><abbr title="\chillerlan\QRCode\Detector\PerspectiveTransform">PerspectiveTransform</abbr></a> </span>
  165. </dt>
  166. <dd></dd>
  167. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  168. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_findAlignmentInRegion">findAlignmentInRegion()</a>
  169. <span>
  170. &nbsp;: <a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null </span>
  171. </dt>
  172. <dd>&lt;p&gt;Attempts to locate an alignment pattern in a limited region of the image, which is
  173. guessed to contain it.&lt;/p&gt;</dd>
  174. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  175. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRun">sizeOfBlackWhiteBlackRun()</a>
  176. <span>
  177. &nbsp;: float </span>
  178. </dt>
  179. <dd>&lt;p&gt;This method traces a line from a po$in the image, in the direction towards another point.</dd>
  180. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  181. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRunBothWays">sizeOfBlackWhiteBlackRunBothWays()</a>
  182. <span>
  183. &nbsp;: float </span>
  184. </dt>
  185. <dd>See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of
  186. a finder pattern by looking for a black-white-black run from the center in the direction
  187. of another po$(another finder pattern center), and in the opposite direction too.&lt;/p&gt;</dd>
  188. </dl>
  189. <section class="phpdocumentor-properties">
  190. <h3 class="phpdocumentor-elements__header" id="properties">
  191. Properties
  192. <a href="classes/chillerlan-QRCode-Detector-Detector.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  193. </h3>
  194. <article
  195. class="
  196. phpdocumentor-element
  197. -property
  198. -private
  199. "
  200. >
  201. <h4 class="phpdocumentor-element__name" id="property_bitMatrix">
  202. $bitMatrix
  203. <a href="classes/chillerlan-QRCode-Detector-Detector.html#property_bitMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  204. <span class="phpdocumentor-element__modifiers">
  205. </span>
  206. </h4>
  207. <aside class="phpdocumentor-element-found-in">
  208. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  209. :
  210. <span class="phpdocumentor-element-found-in__line">28</span>
  211. </aside>
  212. <code class="phpdocumentor-code phpdocumentor-signature ">
  213. <span class="phpdocumentor-signature__visibility">private</span>
  214. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  215. <span class="phpdocumentor-signature__name">$bitMatrix</span>
  216. </code>
  217. <section class="phpdocumentor-description"></section>
  218. <section class="phpdocumentor-description"></section>
  219. </article>
  220. </section>
  221. <section class="phpdocumentor-methods">
  222. <h3 class="phpdocumentor-elements__header" id="methods">
  223. Methods
  224. <a href="classes/chillerlan-QRCode-Detector-Detector.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  225. </h3>
  226. <article
  227. class="phpdocumentor-element
  228. -method
  229. -public
  230. "
  231. >
  232. <h4 class="phpdocumentor-element__name" id="method___construct">
  233. __construct()
  234. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  235. </h4>
  236. <aside class="phpdocumentor-element-found-in">
  237. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  238. :
  239. <span class="phpdocumentor-element-found-in__line">33</span>
  240. </aside>
  241. <p class="phpdocumentor-summary">Detector constructor.</p>
  242. <code class="phpdocumentor-code phpdocumentor-signature ">
  243. <span class="phpdocumentor-signature__visibility">public</span>
  244. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$image</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  245. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  246. <dl class="phpdocumentor-argument-list">
  247. <dt class="phpdocumentor-argument-list__entry">
  248. <span class="phpdocumentor-signature__argument__name">$image</span>
  249. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  250. </dt>
  251. <dd class="phpdocumentor-argument-list__definition">
  252. <section class="phpdocumentor-description"></section>
  253. </dd>
  254. </dl>
  255. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  256. <span class="phpdocumentor-signature__response_type">mixed</span>
  257. &mdash;
  258. </article>
  259. <article
  260. class="phpdocumentor-element
  261. -method
  262. -public
  263. "
  264. >
  265. <h4 class="phpdocumentor-element__name" id="method_detect">
  266. detect()
  267. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_detect" class="headerlink"><i class="fas fa-link"></i></a>
  268. </h4>
  269. <aside class="phpdocumentor-element-found-in">
  270. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  271. :
  272. <span class="phpdocumentor-element-found-in__line">40</span>
  273. </aside>
  274. <p class="phpdocumentor-summary">&lt;p&gt;Detects a QR Code in an image.&lt;/p&gt;</p>
  275. <code class="phpdocumentor-code phpdocumentor-signature ">
  276. <span class="phpdocumentor-signature__visibility">public</span>
  277. <span class="phpdocumentor-signature__name">detect</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span></code>
  278. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  279. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  280. &mdash;
  281. </article>
  282. <article
  283. class="phpdocumentor-element
  284. -method
  285. -private
  286. "
  287. >
  288. <h4 class="phpdocumentor-element__name" id="method_calculateModuleSize">
  289. calculateModuleSize()
  290. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSize" class="headerlink"><i class="fas fa-link"></i></a>
  291. </h4>
  292. <aside class="phpdocumentor-element-found-in">
  293. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  294. :
  295. <span class="phpdocumentor-element-found-in__line">82</span>
  296. </aside>
  297. <p class="phpdocumentor-summary">&lt;p&gt;Computes an average estimated module size based on estimated derived from the positions
  298. of the three finder patterns.&lt;/p&gt;</p>
  299. <code class="phpdocumentor-code phpdocumentor-signature ">
  300. <span class="phpdocumentor-signature__visibility">private</span>
  301. <span class="phpdocumentor-signature__name">calculateModuleSize</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$topLeft</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$topRight</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bottomLeft</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  302. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  303. <dl class="phpdocumentor-argument-list">
  304. <dt class="phpdocumentor-argument-list__entry">
  305. <span class="phpdocumentor-signature__argument__name">$topLeft</span>
  306. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  307. </dt>
  308. <dd class="phpdocumentor-argument-list__definition">
  309. <section class="phpdocumentor-description"></section>
  310. </dd>
  311. <dt class="phpdocumentor-argument-list__entry">
  312. <span class="phpdocumentor-signature__argument__name">$topRight</span>
  313. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  314. </dt>
  315. <dd class="phpdocumentor-argument-list__definition">
  316. <section class="phpdocumentor-description"></section>
  317. </dd>
  318. <dt class="phpdocumentor-argument-list__entry">
  319. <span class="phpdocumentor-signature__argument__name">$bottomLeft</span>
  320. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  321. </dt>
  322. <dd class="phpdocumentor-argument-list__definition">
  323. <section class="phpdocumentor-description"></section>
  324. </dd>
  325. </dl>
  326. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  327. Tags
  328. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  329. </h5>
  330. <dl class="phpdocumentor-tag-list">
  331. <dt class="phpdocumentor-tag-list__entry">
  332. <span class="phpdocumentor-tag__name">throws</span>
  333. </dt>
  334. <dd class="phpdocumentor-tag-list__definition">
  335. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  336. </dd>
  337. </dl>
  338. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  339. <span class="phpdocumentor-signature__response_type">float</span>
  340. &mdash;
  341. </article>
  342. <article
  343. class="phpdocumentor-element
  344. -method
  345. -private
  346. "
  347. >
  348. <h4 class="phpdocumentor-element__name" id="method_calculateModuleSizeOneWay">
  349. calculateModuleSizeOneWay()
  350. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSizeOneWay" class="headerlink"><i class="fas fa-link"></i></a>
  351. </h4>
  352. <aside class="phpdocumentor-element-found-in">
  353. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  354. :
  355. <span class="phpdocumentor-element-found-in__line">101</span>
  356. </aside>
  357. <p class="phpdocumentor-summary">&lt;p&gt;Estimates module size based on two finder patterns -- it uses
  358. {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the
  359. width of each, measuring along the axis between their centers.&lt;/p&gt;</p>
  360. <code class="phpdocumentor-code phpdocumentor-signature ">
  361. <span class="phpdocumentor-signature__visibility">private</span>
  362. <span class="phpdocumentor-signature__name">calculateModuleSizeOneWay</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$pattern</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$otherPattern</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  363. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  364. <dl class="phpdocumentor-argument-list">
  365. <dt class="phpdocumentor-argument-list__entry">
  366. <span class="phpdocumentor-signature__argument__name">$pattern</span>
  367. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  368. </dt>
  369. <dd class="phpdocumentor-argument-list__definition">
  370. <section class="phpdocumentor-description"></section>
  371. </dd>
  372. <dt class="phpdocumentor-argument-list__entry">
  373. <span class="phpdocumentor-signature__argument__name">$otherPattern</span>
  374. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  375. </dt>
  376. <dd class="phpdocumentor-argument-list__definition">
  377. <section class="phpdocumentor-description"></section>
  378. </dd>
  379. </dl>
  380. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  381. <span class="phpdocumentor-signature__response_type">float</span>
  382. &mdash;
  383. </article>
  384. <article
  385. class="phpdocumentor-element
  386. -method
  387. -private
  388. "
  389. >
  390. <h4 class="phpdocumentor-element__name" id="method_computeDimension">
  391. computeDimension()
  392. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_computeDimension" class="headerlink"><i class="fas fa-link"></i></a>
  393. </h4>
  394. <aside class="phpdocumentor-element-found-in">
  395. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  396. :
  397. <span class="phpdocumentor-element-found-in__line">248</span>
  398. </aside>
  399. <p class="phpdocumentor-summary">&lt;p&gt;Computes the dimension (number of modules on a size) of the QR Code based on the position
  400. of the finder patterns and estimated module size.&lt;/p&gt;</p>
  401. <code class="phpdocumentor-code phpdocumentor-signature ">
  402. <span class="phpdocumentor-signature__visibility">private</span>
  403. <span class="phpdocumentor-signature__name">computeDimension</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$topLeft</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$topRight</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bottomLeft</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$moduleSize</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  404. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  405. <dl class="phpdocumentor-argument-list">
  406. <dt class="phpdocumentor-argument-list__entry">
  407. <span class="phpdocumentor-signature__argument__name">$topLeft</span>
  408. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  409. </dt>
  410. <dd class="phpdocumentor-argument-list__definition">
  411. <section class="phpdocumentor-description"></section>
  412. </dd>
  413. <dt class="phpdocumentor-argument-list__entry">
  414. <span class="phpdocumentor-signature__argument__name">$topRight</span>
  415. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  416. </dt>
  417. <dd class="phpdocumentor-argument-list__definition">
  418. <section class="phpdocumentor-description"></section>
  419. </dd>
  420. <dt class="phpdocumentor-argument-list__entry">
  421. <span class="phpdocumentor-signature__argument__name">$bottomLeft</span>
  422. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  423. </dt>
  424. <dd class="phpdocumentor-argument-list__definition">
  425. <section class="phpdocumentor-description"></section>
  426. </dd>
  427. <dt class="phpdocumentor-argument-list__entry">
  428. <span class="phpdocumentor-signature__argument__name">$moduleSize</span>
  429. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  430. </dt>
  431. <dd class="phpdocumentor-argument-list__definition">
  432. <section class="phpdocumentor-description"></section>
  433. </dd>
  434. </dl>
  435. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  436. Tags
  437. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  438. </h5>
  439. <dl class="phpdocumentor-tag-list">
  440. <dt class="phpdocumentor-tag-list__entry">
  441. <span class="phpdocumentor-tag__name">throws</span>
  442. </dt>
  443. <dd class="phpdocumentor-tag-list__definition">
  444. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  445. </dd>
  446. </dl>
  447. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  448. <span class="phpdocumentor-signature__response_type">int</span>
  449. &mdash;
  450. </article>
  451. <article
  452. class="phpdocumentor-element
  453. -method
  454. -private
  455. "
  456. >
  457. <h4 class="phpdocumentor-element__name" id="method_createTransform">
  458. createTransform()
  459. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_createTransform" class="headerlink"><i class="fas fa-link"></i></a>
  460. </h4>
  461. <aside class="phpdocumentor-element-found-in">
  462. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  463. :
  464. <span class="phpdocumentor-element-found-in__line">322</span>
  465. </aside>
  466. <code class="phpdocumentor-code phpdocumentor-signature ">
  467. <span class="phpdocumentor-signature__visibility">private</span>
  468. <span class="phpdocumentor-signature__name">createTransform</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$topLeft</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$topRight</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$bottomLeft</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$dimension</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$alignmentPattern</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-PerspectiveTransform.html"><abbr title="\chillerlan\QRCode\Detector\PerspectiveTransform">PerspectiveTransform</abbr></a></span></code>
  469. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  470. <dl class="phpdocumentor-argument-list">
  471. <dt class="phpdocumentor-argument-list__entry">
  472. <span class="phpdocumentor-signature__argument__name">$topLeft</span>
  473. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  474. </dt>
  475. <dd class="phpdocumentor-argument-list__definition">
  476. <section class="phpdocumentor-description"></section>
  477. </dd>
  478. <dt class="phpdocumentor-argument-list__entry">
  479. <span class="phpdocumentor-signature__argument__name">$topRight</span>
  480. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  481. </dt>
  482. <dd class="phpdocumentor-argument-list__definition">
  483. <section class="phpdocumentor-description"></section>
  484. </dd>
  485. <dt class="phpdocumentor-argument-list__entry">
  486. <span class="phpdocumentor-signature__argument__name">$bottomLeft</span>
  487. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a></span>
  488. </dt>
  489. <dd class="phpdocumentor-argument-list__definition">
  490. <section class="phpdocumentor-description"></section>
  491. </dd>
  492. <dt class="phpdocumentor-argument-list__entry">
  493. <span class="phpdocumentor-signature__argument__name">$dimension</span>
  494. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  495. </dt>
  496. <dd class="phpdocumentor-argument-list__definition">
  497. <section class="phpdocumentor-description"></section>
  498. </dd>
  499. <dt class="phpdocumentor-argument-list__entry">
  500. <span class="phpdocumentor-signature__argument__name">$alignmentPattern</span>
  501. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a></span>
  502. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  503. <dd class="phpdocumentor-argument-list__definition">
  504. <section class="phpdocumentor-description"></section>
  505. </dd>
  506. </dl>
  507. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  508. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-PerspectiveTransform.html"><abbr title="\chillerlan\QRCode\Detector\PerspectiveTransform">PerspectiveTransform</abbr></a></span>
  509. &mdash;
  510. </article>
  511. <article
  512. class="phpdocumentor-element
  513. -method
  514. -private
  515. "
  516. >
  517. <h4 class="phpdocumentor-element__name" id="method_findAlignmentInRegion">
  518. findAlignmentInRegion()
  519. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_findAlignmentInRegion" class="headerlink"><i class="fas fa-link"></i></a>
  520. </h4>
  521. <aside class="phpdocumentor-element-found-in">
  522. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  523. :
  524. <span class="phpdocumentor-element-found-in__line">288</span>
  525. </aside>
  526. <p class="phpdocumentor-summary">&lt;p&gt;Attempts to locate an alignment pattern in a limited region of the image, which is
  527. guessed to contain it.&lt;/p&gt;</p>
  528. <code class="phpdocumentor-code phpdocumentor-signature ">
  529. <span class="phpdocumentor-signature__visibility">private</span>
  530. <span class="phpdocumentor-signature__name">findAlignmentInRegion</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$overallEstModuleSize</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$estAlignmentX</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$estAlignmentY</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$allowanceFactor</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null</span></code>
  531. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  532. <dl class="phpdocumentor-argument-list">
  533. <dt class="phpdocumentor-argument-list__entry">
  534. <span class="phpdocumentor-signature__argument__name">$overallEstModuleSize</span>
  535. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  536. </dt>
  537. <dd class="phpdocumentor-argument-list__definition">
  538. <section class="phpdocumentor-description"><p>estimated module size so far</p>
  539. </section>
  540. </dd>
  541. <dt class="phpdocumentor-argument-list__entry">
  542. <span class="phpdocumentor-signature__argument__name">$estAlignmentX</span>
  543. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  544. </dt>
  545. <dd class="phpdocumentor-argument-list__definition">
  546. <section class="phpdocumentor-description"><p>x coordinate of center of area probably containing alignment pattern</p>
  547. </section>
  548. </dd>
  549. <dt class="phpdocumentor-argument-list__entry">
  550. <span class="phpdocumentor-signature__argument__name">$estAlignmentY</span>
  551. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  552. </dt>
  553. <dd class="phpdocumentor-argument-list__definition">
  554. <section class="phpdocumentor-description"><p>y coordinate of above</p>
  555. </section>
  556. </dd>
  557. <dt class="phpdocumentor-argument-list__entry">
  558. <span class="phpdocumentor-signature__argument__name">$allowanceFactor</span>
  559. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  560. </dt>
  561. <dd class="phpdocumentor-argument-list__definition">
  562. <section class="phpdocumentor-description"><p>number of pixels in all directions to search from the center</p>
  563. </section>
  564. </dd>
  565. </dl>
  566. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  567. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null</span>
  568. &mdash;
  569. <section class="phpdocumentor-description"><p>if found, or null otherwise</p>
  570. </section>
  571. </article>
  572. <article
  573. class="phpdocumentor-element
  574. -method
  575. -private
  576. "
  577. >
  578. <h4 class="phpdocumentor-element__name" id="method_sizeOfBlackWhiteBlackRun">
  579. sizeOfBlackWhiteBlackRun()
  580. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRun" class="headerlink"><i class="fas fa-link"></i></a>
  581. </h4>
  582. <aside class="phpdocumentor-element-found-in">
  583. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  584. :
  585. <span class="phpdocumentor-element-found-in__line">177</span>
  586. </aside>
  587. <p class="phpdocumentor-summary">&lt;p&gt;This method traces a line from a po$in the image, in the direction towards another point.</p>
  588. <code class="phpdocumentor-code phpdocumentor-signature ">
  589. <span class="phpdocumentor-signature__visibility">private</span>
  590. <span class="phpdocumentor-signature__name">sizeOfBlackWhiteBlackRun</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$fromX</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$fromY</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$toX</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$toY</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  591. <section class="phpdocumentor-description"><p>It begins in a black region, and keeps going until it finds white, then black, then white again.
  592. It reports the distance from the start to this point.</p></p>
  593. <p>This is used when figuring out how wide a finder pattern is, when the finder pattern
  594. may be skewed or rotated.</p>
  595. </section>
  596. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  597. <dl class="phpdocumentor-argument-list">
  598. <dt class="phpdocumentor-argument-list__entry">
  599. <span class="phpdocumentor-signature__argument__name">$fromX</span>
  600. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  601. </dt>
  602. <dd class="phpdocumentor-argument-list__definition">
  603. <section class="phpdocumentor-description"></section>
  604. </dd>
  605. <dt class="phpdocumentor-argument-list__entry">
  606. <span class="phpdocumentor-signature__argument__name">$fromY</span>
  607. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  608. </dt>
  609. <dd class="phpdocumentor-argument-list__definition">
  610. <section class="phpdocumentor-description"></section>
  611. </dd>
  612. <dt class="phpdocumentor-argument-list__entry">
  613. <span class="phpdocumentor-signature__argument__name">$toX</span>
  614. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  615. </dt>
  616. <dd class="phpdocumentor-argument-list__definition">
  617. <section class="phpdocumentor-description"></section>
  618. </dd>
  619. <dt class="phpdocumentor-argument-list__entry">
  620. <span class="phpdocumentor-signature__argument__name">$toY</span>
  621. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  622. </dt>
  623. <dd class="phpdocumentor-argument-list__definition">
  624. <section class="phpdocumentor-description"></section>
  625. </dd>
  626. </dl>
  627. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  628. <span class="phpdocumentor-signature__response_type">float</span>
  629. &mdash;
  630. </article>
  631. <article
  632. class="phpdocumentor-element
  633. -method
  634. -private
  635. "
  636. >
  637. <h4 class="phpdocumentor-element__name" id="method_sizeOfBlackWhiteBlackRunBothWays">
  638. sizeOfBlackWhiteBlackRunBothWays()
  639. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRunBothWays" class="headerlink"><i class="fas fa-link"></i></a>
  640. </h4>
  641. <aside class="phpdocumentor-element-found-in">
  642. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  643. :
  644. <span class="phpdocumentor-element-found-in__line">134</span>
  645. </aside>
  646. <p class="phpdocumentor-summary">See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of
  647. a finder pattern by looking for a black-white-black run from the center in the direction
  648. of another po$(another finder pattern center), and in the opposite direction too.&lt;/p&gt;</p>
  649. <code class="phpdocumentor-code phpdocumentor-signature ">
  650. <span class="phpdocumentor-signature__visibility">private</span>
  651. <span class="phpdocumentor-signature__name">sizeOfBlackWhiteBlackRunBothWays</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$fromX</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$fromY</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$toX</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$toY</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  652. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  653. <dl class="phpdocumentor-argument-list">
  654. <dt class="phpdocumentor-argument-list__entry">
  655. <span class="phpdocumentor-signature__argument__name">$fromX</span>
  656. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  657. </dt>
  658. <dd class="phpdocumentor-argument-list__definition">
  659. <section class="phpdocumentor-description"></section>
  660. </dd>
  661. <dt class="phpdocumentor-argument-list__entry">
  662. <span class="phpdocumentor-signature__argument__name">$fromY</span>
  663. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  664. </dt>
  665. <dd class="phpdocumentor-argument-list__definition">
  666. <section class="phpdocumentor-description"></section>
  667. </dd>
  668. <dt class="phpdocumentor-argument-list__entry">
  669. <span class="phpdocumentor-signature__argument__name">$toX</span>
  670. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  671. </dt>
  672. <dd class="phpdocumentor-argument-list__definition">
  673. <section class="phpdocumentor-description"></section>
  674. </dd>
  675. <dt class="phpdocumentor-argument-list__entry">
  676. <span class="phpdocumentor-signature__argument__name">$toY</span>
  677. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  678. </dt>
  679. <dd class="phpdocumentor-argument-list__definition">
  680. <section class="phpdocumentor-description"></section>
  681. </dd>
  682. </dl>
  683. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  684. <span class="phpdocumentor-signature__response_type">float</span>
  685. &mdash;
  686. </article>
  687. </section>
  688. <script type="text/javascript">
  689. function loadExternalCodeSnippets(line) {
  690. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  691. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  692. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  693. var language = 'php';
  694. var code = document.createElement('code');
  695. code.className = 'language-' + language;
  696. pre.textContent = '';
  697. pre.setAttribute('data-line', line)
  698. code.textContent = 'Loading…';
  699. pre.appendChild(code);
  700. var xhr = new XMLHttpRequest();
  701. xhr.open('GET', src, true);
  702. xhr.onreadystatechange = function () {
  703. if (xhr.readyState == 4) {
  704. if (xhr.status < 400 && xhr.responseText) {
  705. code.textContent = xhr.responseText;
  706. Prism.highlightElement(code);
  707. }
  708. else if (xhr.status >= 400) {
  709. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  710. }
  711. else {
  712. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  713. }
  714. }
  715. };
  716. xhr.send(null);
  717. });
  718. }
  719. var modals = document.querySelectorAll("[data-modal]");
  720. modals.forEach(function (trigger) {
  721. trigger.addEventListener("click", function (event) {
  722. //event.preventDefault();
  723. const modal = document.getElementById(trigger.dataset.modal);
  724. modal.classList.add("phpdocumentor-modal__open");
  725. loadExternalCodeSnippets(trigger.dataset.line)
  726. const exits = modal.querySelectorAll("[data-exit-button]");
  727. exits.forEach(function (exit) {
  728. exit.addEventListener("click", function (event) {
  729. event.preventDefault();
  730. modal.classList.remove("phpdocumentor-modal__open");
  731. });
  732. });
  733. });
  734. });
  735. </script>
  736. </article>
  737. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  738. <section class="phpdocumentor-search-results__dialog">
  739. <header class="phpdocumentor-search-results__header">
  740. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  741. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  742. </header>
  743. <section class="phpdocumentor-search-results__body">
  744. <ul class="phpdocumentor-search-results__entries"></ul>
  745. </section>
  746. </section>
  747. </section>
  748. </div>
  749. </div>
  750. <a href="classes/chillerlan-QRCode-Detector-Detector.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  751. </main>
  752. <script>
  753. cssVars({});
  754. </script>
  755. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  756. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  757. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  758. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  759. </body>
  760. </html>