chillerlan-QRCode-Detector-FinderPatternFinder.html 77 KB

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