chillerlan-QRCode-Detector-Detector.html 56 KB

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