chillerlan-QRCode-Detector-FinderPatternFinder.html 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750
  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. <h4 class="phpdocumentor-sidebar__root-namespace">
  89. <a href="namespaces/output.html" class="">Output</a>
  90. </h4>
  91. </section>
  92. <section class="phpdocumentor-sidebar__category -packages">
  93. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  94. <h4 class="phpdocumentor-sidebar__root-namespace">
  95. <a href="packages/Application.html" class="">Application</a>
  96. </h4>
  97. </section>
  98. <section class="phpdocumentor-sidebar__category -reports">
  99. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  100. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  101. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  102. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  103. </section>
  104. <section class="phpdocumentor-sidebar__category -indices">
  105. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  106. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  107. </section>
  108. </aside>
  109. <div class="phpdocumentor-column -nine phpdocumentor-content">
  110. <section>
  111. <ul class="phpdocumentor-breadcrumbs">
  112. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  113. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  114. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-detector.html">Detector</a></li>
  115. </ul>
  116. <article class="phpdocumentor-element -class">
  117. <h2 class="phpdocumentor-content__title">
  118. FinderPatternFinder
  119. <div class="phpdocumentor-element__package">
  120. in package
  121. <ul class="phpdocumentor-breadcrumbs">
  122. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  123. </ul>
  124. </div>
  125. </h2>
  126. <div class="phpdocumentor-label-line">
  127. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  128. </div>
  129. <aside class="phpdocumentor-element-found-in">
  130. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  131. :
  132. <span class="phpdocumentor-element-found-in__line">28</span>
  133. </aside>
  134. <p class="phpdocumentor-summary">This class attempts to find finder patterns in a QR Code. Finder patterns are the square
  135. markers at three corners of a QR Code.</p>
  136. <section class="phpdocumentor-description"><p>This class is thread-safe but not reentrant. Each thread must allocate its own object.</p>
  137. </section>
  138. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  139. Tags
  140. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  141. </h5>
  142. <dl class="phpdocumentor-tag-list">
  143. <dt class="phpdocumentor-tag-list__entry">
  144. <span class="phpdocumentor-tag__name">author</span>
  145. </dt>
  146. <dd class="phpdocumentor-tag-list__definition">
  147. <section class="phpdocumentor-description"><p>Sean Owen</p>
  148. </section>
  149. </dd>
  150. </dl>
  151. <h3 id="toc">
  152. Table of Contents
  153. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  154. </h3>
  155. <h4 id="toc-constants">
  156. Constants
  157. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#toc-constants" class="headerlink"><i class="fas fa-link"></i></a>
  158. </h4>
  159. <dl class="phpdocumentor-table-of-contents">
  160. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  161. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_CENTER_QUORUM">CENTER_QUORUM</a>
  162. <span>
  163. &nbsp;= 2 </span>
  164. </dt>
  165. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  166. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MAX_MODULES">MAX_MODULES</a>
  167. <span>
  168. &nbsp;= 177 </span>
  169. </dt>
  170. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  171. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MIN_SKIP">MIN_SKIP</a>
  172. <span>
  173. &nbsp;= 2 </span>
  174. </dt>
  175. </dl>
  176. <h4 id="toc-properties">
  177. Properties
  178. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  179. </h4>
  180. <dl class="phpdocumentor-table-of-contents">
  181. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  182. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_hasSkipped">$hasSkipped</a>
  183. <span>
  184. &nbsp;: bool </span>
  185. </dt>
  186. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  187. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_matrix">$matrix</a>
  188. <span>
  189. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  190. </dt>
  191. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  192. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_possibleCenters">$possibleCenters</a>
  193. <span>
  194. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt; </span>
  195. </dt>
  196. </dl>
  197. <h4 id="toc-methods">
  198. Methods
  199. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  200. </h4>
  201. <dl class="phpdocumentor-table-of-contents">
  202. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  203. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method___construct">__construct()</a>
  204. <span>
  205. &nbsp;: mixed </span>
  206. </dt>
  207. <dd>Creates a finder that will search the image for three finder patterns.</dd>
  208. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  209. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_find">find()</a>
  210. <span>
  211. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt; </span>
  212. </dt>
  213. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  214. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_centerFromEnd">centerFromEnd()</a>
  215. <span>
  216. &nbsp;: float </span>
  217. </dt>
  218. <dd>Given a count of black/white/black/white/black pixels just seen and an end position,
  219. figures the location of the center of this run.</dd>
  220. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  221. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckDiagonal">crossCheckDiagonal()</a>
  222. <span>
  223. &nbsp;: bool </span>
  224. </dt>
  225. <dd>After a vertical and horizontal scan finds a potential finder pattern, this method
  226. &quot;cross-cross-cross-checks&quot; by scanning down diagonally through the center of the possible
  227. finder pattern to see if the same proportion is detected.</dd>
  228. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  229. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckHorizontal">crossCheckHorizontal()</a>
  230. <span>
  231. &nbsp;: float|null </span>
  232. </dt>
  233. <dd>Like #crossCheckVertical(int, int, int, int), and in fact is basically identical,
  234. except it reads horizontally instead of vertically. This is used to cross-cross
  235. check a vertical cross-check and locate the real center of the alignment pattern.</dd>
  236. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  237. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckVertical">crossCheckVertical()</a>
  238. <span>
  239. &nbsp;: float|null </span>
  240. </dt>
  241. <dd>After a horizontal scan finds a potential finder pattern, this method
  242. &quot;cross-checks&quot; by scanning down vertically through the center of the possible
  243. finder pattern to see if the same proportion is detected.</dd>
  244. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  245. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossProductZ">crossProductZ()</a>
  246. <span>
  247. &nbsp;: float </span>
  248. </dt>
  249. <dd>Returns the z component of the cross product between vectors BC and BA.</dd>
  250. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  251. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_doShiftCounts2">doShiftCounts2()</a>
  252. <span>
  253. &nbsp;: array&lt;string|int, int&gt; </span>
  254. </dt>
  255. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  256. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_findRowSkip">findRowSkip()</a>
  257. <span>
  258. &nbsp;: int </span>
  259. </dt>
  260. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  261. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternCross">foundPatternCross()</a>
  262. <span>
  263. &nbsp;: bool </span>
  264. </dt>
  265. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  266. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternDiagonal">foundPatternDiagonal()</a>
  267. <span>
  268. &nbsp;: bool </span>
  269. </dt>
  270. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  271. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternVariance">foundPatternVariance()</a>
  272. <span>
  273. &nbsp;: bool </span>
  274. </dt>
  275. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  276. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_getCrossCheckStateCount">getCrossCheckStateCount()</a>
  277. <span>
  278. &nbsp;: array&lt;string|int, int&gt; </span>
  279. </dt>
  280. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  281. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_handlePossibleCenter">handlePossibleCenter()</a>
  282. <span>
  283. &nbsp;: bool </span>
  284. </dt>
  285. <dd>This is called when a horizontal scan finds a possible alignment pattern. It will
  286. cross-check with a vertical scan, and if successful, will, ah, cross-cross-check
  287. with another horizontal scan. This is needed primarily to locate the real horizontal
  288. center of the pattern in cases of extreme skew.</dd>
  289. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  290. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_haveMultiplyConfirmedCenters">haveMultiplyConfirmedCenters()</a>
  291. <span>
  292. &nbsp;: bool </span>
  293. </dt>
  294. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  295. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_orderBestPatterns">orderBestPatterns()</a>
  296. <span>
  297. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt; </span>
  298. </dt>
  299. <dd>Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
  300. and BC is less than AC, and the angle between BC and BA is less than 180 degrees.</dd>
  301. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  302. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_selectBestPatterns">selectBestPatterns()</a>
  303. <span>
  304. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt; </span>
  305. </dt>
  306. </dl>
  307. <section class="phpdocumentor-constants">
  308. <h3 class="phpdocumentor-elements__header" id="constants">
  309. Constants
  310. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  311. </h3>
  312. <article class="phpdocumentor-element -constant -private ">
  313. <h4 class="phpdocumentor-element__name" id="constant_CENTER_QUORUM">
  314. CENTER_QUORUM
  315. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_CENTER_QUORUM" class="headerlink"><i class="fas fa-link"></i></a>
  316. </h4>
  317. <aside class="phpdocumentor-element-found-in">
  318. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  319. :
  320. <span class="phpdocumentor-element-found-in__line">32</span>
  321. </aside>
  322. <code class="phpdocumentor-signature phpdocumentor-code ">
  323. <span class="phpdocumentor-signature__visibility">private</span>
  324. <span class="phpdocumentor-signature__type">mixed</span>
  325. <span class="phpdocumentor-signature__name">CENTER_QUORUM</span>
  326. = <span class="phpdocumentor-signature__default-value">2</span>
  327. </code>
  328. </article>
  329. <article class="phpdocumentor-element -constant -private ">
  330. <h4 class="phpdocumentor-element__name" id="constant_MAX_MODULES">
  331. MAX_MODULES
  332. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MAX_MODULES" class="headerlink"><i class="fas fa-link"></i></a>
  333. </h4>
  334. <aside class="phpdocumentor-element-found-in">
  335. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  336. :
  337. <span class="phpdocumentor-element-found-in__line">31</span>
  338. </aside>
  339. <code class="phpdocumentor-signature phpdocumentor-code ">
  340. <span class="phpdocumentor-signature__visibility">private</span>
  341. <span class="phpdocumentor-signature__type">mixed</span>
  342. <span class="phpdocumentor-signature__name">MAX_MODULES</span>
  343. = <span class="phpdocumentor-signature__default-value">177</span>
  344. </code>
  345. </article>
  346. <article class="phpdocumentor-element -constant -private ">
  347. <h4 class="phpdocumentor-element__name" id="constant_MIN_SKIP">
  348. MIN_SKIP
  349. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MIN_SKIP" class="headerlink"><i class="fas fa-link"></i></a>
  350. </h4>
  351. <aside class="phpdocumentor-element-found-in">
  352. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  353. :
  354. <span class="phpdocumentor-element-found-in__line">30</span>
  355. </aside>
  356. <code class="phpdocumentor-signature phpdocumentor-code ">
  357. <span class="phpdocumentor-signature__visibility">private</span>
  358. <span class="phpdocumentor-signature__type">mixed</span>
  359. <span class="phpdocumentor-signature__name">MIN_SKIP</span>
  360. = <span class="phpdocumentor-signature__default-value">2</span>
  361. </code>
  362. </article>
  363. </section>
  364. <section class="phpdocumentor-properties">
  365. <h3 class="phpdocumentor-elements__header" id="properties">
  366. Properties
  367. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  368. </h3>
  369. <article
  370. class="
  371. phpdocumentor-element
  372. -property
  373. -private
  374. "
  375. >
  376. <h4 class="phpdocumentor-element__name" id="property_hasSkipped">
  377. $hasSkipped
  378. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_hasSkipped" class="headerlink"><i class="fas fa-link"></i></a>
  379. <span class="phpdocumentor-element__modifiers">
  380. </span>
  381. </h4>
  382. <aside class="phpdocumentor-element-found-in">
  383. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  384. :
  385. <span class="phpdocumentor-element-found-in__line">36</span>
  386. </aside>
  387. <code class="phpdocumentor-code phpdocumentor-signature ">
  388. <span class="phpdocumentor-signature__visibility">private</span>
  389. <span class="phpdocumentor-signature__type">bool</span>
  390. <span class="phpdocumentor-signature__name">$hasSkipped</span>
  391. = <span class="phpdocumentor-signature__default-value">false</span></code>
  392. </article>
  393. <article
  394. class="
  395. phpdocumentor-element
  396. -property
  397. -private
  398. "
  399. >
  400. <h4 class="phpdocumentor-element__name" id="property_matrix">
  401. $matrix
  402. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  403. <span class="phpdocumentor-element__modifiers">
  404. </span>
  405. </h4>
  406. <aside class="phpdocumentor-element-found-in">
  407. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  408. :
  409. <span class="phpdocumentor-element-found-in__line">33</span>
  410. </aside>
  411. <code class="phpdocumentor-code phpdocumentor-signature ">
  412. <span class="phpdocumentor-signature__visibility">private</span>
  413. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  414. <span class="phpdocumentor-signature__name">$matrix</span>
  415. </code>
  416. </article>
  417. <article
  418. class="
  419. phpdocumentor-element
  420. -property
  421. -private
  422. "
  423. >
  424. <h4 class="phpdocumentor-element__name" id="property_possibleCenters">
  425. $possibleCenters
  426. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_possibleCenters" class="headerlink"><i class="fas fa-link"></i></a>
  427. <span class="phpdocumentor-element__modifiers">
  428. </span>
  429. </h4>
  430. <aside class="phpdocumentor-element-found-in">
  431. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  432. :
  433. <span class="phpdocumentor-element-found-in__line">35</span>
  434. </aside>
  435. <code class="phpdocumentor-code phpdocumentor-signature ">
  436. <span class="phpdocumentor-signature__visibility">private</span>
  437. <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>
  438. <span class="phpdocumentor-signature__name">$possibleCenters</span>
  439. </code>
  440. </article>
  441. </section>
  442. <section class="phpdocumentor-methods">
  443. <h3 class="phpdocumentor-elements__header" id="methods">
  444. Methods
  445. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  446. </h3>
  447. <article
  448. class="phpdocumentor-element
  449. -method
  450. -public
  451. "
  452. >
  453. <h4 class="phpdocumentor-element__name" id="method___construct">
  454. __construct()
  455. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  456. </h4>
  457. <aside class="phpdocumentor-element-found-in">
  458. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  459. :
  460. <span class="phpdocumentor-element-found-in__line">43</span>
  461. </aside>
  462. <p class="phpdocumentor-summary">Creates a finder that will search the image for three finder patterns.</p>
  463. <code class="phpdocumentor-code phpdocumentor-signature ">
  464. <span class="phpdocumentor-signature__visibility">public</span>
  465. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  466. <div class="phpdocumentor-label-line">
  467. </div>
  468. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  469. <dl class="phpdocumentor-argument-list">
  470. <dt class="phpdocumentor-argument-list__entry">
  471. <span class="phpdocumentor-signature__argument__name">$matrix</span>
  472. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  473. </dt>
  474. <dd class="phpdocumentor-argument-list__definition">
  475. <section class="phpdocumentor-description"><p>image to search</p>
  476. </section>
  477. </dd>
  478. </dl>
  479. </article>
  480. <article
  481. class="phpdocumentor-element
  482. -method
  483. -public
  484. "
  485. >
  486. <h4 class="phpdocumentor-element__name" id="method_find">
  487. find()
  488. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_find" class="headerlink"><i class="fas fa-link"></i></a>
  489. </h4>
  490. <aside class="phpdocumentor-element-found-in">
  491. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  492. :
  493. <span class="phpdocumentor-element-found-in__line">51</span>
  494. </aside>
  495. <code class="phpdocumentor-code phpdocumentor-signature ">
  496. <span class="phpdocumentor-signature__visibility">public</span>
  497. <span class="phpdocumentor-signature__name">find</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>
  498. <div class="phpdocumentor-label-line">
  499. </div>
  500. <section>
  501. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  502. <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>
  503. </section>
  504. </article>
  505. <article
  506. class="phpdocumentor-element
  507. -method
  508. -private
  509. "
  510. >
  511. <h4 class="phpdocumentor-element__name" id="method_centerFromEnd">
  512. centerFromEnd()
  513. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_centerFromEnd" class="headerlink"><i class="fas fa-link"></i></a>
  514. </h4>
  515. <aside class="phpdocumentor-element-found-in">
  516. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  517. :
  518. <span class="phpdocumentor-element-found-in__line">190</span>
  519. </aside>
  520. <p class="phpdocumentor-summary">Given a count of black/white/black/white/black pixels just seen and an end position,
  521. figures the location of the center of this run.</p>
  522. <code class="phpdocumentor-code phpdocumentor-signature ">
  523. <span class="phpdocumentor-signature__visibility">private</span>
  524. <span class="phpdocumentor-signature__name">centerFromEnd</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</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">$end</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  525. <div class="phpdocumentor-label-line">
  526. </div>
  527. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  528. <dl class="phpdocumentor-argument-list">
  529. <dt class="phpdocumentor-argument-list__entry">
  530. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  531. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  532. </dt>
  533. <dd class="phpdocumentor-argument-list__definition">
  534. </dd>
  535. <dt class="phpdocumentor-argument-list__entry">
  536. <span class="phpdocumentor-signature__argument__name">$end</span>
  537. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  538. </dt>
  539. <dd class="phpdocumentor-argument-list__definition">
  540. </dd>
  541. </dl>
  542. <section>
  543. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  544. <span class="phpdocumentor-signature__response_type">float</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_crossCheckDiagonal">
  554. crossCheckDiagonal()
  555. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckDiagonal" 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/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  559. :
  560. <span class="phpdocumentor-element-found-in__line">254</span>
  561. </aside>
  562. <p class="phpdocumentor-summary">After a vertical and horizontal scan finds a potential finder pattern, this method
  563. &quot;cross-cross-cross-checks&quot; by scanning down diagonally through the center of the possible
  564. finder pattern to see if the same proportion is detected.</p>
  565. <code class="phpdocumentor-code phpdocumentor-signature ">
  566. <span class="phpdocumentor-signature__visibility">private</span>
  567. <span class="phpdocumentor-signature__name">crossCheckDiagonal</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$centerI</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">$centerJ</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  568. <div class="phpdocumentor-label-line">
  569. </div>
  570. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  571. <dl class="phpdocumentor-argument-list">
  572. <dt class="phpdocumentor-argument-list__entry">
  573. <span class="phpdocumentor-signature__argument__name">$centerI</span>
  574. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  575. </dt>
  576. <dd class="phpdocumentor-argument-list__definition">
  577. <section class="phpdocumentor-description"><p>row where a finder pattern was detected</p>
  578. </section>
  579. </dd>
  580. <dt class="phpdocumentor-argument-list__entry">
  581. <span class="phpdocumentor-signature__argument__name">$centerJ</span>
  582. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  583. </dt>
  584. <dd class="phpdocumentor-argument-list__definition">
  585. <section class="phpdocumentor-description"><p>center of the section that appears to cross a finder pattern</p>
  586. </section>
  587. </dd>
  588. </dl>
  589. <section>
  590. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  591. <span class="phpdocumentor-signature__response_type">bool</span>
  592. &mdash;
  593. <section class="phpdocumentor-description"><p>true if proportions are withing expected limits</p>
  594. </section>
  595. </section>
  596. </article>
  597. <article
  598. class="phpdocumentor-element
  599. -method
  600. -private
  601. "
  602. >
  603. <h4 class="phpdocumentor-element__name" id="method_crossCheckHorizontal">
  604. crossCheckHorizontal()
  605. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckHorizontal" class="headerlink"><i class="fas fa-link"></i></a>
  606. </h4>
  607. <aside class="phpdocumentor-element-found-in">
  608. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  609. :
  610. <span class="phpdocumentor-element-found-in__line">417</span>
  611. </aside>
  612. <p class="phpdocumentor-summary">Like #crossCheckVertical(int, int, int, int), and in fact is basically identical,
  613. except it reads horizontally instead of vertically. This is used to cross-cross
  614. check a vertical cross-check and locate the real center of the alignment pattern.</p>
  615. <code class="phpdocumentor-code phpdocumentor-signature ">
  616. <span class="phpdocumentor-signature__visibility">private</span>
  617. <span class="phpdocumentor-signature__name">crossCheckHorizontal</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$startJ</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">$centerI</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">$maxCount</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">$originalStateCountTotal</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float|null</span></code>
  618. <div class="phpdocumentor-label-line">
  619. </div>
  620. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  621. <dl class="phpdocumentor-argument-list">
  622. <dt class="phpdocumentor-argument-list__entry">
  623. <span class="phpdocumentor-signature__argument__name">$startJ</span>
  624. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  625. </dt>
  626. <dd class="phpdocumentor-argument-list__definition">
  627. </dd>
  628. <dt class="phpdocumentor-argument-list__entry">
  629. <span class="phpdocumentor-signature__argument__name">$centerI</span>
  630. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  631. </dt>
  632. <dd class="phpdocumentor-argument-list__definition">
  633. </dd>
  634. <dt class="phpdocumentor-argument-list__entry">
  635. <span class="phpdocumentor-signature__argument__name">$maxCount</span>
  636. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  637. </dt>
  638. <dd class="phpdocumentor-argument-list__definition">
  639. </dd>
  640. <dt class="phpdocumentor-argument-list__entry">
  641. <span class="phpdocumentor-signature__argument__name">$originalStateCountTotal</span>
  642. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  643. </dt>
  644. <dd class="phpdocumentor-argument-list__definition">
  645. </dd>
  646. </dl>
  647. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  648. Tags
  649. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckHorizontal#tags" class="headerlink"><i class="fas fa-link"></i></a>
  650. </h5>
  651. <dl class="phpdocumentor-tag-list">
  652. <dt class="phpdocumentor-tag-list__entry">
  653. <span class="phpdocumentor-tag__name">noinspection</span>
  654. </dt>
  655. <dd class="phpdocumentor-tag-list__definition">
  656. <section class="phpdocumentor-description"><p>DuplicatedCode</p>
  657. </section>
  658. </dd>
  659. </dl>
  660. <section>
  661. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  662. <span class="phpdocumentor-signature__response_type">float|null</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_crossCheckVertical">
  672. crossCheckVertical()
  673. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckVertical" 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/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  677. :
  678. <span class="phpdocumentor-element-found-in__line">333</span>
  679. </aside>
  680. <p class="phpdocumentor-summary">After a horizontal scan finds a potential finder pattern, this method
  681. &quot;cross-checks&quot; by scanning down vertically through the center of the possible
  682. finder pattern to see if the same proportion is detected.</p>
  683. <code class="phpdocumentor-code phpdocumentor-signature ">
  684. <span class="phpdocumentor-signature__visibility">private</span>
  685. <span class="phpdocumentor-signature__name">crossCheckVertical</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$startI</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">$centerJ</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">$maxCount</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">$originalStateCountTotal</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float|null</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">$startI</span>
  692. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  693. </dt>
  694. <dd class="phpdocumentor-argument-list__definition">
  695. <section class="phpdocumentor-description"><p>row where a finder pattern was detected</p>
  696. </section>
  697. </dd>
  698. <dt class="phpdocumentor-argument-list__entry">
  699. <span class="phpdocumentor-signature__argument__name">$centerJ</span>
  700. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  701. </dt>
  702. <dd class="phpdocumentor-argument-list__definition">
  703. <section class="phpdocumentor-description"><p>center of the section that appears to cross a finder pattern</p>
  704. </section>
  705. </dd>
  706. <dt class="phpdocumentor-argument-list__entry">
  707. <span class="phpdocumentor-signature__argument__name">$maxCount</span>
  708. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  709. </dt>
  710. <dd class="phpdocumentor-argument-list__definition">
  711. <section class="phpdocumentor-description"><p>maximum reasonable number of modules that should be
  712. observed in any reading state, based on the results of the horizontal scan</p>
  713. </section>
  714. </dd>
  715. <dt class="phpdocumentor-argument-list__entry">
  716. <span class="phpdocumentor-signature__argument__name">$originalStateCountTotal</span>
  717. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  718. </dt>
  719. <dd class="phpdocumentor-argument-list__definition">
  720. </dd>
  721. </dl>
  722. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  723. Tags
  724. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckVertical#tags" class="headerlink"><i class="fas fa-link"></i></a>
  725. </h5>
  726. <dl class="phpdocumentor-tag-list">
  727. <dt class="phpdocumentor-tag-list__entry">
  728. <span class="phpdocumentor-tag__name">noinspection</span>
  729. </dt>
  730. <dd class="phpdocumentor-tag-list__definition">
  731. <section class="phpdocumentor-description"><p>DuplicatedCode</p>
  732. </section>
  733. </dd>
  734. </dl>
  735. <section>
  736. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  737. <span class="phpdocumentor-signature__response_type">float|null</span>
  738. &mdash;
  739. <section class="phpdocumentor-description"><p>vertical center of finder pattern, or null if not found</p>
  740. </section>
  741. </section>
  742. </article>
  743. <article
  744. class="phpdocumentor-element
  745. -method
  746. -private
  747. "
  748. >
  749. <h4 class="phpdocumentor-element__name" id="method_crossProductZ">
  750. crossProductZ()
  751. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossProductZ" class="headerlink"><i class="fas fa-link"></i></a>
  752. </h4>
  753. <aside class="phpdocumentor-element-found-in">
  754. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  755. :
  756. <span class="phpdocumentor-element-found-in__line">763</span>
  757. </aside>
  758. <p class="phpdocumentor-summary">Returns the z component of the cross product between vectors BC and BA.</p>
  759. <code class="phpdocumentor-code phpdocumentor-signature ">
  760. <span class="phpdocumentor-signature__visibility">private</span>
  761. <span class="phpdocumentor-signature__name">crossProductZ</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">$pointA</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">$pointB</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">$pointC</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  762. <div class="phpdocumentor-label-line">
  763. </div>
  764. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  765. <dl class="phpdocumentor-argument-list">
  766. <dt class="phpdocumentor-argument-list__entry">
  767. <span class="phpdocumentor-signature__argument__name">$pointA</span>
  768. : <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>
  769. </dt>
  770. <dd class="phpdocumentor-argument-list__definition">
  771. </dd>
  772. <dt class="phpdocumentor-argument-list__entry">
  773. <span class="phpdocumentor-signature__argument__name">$pointB</span>
  774. : <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>
  775. </dt>
  776. <dd class="phpdocumentor-argument-list__definition">
  777. </dd>
  778. <dt class="phpdocumentor-argument-list__entry">
  779. <span class="phpdocumentor-signature__argument__name">$pointC</span>
  780. : <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>
  781. </dt>
  782. <dd class="phpdocumentor-argument-list__definition">
  783. </dd>
  784. </dl>
  785. <section>
  786. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  787. <span class="phpdocumentor-signature__response_type">float</span>
  788. </section>
  789. </article>
  790. <article
  791. class="phpdocumentor-element
  792. -method
  793. -private
  794. "
  795. >
  796. <h4 class="phpdocumentor-element__name" id="method_doShiftCounts2">
  797. doShiftCounts2()
  798. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_doShiftCounts2" class="headerlink"><i class="fas fa-link"></i></a>
  799. </h4>
  800. <aside class="phpdocumentor-element-found-in">
  801. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  802. :
  803. <span class="phpdocumentor-element-found-in__line">174</span>
  804. </aside>
  805. <code class="phpdocumentor-code phpdocumentor-signature ">
  806. <span class="phpdocumentor-signature__visibility">private</span>
  807. <span class="phpdocumentor-signature__name">doShiftCounts2</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span></code>
  808. <div class="phpdocumentor-label-line">
  809. </div>
  810. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  811. <dl class="phpdocumentor-argument-list">
  812. <dt class="phpdocumentor-argument-list__entry">
  813. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  814. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  815. </dt>
  816. <dd class="phpdocumentor-argument-list__definition">
  817. </dd>
  818. </dl>
  819. <section>
  820. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  821. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  822. </section>
  823. </article>
  824. <article
  825. class="phpdocumentor-element
  826. -method
  827. -private
  828. "
  829. >
  830. <h4 class="phpdocumentor-element__name" id="method_findRowSkip">
  831. findRowSkip()
  832. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_findRowSkip" class="headerlink"><i class="fas fa-link"></i></a>
  833. </h4>
  834. <aside class="phpdocumentor-element-found-in">
  835. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  836. :
  837. <span class="phpdocumentor-element-found-in__line">553</span>
  838. </aside>
  839. <code class="phpdocumentor-code phpdocumentor-signature ">
  840. <span class="phpdocumentor-signature__visibility">private</span>
  841. <span class="phpdocumentor-signature__name">findRowSkip</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  842. <div class="phpdocumentor-label-line">
  843. </div>
  844. <section>
  845. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  846. <span class="phpdocumentor-signature__response_type">int</span>
  847. &mdash;
  848. <section class="phpdocumentor-description"><p>number of rows we could safely skip during scanning, based on the first
  849. two finder patterns that have been located. In some cases their position will
  850. allow us to infer that the third pattern must lie below a certain point farther
  851. down in the image.</p>
  852. </section>
  853. </section>
  854. </article>
  855. <article
  856. class="phpdocumentor-element
  857. -method
  858. -private
  859. "
  860. >
  861. <h4 class="phpdocumentor-element__name" id="method_foundPatternCross">
  862. foundPatternCross()
  863. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternCross" class="headerlink"><i class="fas fa-link"></i></a>
  864. </h4>
  865. <aside class="phpdocumentor-element-found-in">
  866. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  867. :
  868. <span class="phpdocumentor-element-found-in__line">197</span>
  869. </aside>
  870. <code class="phpdocumentor-code phpdocumentor-signature ">
  871. <span class="phpdocumentor-signature__visibility">private</span>
  872. <span class="phpdocumentor-signature__name">foundPatternCross</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  873. <div class="phpdocumentor-label-line">
  874. </div>
  875. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  876. <dl class="phpdocumentor-argument-list">
  877. <dt class="phpdocumentor-argument-list__entry">
  878. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  879. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  880. </dt>
  881. <dd class="phpdocumentor-argument-list__definition">
  882. </dd>
  883. </dl>
  884. <section>
  885. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  886. <span class="phpdocumentor-signature__response_type">bool</span>
  887. </section>
  888. </article>
  889. <article
  890. class="phpdocumentor-element
  891. -method
  892. -private
  893. "
  894. >
  895. <h4 class="phpdocumentor-element__name" id="method_foundPatternDiagonal">
  896. foundPatternDiagonal()
  897. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternDiagonal" class="headerlink"><i class="fas fa-link"></i></a>
  898. </h4>
  899. <aside class="phpdocumentor-element-found-in">
  900. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  901. :
  902. <span class="phpdocumentor-element-found-in__line">205</span>
  903. </aside>
  904. <code class="phpdocumentor-code phpdocumentor-signature ">
  905. <span class="phpdocumentor-signature__visibility">private</span>
  906. <span class="phpdocumentor-signature__name">foundPatternDiagonal</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  907. <div class="phpdocumentor-label-line">
  908. </div>
  909. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  910. <dl class="phpdocumentor-argument-list">
  911. <dt class="phpdocumentor-argument-list__entry">
  912. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  913. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  914. </dt>
  915. <dd class="phpdocumentor-argument-list__definition">
  916. </dd>
  917. </dl>
  918. <section>
  919. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  920. <span class="phpdocumentor-signature__response_type">bool</span>
  921. </section>
  922. </article>
  923. <article
  924. class="phpdocumentor-element
  925. -method
  926. -private
  927. "
  928. >
  929. <h4 class="phpdocumentor-element__name" id="method_foundPatternVariance">
  930. foundPatternVariance()
  931. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternVariance" class="headerlink"><i class="fas fa-link"></i></a>
  932. </h4>
  933. <aside class="phpdocumentor-element-found-in">
  934. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  935. :
  936. <span class="phpdocumentor-element-found-in__line">216</span>
  937. </aside>
  938. <code class="phpdocumentor-code phpdocumentor-signature ">
  939. <span class="phpdocumentor-signature__visibility">private</span>
  940. <span class="phpdocumentor-signature__name">foundPatternVariance</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</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">$variance</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  941. <div class="phpdocumentor-label-line">
  942. </div>
  943. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  944. <dl class="phpdocumentor-argument-list">
  945. <dt class="phpdocumentor-argument-list__entry">
  946. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  947. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  948. </dt>
  949. <dd class="phpdocumentor-argument-list__definition">
  950. <section class="phpdocumentor-description"><p>count of black/white/black/white/black pixels just read</p>
  951. </section>
  952. </dd>
  953. <dt class="phpdocumentor-argument-list__entry">
  954. <span class="phpdocumentor-signature__argument__name">$variance</span>
  955. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  956. </dt>
  957. <dd class="phpdocumentor-argument-list__definition">
  958. </dd>
  959. </dl>
  960. <section>
  961. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  962. <span class="phpdocumentor-signature__response_type">bool</span>
  963. &mdash;
  964. <section class="phpdocumentor-description"><p>true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios
  965. used by finder patterns to be considered a match</p>
  966. </section>
  967. </section>
  968. </article>
  969. <article
  970. class="phpdocumentor-element
  971. -method
  972. -private
  973. "
  974. >
  975. <h4 class="phpdocumentor-element__name" id="method_getCrossCheckStateCount">
  976. getCrossCheckStateCount()
  977. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_getCrossCheckStateCount" class="headerlink"><i class="fas fa-link"></i></a>
  978. </h4>
  979. <aside class="phpdocumentor-element-found-in">
  980. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  981. :
  982. <span class="phpdocumentor-element-found-in__line">165</span>
  983. </aside>
  984. <code class="phpdocumentor-code phpdocumentor-signature ">
  985. <span class="phpdocumentor-signature__visibility">private</span>
  986. <span class="phpdocumentor-signature__name">getCrossCheckStateCount</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span></code>
  987. <div class="phpdocumentor-label-line">
  988. </div>
  989. <section>
  990. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  991. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  992. </section>
  993. </article>
  994. <article
  995. class="phpdocumentor-element
  996. -method
  997. -private
  998. "
  999. >
  1000. <h4 class="phpdocumentor-element__name" id="method_handlePossibleCenter">
  1001. handlePossibleCenter()
  1002. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_handlePossibleCenter" class="headerlink"><i class="fas fa-link"></i></a>
  1003. </h4>
  1004. <aside class="phpdocumentor-element-found-in">
  1005. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  1006. :
  1007. <span class="phpdocumentor-element-found-in__line">510</span>
  1008. </aside>
  1009. <p class="phpdocumentor-summary">This is called when a horizontal scan finds a possible alignment pattern. It will
  1010. cross-check with a vertical scan, and if successful, will, ah, cross-cross-check
  1011. with another horizontal scan. This is needed primarily to locate the real horizontal
  1012. center of the pattern in cases of extreme skew.</p>
  1013. <code class="phpdocumentor-code phpdocumentor-signature ">
  1014. <span class="phpdocumentor-signature__visibility">private</span>
  1015. <span class="phpdocumentor-signature__name">handlePossibleCenter</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</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">$i</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">$j</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  1016. <div class="phpdocumentor-label-line">
  1017. </div>
  1018. <section class="phpdocumentor-description"><p>And then we cross-cross-cross check with another diagonal scan.</p>
  1019. <p>If that succeeds the finder pattern location is added to a list that tracks
  1020. the number of times each location has been nearly-matched as a finder pattern.
  1021. Each additional find is more evidence that the location is in fact a finder
  1022. pattern center</p>
  1023. </section>
  1024. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1025. <dl class="phpdocumentor-argument-list">
  1026. <dt class="phpdocumentor-argument-list__entry">
  1027. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  1028. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  1029. </dt>
  1030. <dd class="phpdocumentor-argument-list__definition">
  1031. <section class="phpdocumentor-description"><p>reading state module counts from horizontal scan</p>
  1032. </section>
  1033. </dd>
  1034. <dt class="phpdocumentor-argument-list__entry">
  1035. <span class="phpdocumentor-signature__argument__name">$i</span>
  1036. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1037. </dt>
  1038. <dd class="phpdocumentor-argument-list__definition">
  1039. <section class="phpdocumentor-description"><p>row where finder pattern may be found</p>
  1040. </section>
  1041. </dd>
  1042. <dt class="phpdocumentor-argument-list__entry">
  1043. <span class="phpdocumentor-signature__argument__name">$j</span>
  1044. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1045. </dt>
  1046. <dd class="phpdocumentor-argument-list__definition">
  1047. <section class="phpdocumentor-description"><p>end of possible finder pattern in row</p>
  1048. </section>
  1049. </dd>
  1050. </dl>
  1051. <section>
  1052. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1053. <span class="phpdocumentor-signature__response_type">bool</span>
  1054. &mdash;
  1055. <section class="phpdocumentor-description"><p>if a finder pattern candidate was found this time</p>
  1056. </section>
  1057. </section>
  1058. </article>
  1059. <article
  1060. class="phpdocumentor-element
  1061. -method
  1062. -private
  1063. "
  1064. >
  1065. <h4 class="phpdocumentor-element__name" id="method_haveMultiplyConfirmedCenters">
  1066. haveMultiplyConfirmedCenters()
  1067. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_haveMultiplyConfirmedCenters" class="headerlink"><i class="fas fa-link"></i></a>
  1068. </h4>
  1069. <aside class="phpdocumentor-element-found-in">
  1070. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  1071. :
  1072. <span class="phpdocumentor-element-found-in__line">591</span>
  1073. </aside>
  1074. <code class="phpdocumentor-code phpdocumentor-signature ">
  1075. <span class="phpdocumentor-signature__visibility">private</span>
  1076. <span class="phpdocumentor-signature__name">haveMultiplyConfirmedCenters</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  1077. <div class="phpdocumentor-label-line">
  1078. </div>
  1079. <section>
  1080. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1081. <span class="phpdocumentor-signature__response_type">bool</span>
  1082. &mdash;
  1083. <section class="phpdocumentor-description"><p>true if we have found at least 3 finder patterns that have been detected
  1084. at least #CENTER_QUORUM times each, and, the estimated module size of the
  1085. candidates is &quot;pretty similar&quot;</p>
  1086. </section>
  1087. </section>
  1088. </article>
  1089. <article
  1090. class="phpdocumentor-element
  1091. -method
  1092. -private
  1093. "
  1094. >
  1095. <h4 class="phpdocumentor-element__name" id="method_orderBestPatterns">
  1096. orderBestPatterns()
  1097. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_orderBestPatterns" class="headerlink"><i class="fas fa-link"></i></a>
  1098. </h4>
  1099. <aside class="phpdocumentor-element-found-in">
  1100. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  1101. :
  1102. <span class="phpdocumentor-element-found-in__line">729</span>
  1103. </aside>
  1104. <p class="phpdocumentor-summary">Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
  1105. and BC is less than AC, and the angle between BC and BA is less than 180 degrees.</p>
  1106. <code class="phpdocumentor-code phpdocumentor-signature ">
  1107. <span class="phpdocumentor-signature__visibility">private</span>
  1108. <span class="phpdocumentor-signature__name">orderBestPatterns</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$patterns</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>
  1109. <div class="phpdocumentor-label-line">
  1110. </div>
  1111. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1112. <dl class="phpdocumentor-argument-list">
  1113. <dt class="phpdocumentor-argument-list__entry">
  1114. <span class="phpdocumentor-signature__argument__name">$patterns</span>
  1115. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt;</span>
  1116. </dt>
  1117. <dd class="phpdocumentor-argument-list__definition">
  1118. <section class="phpdocumentor-description"><p>array of three FinderPattern to order</p>
  1119. </section>
  1120. </dd>
  1121. </dl>
  1122. <section>
  1123. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1124. <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>
  1125. </section>
  1126. </article>
  1127. <article
  1128. class="phpdocumentor-element
  1129. -method
  1130. -private
  1131. "
  1132. >
  1133. <h4 class="phpdocumentor-element__name" id="method_selectBestPatterns">
  1134. selectBestPatterns()
  1135. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_selectBestPatterns" class="headerlink"><i class="fas fa-link"></i></a>
  1136. </h4>
  1137. <aside class="phpdocumentor-element-found-in">
  1138. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/FinderPatternFinder.php"><a href="files/src-detector-finderpatternfinder.html"><abbr title="src/Detector/FinderPatternFinder.php">FinderPatternFinder.php</abbr></a></abbr>
  1139. :
  1140. <span class="phpdocumentor-element-found-in__line">626</span>
  1141. </aside>
  1142. <code class="phpdocumentor-code phpdocumentor-signature ">
  1143. <span class="phpdocumentor-signature__visibility">private</span>
  1144. <span class="phpdocumentor-signature__name">selectBestPatterns</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>
  1145. <div class="phpdocumentor-label-line">
  1146. </div>
  1147. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  1148. Tags
  1149. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_selectBestPatterns#tags" class="headerlink"><i class="fas fa-link"></i></a>
  1150. </h5>
  1151. <dl class="phpdocumentor-tag-list">
  1152. <dt class="phpdocumentor-tag-list__entry">
  1153. <span class="phpdocumentor-tag__name">throws</span>
  1154. </dt>
  1155. <dd class="phpdocumentor-tag-list__definition">
  1156. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Detector-QRCodeDetectorException.html"><abbr title="\chillerlan\QRCode\Detector\QRCodeDetectorException">QRCodeDetectorException</abbr></a></span>
  1157. <section class="phpdocumentor-description"><p>if 3 such finder patterns do not exist</p>
  1158. </section>
  1159. </dd>
  1160. </dl>
  1161. <section>
  1162. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1163. <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>
  1164. &mdash;
  1165. <section class="phpdocumentor-description"><p>the 3 best FinderPatterns from our list of candidates. The &quot;best&quot; are
  1166. those that have been detected at least #CENTER_QUORUM times, and whose module
  1167. size differs from the average among those patterns the least</p>
  1168. </section>
  1169. </section>
  1170. </article>
  1171. </section>
  1172. <div class="phpdocumentor-modal" id="source-view">
  1173. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  1174. <div class="phpdocumentor-modal-container">
  1175. <div class="phpdocumentor-modal-content">
  1176. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Detector/FinderPatternFinder.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  1177. </div>
  1178. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  1179. </div>
  1180. </div>
  1181. <script type="text/javascript">
  1182. (function () {
  1183. function loadExternalCodeSnippet(el, url, line) {
  1184. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  1185. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  1186. const language = 'php';
  1187. const code = document.createElement('code');
  1188. code.className = 'language-' + language;
  1189. pre.textContent = '';
  1190. pre.setAttribute('data-line', line)
  1191. code.textContent = 'Loading…';
  1192. pre.appendChild(code);
  1193. var xhr = new XMLHttpRequest();
  1194. xhr.open('GET', src, true);
  1195. xhr.onreadystatechange = function () {
  1196. if (xhr.readyState !== 4) {
  1197. return;
  1198. }
  1199. if (xhr.status < 400 && xhr.responseText) {
  1200. code.textContent = xhr.responseText;
  1201. Prism.highlightElement(code);
  1202. return;
  1203. }
  1204. if (xhr.status === 404) {
  1205. code.textContent = '✖ Error: File could not be found';
  1206. return;
  1207. }
  1208. if (xhr.status >= 400) {
  1209. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  1210. return;
  1211. }
  1212. code.textContent = '✖ Error: An unknown error occurred';
  1213. };
  1214. xhr.send(null);
  1215. });
  1216. }
  1217. const modalButtons = document.querySelectorAll("[data-modal]");
  1218. const openedAsLocalFile = window.location.protocol === 'file:';
  1219. if (modalButtons.length > 0 && openedAsLocalFile) {
  1220. console.warn(
  1221. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  1222. 'browsers block XHR requests when a page is opened this way'
  1223. );
  1224. }
  1225. modalButtons.forEach(function (trigger) {
  1226. if (openedAsLocalFile) {
  1227. trigger.setAttribute("hidden", "hidden");
  1228. }
  1229. trigger.addEventListener("click", function (event) {
  1230. event.preventDefault();
  1231. const modal = document.getElementById(trigger.dataset.modal);
  1232. if (!modal) {
  1233. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  1234. return;
  1235. }
  1236. modal.classList.add("phpdocumentor-modal__open");
  1237. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  1238. const exits = modal.querySelectorAll("[data-exit-button]");
  1239. exits.forEach(function (exit) {
  1240. exit.addEventListener("click", function (event) {
  1241. event.preventDefault();
  1242. modal.classList.remove("phpdocumentor-modal__open");
  1243. });
  1244. });
  1245. });
  1246. });
  1247. })();
  1248. </script>
  1249. </article>
  1250. </section>
  1251. <section class="phpdocumentor-on-this-page__sidebar">
  1252. <section class="phpdocumentor-on-this-page__content">
  1253. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  1254. <ul class="phpdocumentor-list -clean">
  1255. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  1256. <li>
  1257. <ul class="phpdocumentor-list -clean">
  1258. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#toc-constants">Constants</a></li>
  1259. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#toc-properties">Properties</a></li>
  1260. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#toc-methods">Methods</a></li>
  1261. </ul>
  1262. </li>
  1263. <li class="phpdocumentor-on-this-page-section__title">Constants</li>
  1264. <li>
  1265. <ul class="phpdocumentor-list -clean">
  1266. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_CENTER_QUORUM">CENTER_QUORUM</a></li>
  1267. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MAX_MODULES">MAX_MODULES</a></li>
  1268. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MIN_SKIP">MIN_SKIP</a></li>
  1269. </ul>
  1270. </li>
  1271. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  1272. <li>
  1273. <ul class="phpdocumentor-list -clean">
  1274. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_hasSkipped">$hasSkipped<a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html"></li>
  1275. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_matrix">$matrix<a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html"></li>
  1276. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_possibleCenters">$possibleCenters<a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html"></li>
  1277. </ul>
  1278. </li>
  1279. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  1280. <li>
  1281. <ul class="phpdocumentor-list -clean">
  1282. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method___construct">__construct()</a></li>
  1283. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_find">find()</a></li>
  1284. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_centerFromEnd">centerFromEnd()</a></li>
  1285. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckDiagonal">crossCheckDiagonal()</a></li>
  1286. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckHorizontal">crossCheckHorizontal()</a></li>
  1287. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckVertical">crossCheckVertical()</a></li>
  1288. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossProductZ">crossProductZ()</a></li>
  1289. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_doShiftCounts2">doShiftCounts2()</a></li>
  1290. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_findRowSkip">findRowSkip()</a></li>
  1291. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternCross">foundPatternCross()</a></li>
  1292. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternDiagonal">foundPatternDiagonal()</a></li>
  1293. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternVariance">foundPatternVariance()</a></li>
  1294. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_getCrossCheckStateCount">getCrossCheckStateCount()</a></li>
  1295. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_handlePossibleCenter">handlePossibleCenter()</a></li>
  1296. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_haveMultiplyConfirmedCenters">haveMultiplyConfirmedCenters()</a></li>
  1297. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_orderBestPatterns">orderBestPatterns()</a></li>
  1298. <li><a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_selectBestPatterns">selectBestPatterns()</a></li>
  1299. </ul>
  1300. </li>
  1301. </ul>
  1302. </section>
  1303. </section>
  1304. </div>
  1305. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1306. <section class="phpdocumentor-search-results__dialog">
  1307. <header class="phpdocumentor-search-results__header">
  1308. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1309. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1310. </header>
  1311. <section class="phpdocumentor-search-results__body">
  1312. <ul class="phpdocumentor-search-results__entries"></ul>
  1313. </section>
  1314. </section>
  1315. </section>
  1316. </div>
  1317. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1318. </main>
  1319. <script>
  1320. cssVars({});
  1321. </script>
  1322. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1323. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1324. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1325. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1326. </body>
  1327. </html>