chillerlan-QRCode-Detector-FinderPatternFinder.html 87 KB

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