chillerlan-QRCode-Detector-Detector.html 66 KB

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