chillerlan-QRCode-Detector-FinderPatternFinder.html 75 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="namespaces/chillerlan.html">chillerlan</a></h4>
  56. <ul class="phpdocumentor-list">
  57. <li>
  58. <a href="namespaces/chillerlan-qrcode.html">QRCode</a>
  59. </li>
  60. <li>
  61. <a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a>
  62. </li>
  63. </ul>
  64. </section>
  65. <section class="phpdocumentor-sidebar__category">
  66. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  67. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
  68. </section>
  69. <section class="phpdocumentor-sidebar__category">
  70. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  71. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  72. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  73. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  74. </section>
  75. <section class="phpdocumentor-sidebar__category">
  76. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  78. </section>
  79. </aside>
  80. <div class="phpdocumentor-column -eight phpdocumentor-content">
  81. <ul class="phpdocumentor-breadcrumbs">
  82. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  83. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  84. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-detector.html">Detector</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. FinderPatternFinder
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. </h2>
  96. <aside class="phpdocumentor-element-found-in">
  97. <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>
  98. :
  99. <span class="phpdocumentor-element-found-in__line">29</span>
  100. </aside>
  101. <p class="phpdocumentor-summary">&lt;p&gt;This class attempts to find finder patterns in a QR Code. Finder patterns are the square
  102. markers at three corners of a QR Code.&lt;/p&gt;</p>
  103. <section class="phpdocumentor-description"><p>This class is thread-safe but not reentrant. Each thread must allocate its own object.
  104. </section>
  105. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  106. Tags
  107. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  108. </h5>
  109. <dl class="phpdocumentor-tag-list">
  110. <dt class="phpdocumentor-tag-list__entry">
  111. <span class="phpdocumentor-tag__name">author</span>
  112. </dt>
  113. <dd class="phpdocumentor-tag-list__definition">
  114. <section class="phpdocumentor-description"><p>Sean Owen</p>
  115. </section>
  116. </dd>
  117. </dl>
  118. <h3 id="toc">
  119. Table of Contents
  120. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  121. </h3>
  122. <dl class="phpdocumentor-table-of-contents">
  123. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  124. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_CENTER_QUORUM">CENTER_QUORUM</a>
  125. <span>
  126. &nbsp;= 2 </span>
  127. </dt>
  128. <dd></dd>
  129. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  130. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MAX_MODULES">MAX_MODULES</a>
  131. <span>
  132. &nbsp;= 177 </span>
  133. </dt>
  134. <dd></dd>
  135. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  136. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MIN_SKIP">MIN_SKIP</a>
  137. <span>
  138. &nbsp;= 2 </span>
  139. </dt>
  140. <dd></dd>
  141. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  142. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_bitMatrix">$bitMatrix</a>
  143. <span>
  144. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  145. </dt>
  146. <dd></dd>
  147. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  148. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_hasSkipped">$hasSkipped</a>
  149. <span>
  150. &nbsp;: bool </span>
  151. </dt>
  152. <dd></dd>
  153. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  154. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_possibleCenters">$possibleCenters</a>
  155. <span>
  156. &nbsp;: array&lt;string|int, mixed&gt; </span>
  157. </dt>
  158. <dd></dd>
  159. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  160. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method___construct">__construct()</a>
  161. <span>
  162. &nbsp;: mixed </span>
  163. </dt>
  164. <dd>&lt;p&gt;Creates a finder that will search the image for three finder patterns.&lt;/p&gt;</dd>
  165. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  166. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_find">find()</a>
  167. <span>
  168. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt; </span>
  169. </dt>
  170. <dd></dd>
  171. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  172. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_centerFromEnd">centerFromEnd()</a>
  173. <span>
  174. &nbsp;: float </span>
  175. </dt>
  176. <dd>Given a count of black/white/black/white/black pixels just seen and an end position,
  177. figures the location of the center of this run.</dd>
  178. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  179. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckDiagonal">crossCheckDiagonal()</a>
  180. <span>
  181. &nbsp;: bool </span>
  182. </dt>
  183. <dd>After a vertical and horizontal scan finds a potential finder pattern, this method
  184. &quot;cross-cross-cross-checks&quot; by scanning down diagonally through the center of the possible
  185. finder pattern to see if the same proportion is detected.</dd>
  186. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  187. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckHorizontal">crossCheckHorizontal()</a>
  188. <span>
  189. &nbsp;: float|null </span>
  190. </dt>
  191. <dd>&lt;p&gt;Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical,
  192. except it reads horizontally instead of vertically. This is used to cross-cross
  193. check a vertical cross check and locate the real center of the alignment pattern.&lt;/p&gt;</dd>
  194. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  195. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckVertical">crossCheckVertical()</a>
  196. <span>
  197. &nbsp;: float|null </span>
  198. </dt>
  199. <dd>&lt;p&gt;After a horizontal scan finds a potential finder pattern, this method
  200. &quot;cross-checks&quot; by scanning down vertically through the center of the possible
  201. finder pattern to see if the same proportion is detected.&lt;/p&gt;</dd>
  202. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  203. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossProductZ">crossProductZ()</a>
  204. <span>
  205. &nbsp;: float </span>
  206. </dt>
  207. <dd>Returns the z component of the cross product between vectors BC and BA.</dd>
  208. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  209. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_doShiftCounts2">doShiftCounts2()</a>
  210. <span>
  211. &nbsp;: array&lt;string|int, int&gt; </span>
  212. </dt>
  213. <dd></dd>
  214. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  215. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_findRowSkip">findRowSkip()</a>
  216. <span>
  217. &nbsp;: int </span>
  218. </dt>
  219. <dd></dd>
  220. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  221. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternCross">foundPatternCross()</a>
  222. <span>
  223. &nbsp;: bool </span>
  224. </dt>
  225. <dd></dd>
  226. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  227. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternDiagonal">foundPatternDiagonal()</a>
  228. <span>
  229. &nbsp;: bool </span>
  230. </dt>
  231. <dd></dd>
  232. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  233. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternVariance">foundPatternVariance()</a>
  234. <span>
  235. &nbsp;: bool </span>
  236. </dt>
  237. <dd></dd>
  238. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  239. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_getCrossCheckStateCount">getCrossCheckStateCount()</a>
  240. <span>
  241. &nbsp;: array&lt;string|int, int&gt; </span>
  242. </dt>
  243. <dd></dd>
  244. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  245. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_handlePossibleCenter">handlePossibleCenter()</a>
  246. <span>
  247. &nbsp;: bool </span>
  248. </dt>
  249. <dd>&lt;p&gt;This is called when a horizontal scan finds a possible alignment pattern. It will
  250. cross check with a vertical scan, and if successful, will, ah, cross-cross-check
  251. with another horizontal scan. This is needed primarily to locate the real horizontal
  252. center of the pattern in cases of extreme skew.</dd>
  253. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  254. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_haveMultiplyConfirmedCenters">haveMultiplyConfirmedCenters()</a>
  255. <span>
  256. &nbsp;: bool </span>
  257. </dt>
  258. <dd></dd>
  259. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  260. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_orderBestPatterns">orderBestPatterns()</a>
  261. <span>
  262. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt; </span>
  263. </dt>
  264. <dd>Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
  265. and BC is less than AC, and the angle between BC and BA is less than 180 degrees.</dd>
  266. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  267. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_selectBestPatterns">selectBestPatterns()</a>
  268. <span>
  269. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-FinderPattern.html"><abbr title="\chillerlan\QRCode\Detector\FinderPattern">FinderPattern</abbr></a>&gt; </span>
  270. </dt>
  271. <dd></dd>
  272. </dl>
  273. <section class="phpdocumentor-constants">
  274. <h3 class="phpdocumentor-elements__header" id="constants">
  275. Constants
  276. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  277. </h3>
  278. <article class="phpdocumentor-element -constant -private ">
  279. <h4 class="phpdocumentor-element__name" id="constant_CENTER_QUORUM">
  280. CENTER_QUORUM
  281. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_CENTER_QUORUM" class="headerlink"><i class="fas fa-link"></i></a>
  282. </h4>
  283. <aside class="phpdocumentor-element-found-in">
  284. <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>
  285. :
  286. <span class="phpdocumentor-element-found-in__line">33</span>
  287. </aside>
  288. <code class="phpdocumentor-signature phpdocumentor-code ">
  289. <span class="phpdocumentor-signature__visibility">private</span>
  290. <span class="phpdocumentor-signature__type">mixed</span>
  291. <span class="phpdocumentor-signature__name">CENTER_QUORUM</span>
  292. = <span class="phpdocumentor-signature__default-value">2</span>
  293. </code>
  294. <section class="phpdocumentor-description"></section>
  295. <section class="phpdocumentor-description"></section>
  296. </article>
  297. <article class="phpdocumentor-element -constant -private ">
  298. <h4 class="phpdocumentor-element__name" id="constant_MAX_MODULES">
  299. MAX_MODULES
  300. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MAX_MODULES" class="headerlink"><i class="fas fa-link"></i></a>
  301. </h4>
  302. <aside class="phpdocumentor-element-found-in">
  303. <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>
  304. :
  305. <span class="phpdocumentor-element-found-in__line">32</span>
  306. </aside>
  307. <code class="phpdocumentor-signature phpdocumentor-code ">
  308. <span class="phpdocumentor-signature__visibility">private</span>
  309. <span class="phpdocumentor-signature__type">mixed</span>
  310. <span class="phpdocumentor-signature__name">MAX_MODULES</span>
  311. = <span class="phpdocumentor-signature__default-value">177</span>
  312. </code>
  313. <section class="phpdocumentor-description"></section>
  314. <section class="phpdocumentor-description"></section>
  315. </article>
  316. <article class="phpdocumentor-element -constant -private ">
  317. <h4 class="phpdocumentor-element__name" id="constant_MIN_SKIP">
  318. MIN_SKIP
  319. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#constant_MIN_SKIP" class="headerlink"><i class="fas fa-link"></i></a>
  320. </h4>
  321. <aside class="phpdocumentor-element-found-in">
  322. <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>
  323. :
  324. <span class="phpdocumentor-element-found-in__line">31</span>
  325. </aside>
  326. <code class="phpdocumentor-signature phpdocumentor-code ">
  327. <span class="phpdocumentor-signature__visibility">private</span>
  328. <span class="phpdocumentor-signature__type">mixed</span>
  329. <span class="phpdocumentor-signature__name">MIN_SKIP</span>
  330. = <span class="phpdocumentor-signature__default-value">2</span>
  331. </code>
  332. <section class="phpdocumentor-description"></section>
  333. <section class="phpdocumentor-description"></section>
  334. </article>
  335. </section>
  336. <section class="phpdocumentor-properties">
  337. <h3 class="phpdocumentor-elements__header" id="properties">
  338. Properties
  339. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  340. </h3>
  341. <article
  342. class="
  343. phpdocumentor-element
  344. -property
  345. -private
  346. "
  347. >
  348. <h4 class="phpdocumentor-element__name" id="property_bitMatrix">
  349. $bitMatrix
  350. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_bitMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  351. <span class="phpdocumentor-element__modifiers">
  352. </span>
  353. </h4>
  354. <aside class="phpdocumentor-element-found-in">
  355. <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>
  356. :
  357. <span class="phpdocumentor-element-found-in__line">34</span>
  358. </aside>
  359. <code class="phpdocumentor-code phpdocumentor-signature ">
  360. <span class="phpdocumentor-signature__visibility">private</span>
  361. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  362. <span class="phpdocumentor-signature__name">$bitMatrix</span>
  363. </code>
  364. <section class="phpdocumentor-description"></section>
  365. <section class="phpdocumentor-description"></section>
  366. </article>
  367. <article
  368. class="
  369. phpdocumentor-element
  370. -property
  371. -private
  372. "
  373. >
  374. <h4 class="phpdocumentor-element__name" id="property_hasSkipped">
  375. $hasSkipped
  376. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_hasSkipped" class="headerlink"><i class="fas fa-link"></i></a>
  377. <span class="phpdocumentor-element__modifiers">
  378. </span>
  379. </h4>
  380. <aside class="phpdocumentor-element-found-in">
  381. <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>
  382. :
  383. <span class="phpdocumentor-element-found-in__line">37</span>
  384. </aside>
  385. <code class="phpdocumentor-code phpdocumentor-signature ">
  386. <span class="phpdocumentor-signature__visibility">private</span>
  387. <span class="phpdocumentor-signature__type">bool</span>
  388. <span class="phpdocumentor-signature__name">$hasSkipped</span>
  389. = <span class="phpdocumentor-signature__default-value">false</span></code>
  390. <section class="phpdocumentor-description"></section>
  391. <section class="phpdocumentor-description"></section>
  392. </article>
  393. <article
  394. class="
  395. phpdocumentor-element
  396. -property
  397. -private
  398. "
  399. >
  400. <h4 class="phpdocumentor-element__name" id="property_possibleCenters">
  401. $possibleCenters
  402. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_possibleCenters" 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">36</span>
  410. </aside>
  411. <code class="phpdocumentor-code phpdocumentor-signature ">
  412. <span class="phpdocumentor-signature__visibility">private</span>
  413. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  414. <span class="phpdocumentor-signature__name">$possibleCenters</span>
  415. </code>
  416. </article>
  417. </section>
  418. <section class="phpdocumentor-methods">
  419. <h3 class="phpdocumentor-elements__header" id="methods">
  420. Methods
  421. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  422. </h3>
  423. <article
  424. class="phpdocumentor-element
  425. -method
  426. -public
  427. "
  428. >
  429. <h4 class="phpdocumentor-element__name" id="method___construct">
  430. __construct()
  431. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  432. </h4>
  433. <aside class="phpdocumentor-element-found-in">
  434. <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>
  435. :
  436. <span class="phpdocumentor-element-found-in__line">44</span>
  437. </aside>
  438. <p class="phpdocumentor-summary">&lt;p&gt;Creates a finder that will search the image for three finder patterns.&lt;/p&gt;</p>
  439. <code class="phpdocumentor-code phpdocumentor-signature ">
  440. <span class="phpdocumentor-signature__visibility">public</span>
  441. <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">$bitMatrix</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  442. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  443. <dl class="phpdocumentor-argument-list">
  444. <dt class="phpdocumentor-argument-list__entry">
  445. <span class="phpdocumentor-signature__argument__name">$bitMatrix</span>
  446. : <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>
  447. </dt>
  448. <dd class="phpdocumentor-argument-list__definition">
  449. <section class="phpdocumentor-description"><p>image to search</p>
  450. </section>
  451. </dd>
  452. </dl>
  453. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  454. <span class="phpdocumentor-signature__response_type">mixed</span>
  455. &mdash;
  456. </article>
  457. <article
  458. class="phpdocumentor-element
  459. -method
  460. -public
  461. "
  462. >
  463. <h4 class="phpdocumentor-element__name" id="method_find">
  464. find()
  465. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_find" class="headerlink"><i class="fas fa-link"></i></a>
  466. </h4>
  467. <aside class="phpdocumentor-element-found-in">
  468. <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>
  469. :
  470. <span class="phpdocumentor-element-found-in__line">52</span>
  471. </aside>
  472. <code class="phpdocumentor-code phpdocumentor-signature ">
  473. <span class="phpdocumentor-signature__visibility">public</span>
  474. <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>
  475. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  476. <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>
  477. &mdash;
  478. </article>
  479. <article
  480. class="phpdocumentor-element
  481. -method
  482. -private
  483. "
  484. >
  485. <h4 class="phpdocumentor-element__name" id="method_centerFromEnd">
  486. centerFromEnd()
  487. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_centerFromEnd" class="headerlink"><i class="fas fa-link"></i></a>
  488. </h4>
  489. <aside class="phpdocumentor-element-found-in">
  490. <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>
  491. :
  492. <span class="phpdocumentor-element-found-in__line">191</span>
  493. </aside>
  494. <p class="phpdocumentor-summary">Given a count of black/white/black/white/black pixels just seen and an end position,
  495. figures the location of the center of this run.</p>
  496. <code class="phpdocumentor-code phpdocumentor-signature ">
  497. <span class="phpdocumentor-signature__visibility">private</span>
  498. <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>
  499. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  500. <dl class="phpdocumentor-argument-list">
  501. <dt class="phpdocumentor-argument-list__entry">
  502. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  503. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  504. </dt>
  505. <dd class="phpdocumentor-argument-list__definition">
  506. </dd>
  507. <dt class="phpdocumentor-argument-list__entry">
  508. <span class="phpdocumentor-signature__argument__name">$end</span>
  509. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  510. </dt>
  511. <dd class="phpdocumentor-argument-list__definition">
  512. <section class="phpdocumentor-description"></section>
  513. </dd>
  514. </dl>
  515. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  516. <span class="phpdocumentor-signature__response_type">float</span>
  517. &mdash;
  518. </article>
  519. <article
  520. class="phpdocumentor-element
  521. -method
  522. -private
  523. "
  524. >
  525. <h4 class="phpdocumentor-element__name" id="method_crossCheckDiagonal">
  526. crossCheckDiagonal()
  527. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckDiagonal" class="headerlink"><i class="fas fa-link"></i></a>
  528. </h4>
  529. <aside class="phpdocumentor-element-found-in">
  530. <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>
  531. :
  532. <span class="phpdocumentor-element-found-in__line">255</span>
  533. </aside>
  534. <p class="phpdocumentor-summary">After a vertical and horizontal scan finds a potential finder pattern, this method
  535. &quot;cross-cross-cross-checks&quot; by scanning down diagonally through the center of the possible
  536. finder pattern to see if the same proportion is detected.</p>
  537. <code class="phpdocumentor-code phpdocumentor-signature ">
  538. <span class="phpdocumentor-signature__visibility">private</span>
  539. <span class="phpdocumentor-signature__name">crossCheckDiagonal</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href=""><abbr title=""></abbr></a>&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"><a href=""><abbr title=""></abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$centerJ</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  540. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  541. <dl class="phpdocumentor-argument-list">
  542. <dt class="phpdocumentor-argument-list__entry">
  543. <span class="phpdocumentor-signature__argument__name">$centerI</span>
  544. : <span class="phpdocumentor-signature__argument__return-type"><a href=""><abbr title=""></abbr></a></span>
  545. </dt>
  546. <dd class="phpdocumentor-argument-list__definition">
  547. <section class="phpdocumentor-description"><p>; row where a finder pattern was detected</p>
  548. </section>
  549. </dd>
  550. <dt class="phpdocumentor-argument-list__entry">
  551. <span class="phpdocumentor-signature__argument__name">$centerJ</span>
  552. : <span class="phpdocumentor-signature__argument__return-type"><a href=""><abbr title=""></abbr></a></span>
  553. </dt>
  554. <dd class="phpdocumentor-argument-list__definition">
  555. <section class="phpdocumentor-description"><p>; center of the section that appears to cross a finder pattern</p>
  556. </section>
  557. </dd>
  558. </dl>
  559. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  560. <span class="phpdocumentor-signature__response_type">bool</span>
  561. &mdash;
  562. <section class="phpdocumentor-description"><p>true if proportions are withing expected limits</p>
  563. </section>
  564. </article>
  565. <article
  566. class="phpdocumentor-element
  567. -method
  568. -private
  569. "
  570. >
  571. <h4 class="phpdocumentor-element__name" id="method_crossCheckHorizontal">
  572. crossCheckHorizontal()
  573. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckHorizontal" class="headerlink"><i class="fas fa-link"></i></a>
  574. </h4>
  575. <aside class="phpdocumentor-element-found-in">
  576. <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>
  577. :
  578. <span class="phpdocumentor-element-found-in__line">416</span>
  579. </aside>
  580. <p class="phpdocumentor-summary">&lt;p&gt;Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical,
  581. except it reads horizontally instead of vertically. This is used to cross-cross
  582. check a vertical cross check and locate the real center of the alignment pattern.&lt;/p&gt;</p>
  583. <code class="phpdocumentor-code phpdocumentor-signature ">
  584. <span class="phpdocumentor-signature__visibility">private</span>
  585. <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>
  586. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  587. <dl class="phpdocumentor-argument-list">
  588. <dt class="phpdocumentor-argument-list__entry">
  589. <span class="phpdocumentor-signature__argument__name">$startJ</span>
  590. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  591. </dt>
  592. <dd class="phpdocumentor-argument-list__definition">
  593. <section class="phpdocumentor-description"></section>
  594. </dd>
  595. <dt class="phpdocumentor-argument-list__entry">
  596. <span class="phpdocumentor-signature__argument__name">$centerI</span>
  597. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  598. </dt>
  599. <dd class="phpdocumentor-argument-list__definition">
  600. <section class="phpdocumentor-description"></section>
  601. </dd>
  602. <dt class="phpdocumentor-argument-list__entry">
  603. <span class="phpdocumentor-signature__argument__name">$maxCount</span>
  604. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  605. </dt>
  606. <dd class="phpdocumentor-argument-list__definition">
  607. <section class="phpdocumentor-description"></section>
  608. </dd>
  609. <dt class="phpdocumentor-argument-list__entry">
  610. <span class="phpdocumentor-signature__argument__name">$originalStateCountTotal</span>
  611. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  612. </dt>
  613. <dd class="phpdocumentor-argument-list__definition">
  614. <section class="phpdocumentor-description"></section>
  615. </dd>
  616. </dl>
  617. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  618. <span class="phpdocumentor-signature__response_type">float|null</span>
  619. &mdash;
  620. </article>
  621. <article
  622. class="phpdocumentor-element
  623. -method
  624. -private
  625. "
  626. >
  627. <h4 class="phpdocumentor-element__name" id="method_crossCheckVertical">
  628. crossCheckVertical()
  629. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckVertical" class="headerlink"><i class="fas fa-link"></i></a>
  630. </h4>
  631. <aside class="phpdocumentor-element-found-in">
  632. <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>
  633. :
  634. <span class="phpdocumentor-element-found-in__line">333</span>
  635. </aside>
  636. <p class="phpdocumentor-summary">&lt;p&gt;After a horizontal scan finds a potential finder pattern, this method
  637. &quot;cross-checks&quot; by scanning down vertically through the center of the possible
  638. finder pattern to see if the same proportion is detected.&lt;/p&gt;</p>
  639. <code class="phpdocumentor-code phpdocumentor-signature ">
  640. <span class="phpdocumentor-signature__visibility">private</span>
  641. <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>
  642. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  643. <dl class="phpdocumentor-argument-list">
  644. <dt class="phpdocumentor-argument-list__entry">
  645. <span class="phpdocumentor-signature__argument__name">$startI</span>
  646. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  647. </dt>
  648. <dd class="phpdocumentor-argument-list__definition">
  649. <section class="phpdocumentor-description"><p>; row where a finder pattern was detected</p>
  650. </section>
  651. </dd>
  652. <dt class="phpdocumentor-argument-list__entry">
  653. <span class="phpdocumentor-signature__argument__name">$centerJ</span>
  654. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  655. </dt>
  656. <dd class="phpdocumentor-argument-list__definition">
  657. <section class="phpdocumentor-description"><p>; center of the section that appears to cross a finder pattern</p>
  658. </section>
  659. </dd>
  660. <dt class="phpdocumentor-argument-list__entry">
  661. <span class="phpdocumentor-signature__argument__name">$maxCount</span>
  662. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  663. </dt>
  664. <dd class="phpdocumentor-argument-list__definition">
  665. <section class="phpdocumentor-description"><p>; maximum reasonable number of modules that should be
  666. observed in any reading state, based on the results of the horizontal scan</p>
  667. </section>
  668. </dd>
  669. <dt class="phpdocumentor-argument-list__entry">
  670. <span class="phpdocumentor-signature__argument__name">$originalStateCountTotal</span>
  671. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  672. </dt>
  673. <dd class="phpdocumentor-argument-list__definition">
  674. </dd>
  675. </dl>
  676. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  677. <span class="phpdocumentor-signature__response_type">float|null</span>
  678. &mdash;
  679. <section class="phpdocumentor-description"><p>vertical center of finder pattern, or null if not found</p>
  680. </section>
  681. </article>
  682. <article
  683. class="phpdocumentor-element
  684. -method
  685. -private
  686. "
  687. >
  688. <h4 class="phpdocumentor-element__name" id="method_crossProductZ">
  689. crossProductZ()
  690. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossProductZ" class="headerlink"><i class="fas fa-link"></i></a>
  691. </h4>
  692. <aside class="phpdocumentor-element-found-in">
  693. <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>
  694. :
  695. <span class="phpdocumentor-element-found-in__line">759</span>
  696. </aside>
  697. <p class="phpdocumentor-summary">Returns the z component of the cross product between vectors BC and BA.</p>
  698. <code class="phpdocumentor-code phpdocumentor-signature ">
  699. <span class="phpdocumentor-signature__visibility">private</span>
  700. <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>
  701. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  702. <dl class="phpdocumentor-argument-list">
  703. <dt class="phpdocumentor-argument-list__entry">
  704. <span class="phpdocumentor-signature__argument__name">$pointA</span>
  705. : <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>
  706. </dt>
  707. <dd class="phpdocumentor-argument-list__definition">
  708. <section class="phpdocumentor-description"></section>
  709. </dd>
  710. <dt class="phpdocumentor-argument-list__entry">
  711. <span class="phpdocumentor-signature__argument__name">$pointB</span>
  712. : <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>
  713. </dt>
  714. <dd class="phpdocumentor-argument-list__definition">
  715. <section class="phpdocumentor-description"></section>
  716. </dd>
  717. <dt class="phpdocumentor-argument-list__entry">
  718. <span class="phpdocumentor-signature__argument__name">$pointC</span>
  719. : <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>
  720. </dt>
  721. <dd class="phpdocumentor-argument-list__definition">
  722. <section class="phpdocumentor-description"></section>
  723. </dd>
  724. </dl>
  725. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  726. <span class="phpdocumentor-signature__response_type">float</span>
  727. &mdash;
  728. </article>
  729. <article
  730. class="phpdocumentor-element
  731. -method
  732. -private
  733. "
  734. >
  735. <h4 class="phpdocumentor-element__name" id="method_doShiftCounts2">
  736. doShiftCounts2()
  737. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_doShiftCounts2" class="headerlink"><i class="fas fa-link"></i></a>
  738. </h4>
  739. <aside class="phpdocumentor-element-found-in">
  740. <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>
  741. :
  742. <span class="phpdocumentor-element-found-in__line">175</span>
  743. </aside>
  744. <code class="phpdocumentor-code phpdocumentor-signature ">
  745. <span class="phpdocumentor-signature__visibility">private</span>
  746. <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>
  747. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  748. <dl class="phpdocumentor-argument-list">
  749. <dt class="phpdocumentor-argument-list__entry">
  750. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  751. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  752. </dt>
  753. <dd class="phpdocumentor-argument-list__definition">
  754. </dd>
  755. </dl>
  756. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  757. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  758. &mdash;
  759. </article>
  760. <article
  761. class="phpdocumentor-element
  762. -method
  763. -private
  764. "
  765. >
  766. <h4 class="phpdocumentor-element__name" id="method_findRowSkip">
  767. findRowSkip()
  768. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_findRowSkip" class="headerlink"><i class="fas fa-link"></i></a>
  769. </h4>
  770. <aside class="phpdocumentor-element-found-in">
  771. <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>
  772. :
  773. <span class="phpdocumentor-element-found-in__line">549</span>
  774. </aside>
  775. <code class="phpdocumentor-code phpdocumentor-signature ">
  776. <span class="phpdocumentor-signature__visibility">private</span>
  777. <span class="phpdocumentor-signature__name">findRowSkip</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  778. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  779. <span class="phpdocumentor-signature__response_type">int</span>
  780. &mdash;
  781. <section class="phpdocumentor-description"><p>number of rows we could safely skip during scanning, based on the first
  782. two finder patterns that have been located. In some cases their position will
  783. allow us to infer that the third pattern must lie below a certain point farther
  784. down in the image.</p>
  785. </section>
  786. </article>
  787. <article
  788. class="phpdocumentor-element
  789. -method
  790. -private
  791. "
  792. >
  793. <h4 class="phpdocumentor-element__name" id="method_foundPatternCross">
  794. foundPatternCross()
  795. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternCross" class="headerlink"><i class="fas fa-link"></i></a>
  796. </h4>
  797. <aside class="phpdocumentor-element-found-in">
  798. <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>
  799. :
  800. <span class="phpdocumentor-element-found-in__line">198</span>
  801. </aside>
  802. <code class="phpdocumentor-code phpdocumentor-signature ">
  803. <span class="phpdocumentor-signature__visibility">private</span>
  804. <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>
  805. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  806. <dl class="phpdocumentor-argument-list">
  807. <dt class="phpdocumentor-argument-list__entry">
  808. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  809. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  810. </dt>
  811. <dd class="phpdocumentor-argument-list__definition">
  812. </dd>
  813. </dl>
  814. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  815. <span class="phpdocumentor-signature__response_type">bool</span>
  816. &mdash;
  817. </article>
  818. <article
  819. class="phpdocumentor-element
  820. -method
  821. -private
  822. "
  823. >
  824. <h4 class="phpdocumentor-element__name" id="method_foundPatternDiagonal">
  825. foundPatternDiagonal()
  826. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternDiagonal" class="headerlink"><i class="fas fa-link"></i></a>
  827. </h4>
  828. <aside class="phpdocumentor-element-found-in">
  829. <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>
  830. :
  831. <span class="phpdocumentor-element-found-in__line">206</span>
  832. </aside>
  833. <code class="phpdocumentor-code phpdocumentor-signature ">
  834. <span class="phpdocumentor-signature__visibility">private</span>
  835. <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>
  836. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  837. <dl class="phpdocumentor-argument-list">
  838. <dt class="phpdocumentor-argument-list__entry">
  839. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  840. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  841. </dt>
  842. <dd class="phpdocumentor-argument-list__definition">
  843. </dd>
  844. </dl>
  845. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  846. <span class="phpdocumentor-signature__response_type">bool</span>
  847. &mdash;
  848. </article>
  849. <article
  850. class="phpdocumentor-element
  851. -method
  852. -private
  853. "
  854. >
  855. <h4 class="phpdocumentor-element__name" id="method_foundPatternVariance">
  856. foundPatternVariance()
  857. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternVariance" class="headerlink"><i class="fas fa-link"></i></a>
  858. </h4>
  859. <aside class="phpdocumentor-element-found-in">
  860. <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>
  861. :
  862. <span class="phpdocumentor-element-found-in__line">217</span>
  863. </aside>
  864. <code class="phpdocumentor-code phpdocumentor-signature ">
  865. <span class="phpdocumentor-signature__visibility">private</span>
  866. <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>
  867. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  868. <dl class="phpdocumentor-argument-list">
  869. <dt class="phpdocumentor-argument-list__entry">
  870. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  871. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  872. </dt>
  873. <dd class="phpdocumentor-argument-list__definition">
  874. <section class="phpdocumentor-description"><p>count of black/white/black/white/black pixels just read</p>
  875. </section>
  876. </dd>
  877. <dt class="phpdocumentor-argument-list__entry">
  878. <span class="phpdocumentor-signature__argument__name">$variance</span>
  879. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  880. </dt>
  881. <dd class="phpdocumentor-argument-list__definition">
  882. <section class="phpdocumentor-description"></section>
  883. </dd>
  884. </dl>
  885. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  886. <span class="phpdocumentor-signature__response_type">bool</span>
  887. &mdash;
  888. <section class="phpdocumentor-description"><p>true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios
  889. used by finder patterns to be considered a match</p>
  890. </section>
  891. </article>
  892. <article
  893. class="phpdocumentor-element
  894. -method
  895. -private
  896. "
  897. >
  898. <h4 class="phpdocumentor-element__name" id="method_getCrossCheckStateCount">
  899. getCrossCheckStateCount()
  900. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_getCrossCheckStateCount" class="headerlink"><i class="fas fa-link"></i></a>
  901. </h4>
  902. <aside class="phpdocumentor-element-found-in">
  903. <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>
  904. :
  905. <span class="phpdocumentor-element-found-in__line">166</span>
  906. </aside>
  907. <code class="phpdocumentor-code phpdocumentor-signature ">
  908. <span class="phpdocumentor-signature__visibility">private</span>
  909. <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>
  910. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  911. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  912. &mdash;
  913. </article>
  914. <article
  915. class="phpdocumentor-element
  916. -method
  917. -private
  918. "
  919. >
  920. <h4 class="phpdocumentor-element__name" id="method_handlePossibleCenter">
  921. handlePossibleCenter()
  922. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_handlePossibleCenter" class="headerlink"><i class="fas fa-link"></i></a>
  923. </h4>
  924. <aside class="phpdocumentor-element-found-in">
  925. <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>
  926. :
  927. <span class="phpdocumentor-element-found-in__line">509</span>
  928. </aside>
  929. <p class="phpdocumentor-summary">&lt;p&gt;This is called when a horizontal scan finds a possible alignment pattern. It will
  930. cross check with a vertical scan, and if successful, will, ah, cross-cross-check
  931. with another horizontal scan. This is needed primarily to locate the real horizontal
  932. center of the pattern in cases of extreme skew.</p>
  933. <code class="phpdocumentor-code phpdocumentor-signature ">
  934. <span class="phpdocumentor-signature__visibility">private</span>
  935. <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>
  936. <section class="phpdocumentor-description"><p>And then we cross-cross-cross check with another diagonal scan.</p></p>
  937. <p>If that succeeds the finder pattern location is added to a list that tracks
  938. the number of times each location has been nearly-matched as a finder pattern.
  939. Each additional find is more evidence that the location is in fact a finder
  940. pattern center
  941. </section>
  942. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  943. <dl class="phpdocumentor-argument-list">
  944. <dt class="phpdocumentor-argument-list__entry">
  945. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  946. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  947. </dt>
  948. <dd class="phpdocumentor-argument-list__definition">
  949. <section class="phpdocumentor-description"><p>reading state module counts from horizontal scan</p>
  950. </section>
  951. </dd>
  952. <dt class="phpdocumentor-argument-list__entry">
  953. <span class="phpdocumentor-signature__argument__name">$i</span>
  954. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  955. </dt>
  956. <dd class="phpdocumentor-argument-list__definition">
  957. <section class="phpdocumentor-description"><p>row where finder pattern may be found</p>
  958. </section>
  959. </dd>
  960. <dt class="phpdocumentor-argument-list__entry">
  961. <span class="phpdocumentor-signature__argument__name">$j</span>
  962. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  963. </dt>
  964. <dd class="phpdocumentor-argument-list__definition">
  965. <section class="phpdocumentor-description"><p>end of possible finder pattern in row</p>
  966. </section>
  967. </dd>
  968. </dl>
  969. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  970. <span class="phpdocumentor-signature__response_type">bool</span>
  971. &mdash;
  972. <section class="phpdocumentor-description"><p>if a finder pattern candidate was found this time</p>
  973. </section>
  974. </article>
  975. <article
  976. class="phpdocumentor-element
  977. -method
  978. -private
  979. "
  980. >
  981. <h4 class="phpdocumentor-element__name" id="method_haveMultiplyConfirmedCenters">
  982. haveMultiplyConfirmedCenters()
  983. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_haveMultiplyConfirmedCenters" class="headerlink"><i class="fas fa-link"></i></a>
  984. </h4>
  985. <aside class="phpdocumentor-element-found-in">
  986. <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>
  987. :
  988. <span class="phpdocumentor-element-found-in__line">587</span>
  989. </aside>
  990. <code class="phpdocumentor-code phpdocumentor-signature ">
  991. <span class="phpdocumentor-signature__visibility">private</span>
  992. <span class="phpdocumentor-signature__name">haveMultiplyConfirmedCenters</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  993. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  994. <span class="phpdocumentor-signature__response_type">bool</span>
  995. &mdash;
  996. <section class="phpdocumentor-description"><p>true if we have found at least 3 finder patterns that have been detected
  997. at least <a href="#CENTER_QUORUM"></a> times each, and, the estimated module size of the
  998. candidates is &quot;pretty similar&quot;</p>
  999. </section>
  1000. </article>
  1001. <article
  1002. class="phpdocumentor-element
  1003. -method
  1004. -private
  1005. "
  1006. >
  1007. <h4 class="phpdocumentor-element__name" id="method_orderBestPatterns">
  1008. orderBestPatterns()
  1009. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_orderBestPatterns" class="headerlink"><i class="fas fa-link"></i></a>
  1010. </h4>
  1011. <aside class="phpdocumentor-element-found-in">
  1012. <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>
  1013. :
  1014. <span class="phpdocumentor-element-found-in__line">725</span>
  1015. </aside>
  1016. <p class="phpdocumentor-summary">Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
  1017. and BC is less than AC, and the angle between BC and BA is less than 180 degrees.</p>
  1018. <code class="phpdocumentor-code phpdocumentor-signature ">
  1019. <span class="phpdocumentor-signature__visibility">private</span>
  1020. <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>
  1021. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1022. <dl class="phpdocumentor-argument-list">
  1023. <dt class="phpdocumentor-argument-list__entry">
  1024. <span class="phpdocumentor-signature__argument__name">$patterns</span>
  1025. : <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>
  1026. </dt>
  1027. <dd class="phpdocumentor-argument-list__definition">
  1028. <section class="phpdocumentor-description"><p>array of three FinderPattern to order</p>
  1029. </section>
  1030. </dd>
  1031. </dl>
  1032. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1033. <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>
  1034. &mdash;
  1035. </article>
  1036. <article
  1037. class="phpdocumentor-element
  1038. -method
  1039. -private
  1040. "
  1041. >
  1042. <h4 class="phpdocumentor-element__name" id="method_selectBestPatterns">
  1043. selectBestPatterns()
  1044. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_selectBestPatterns" class="headerlink"><i class="fas fa-link"></i></a>
  1045. </h4>
  1046. <aside class="phpdocumentor-element-found-in">
  1047. <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>
  1048. :
  1049. <span class="phpdocumentor-element-found-in__line">622</span>
  1050. </aside>
  1051. <code class="phpdocumentor-code phpdocumentor-signature ">
  1052. <span class="phpdocumentor-signature__visibility">private</span>
  1053. <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>
  1054. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  1055. Tags
  1056. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  1057. </h5>
  1058. <dl class="phpdocumentor-tag-list">
  1059. <dt class="phpdocumentor-tag-list__entry">
  1060. <span class="phpdocumentor-tag__name">throws</span>
  1061. </dt>
  1062. <dd class="phpdocumentor-tag-list__definition">
  1063. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  1064. <section class="phpdocumentor-description"><p>if 3 such finder patterns do not exist</p>
  1065. </section>
  1066. </dd>
  1067. </dl>
  1068. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1069. <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>
  1070. &mdash;
  1071. <section class="phpdocumentor-description"><p>the 3 best <a href="FinderPattern"></a>s from our list of candidates. The &quot;best&quot; are
  1072. those that have been detected at least <a href="#CENTER_QUORUM"></a> times, and whose module
  1073. size differs from the average among those patterns the least</p>
  1074. </section>
  1075. </article>
  1076. </section>
  1077. <script type="text/javascript">
  1078. function loadExternalCodeSnippets(line) {
  1079. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  1080. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  1081. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  1082. var language = 'php';
  1083. var code = document.createElement('code');
  1084. code.className = 'language-' + language;
  1085. pre.textContent = '';
  1086. pre.setAttribute('data-line', line)
  1087. code.textContent = 'Loading…';
  1088. pre.appendChild(code);
  1089. var xhr = new XMLHttpRequest();
  1090. xhr.open('GET', src, true);
  1091. xhr.onreadystatechange = function () {
  1092. if (xhr.readyState == 4) {
  1093. if (xhr.status < 400 && xhr.responseText) {
  1094. code.textContent = xhr.responseText;
  1095. Prism.highlightElement(code);
  1096. }
  1097. else if (xhr.status >= 400) {
  1098. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  1099. }
  1100. else {
  1101. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  1102. }
  1103. }
  1104. };
  1105. xhr.send(null);
  1106. });
  1107. }
  1108. var modals = document.querySelectorAll("[data-modal]");
  1109. modals.forEach(function (trigger) {
  1110. trigger.addEventListener("click", function (event) {
  1111. //event.preventDefault();
  1112. const modal = document.getElementById(trigger.dataset.modal);
  1113. modal.classList.add("phpdocumentor-modal__open");
  1114. loadExternalCodeSnippets(trigger.dataset.line)
  1115. const exits = modal.querySelectorAll("[data-exit-button]");
  1116. exits.forEach(function (exit) {
  1117. exit.addEventListener("click", function (event) {
  1118. event.preventDefault();
  1119. modal.classList.remove("phpdocumentor-modal__open");
  1120. });
  1121. });
  1122. });
  1123. });
  1124. </script>
  1125. </article>
  1126. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1127. <section class="phpdocumentor-search-results__dialog">
  1128. <header class="phpdocumentor-search-results__header">
  1129. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1130. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1131. </header>
  1132. <section class="phpdocumentor-search-results__body">
  1133. <ul class="phpdocumentor-search-results__entries"></ul>
  1134. </section>
  1135. </section>
  1136. </section>
  1137. </div>
  1138. </div>
  1139. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1140. </main>
  1141. <script>
  1142. cssVars({});
  1143. </script>
  1144. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1145. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1146. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1147. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1148. </body>
  1149. </html>