chillerlan-QRCode-Detector-Detector.html 56 KB

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