chillerlan-QRCode-Detector-Detector.html 61 KB

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