chillerlan-QRCode-Detector-FinderPatternFinder.html 78 KB

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