chillerlan-QRCode-Detector-FinderPatternFinder.html 76 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481
  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_bitMatrix">$bitMatrix</a>
  147. <span>
  148. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </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_hasSkipped">$hasSkipped</a>
  153. <span>
  154. &nbsp;: bool </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_bitMatrix">
  353. $bitMatrix
  354. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_bitMatrix" 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">33</span>
  362. </aside>
  363. <code class="phpdocumentor-code phpdocumentor-signature ">
  364. <span class="phpdocumentor-signature__visibility">private</span>
  365. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  366. <span class="phpdocumentor-signature__name">$bitMatrix</span>
  367. </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_hasSkipped">
  379. $hasSkipped
  380. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#property_hasSkipped" 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">36</span>
  388. </aside>
  389. <code class="phpdocumentor-code phpdocumentor-signature ">
  390. <span class="phpdocumentor-signature__visibility">private</span>
  391. <span class="phpdocumentor-signature__type">bool</span>
  392. <span class="phpdocumentor-signature__name">$hasSkipped</span>
  393. = <span class="phpdocumentor-signature__default-value">false</span></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">$bitMatrix</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">$bitMatrix</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"><a href=""><abbr title=""></abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$centerI</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href=""><abbr title=""></abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$centerJ</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  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"><a href=""><abbr title=""></abbr></a></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"><a href=""><abbr title=""></abbr></a></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">415</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-return-value__heading">Return values</h5>
  622. <span class="phpdocumentor-signature__response_type">float|null</span>
  623. &mdash;
  624. </article>
  625. <article
  626. class="phpdocumentor-element
  627. -method
  628. -private
  629. "
  630. >
  631. <h4 class="phpdocumentor-element__name" id="method_crossCheckVertical">
  632. crossCheckVertical()
  633. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossCheckVertical" class="headerlink"><i class="fas fa-link"></i></a>
  634. </h4>
  635. <aside class="phpdocumentor-element-found-in">
  636. <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>
  637. :
  638. <span class="phpdocumentor-element-found-in__line">332</span>
  639. </aside>
  640. <p class="phpdocumentor-summary">After a horizontal scan finds a potential finder pattern, this method
  641. &quot;cross-checks&quot; by scanning down vertically through the center of the possible
  642. finder pattern to see if the same proportion is detected.</p>
  643. <code class="phpdocumentor-code phpdocumentor-signature ">
  644. <span class="phpdocumentor-signature__visibility">private</span>
  645. <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>
  646. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  647. <dl class="phpdocumentor-argument-list">
  648. <dt class="phpdocumentor-argument-list__entry">
  649. <span class="phpdocumentor-signature__argument__name">$startI</span>
  650. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  651. </dt>
  652. <dd class="phpdocumentor-argument-list__definition">
  653. <section class="phpdocumentor-description"><p>; row where a finder pattern was detected</p>
  654. </section>
  655. </dd>
  656. <dt class="phpdocumentor-argument-list__entry">
  657. <span class="phpdocumentor-signature__argument__name">$centerJ</span>
  658. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  659. </dt>
  660. <dd class="phpdocumentor-argument-list__definition">
  661. <section class="phpdocumentor-description"><p>; center of the section that appears to cross a finder pattern</p>
  662. </section>
  663. </dd>
  664. <dt class="phpdocumentor-argument-list__entry">
  665. <span class="phpdocumentor-signature__argument__name">$maxCount</span>
  666. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  667. </dt>
  668. <dd class="phpdocumentor-argument-list__definition">
  669. <section class="phpdocumentor-description"><p>; maximum reasonable number of modules that should be
  670. observed in any reading state, based on the results of the horizontal scan</p>
  671. </section>
  672. </dd>
  673. <dt class="phpdocumentor-argument-list__entry">
  674. <span class="phpdocumentor-signature__argument__name">$originalStateCountTotal</span>
  675. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  676. </dt>
  677. <dd class="phpdocumentor-argument-list__definition">
  678. </dd>
  679. </dl>
  680. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  681. <span class="phpdocumentor-signature__response_type">float|null</span>
  682. &mdash;
  683. <section class="phpdocumentor-description"><p>vertical center of finder pattern, or null if not found</p>
  684. </section>
  685. </article>
  686. <article
  687. class="phpdocumentor-element
  688. -method
  689. -private
  690. "
  691. >
  692. <h4 class="phpdocumentor-element__name" id="method_crossProductZ">
  693. crossProductZ()
  694. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_crossProductZ" class="headerlink"><i class="fas fa-link"></i></a>
  695. </h4>
  696. <aside class="phpdocumentor-element-found-in">
  697. <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>
  698. :
  699. <span class="phpdocumentor-element-found-in__line">758</span>
  700. </aside>
  701. <p class="phpdocumentor-summary">Returns the z component of the cross product between vectors BC and BA.</p>
  702. <code class="phpdocumentor-code phpdocumentor-signature ">
  703. <span class="phpdocumentor-signature__visibility">private</span>
  704. <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>
  705. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  706. <dl class="phpdocumentor-argument-list">
  707. <dt class="phpdocumentor-argument-list__entry">
  708. <span class="phpdocumentor-signature__argument__name">$pointA</span>
  709. : <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>
  710. </dt>
  711. <dd class="phpdocumentor-argument-list__definition">
  712. <section class="phpdocumentor-description"></section>
  713. </dd>
  714. <dt class="phpdocumentor-argument-list__entry">
  715. <span class="phpdocumentor-signature__argument__name">$pointB</span>
  716. : <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>
  717. </dt>
  718. <dd class="phpdocumentor-argument-list__definition">
  719. <section class="phpdocumentor-description"></section>
  720. </dd>
  721. <dt class="phpdocumentor-argument-list__entry">
  722. <span class="phpdocumentor-signature__argument__name">$pointC</span>
  723. : <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>
  724. </dt>
  725. <dd class="phpdocumentor-argument-list__definition">
  726. <section class="phpdocumentor-description"></section>
  727. </dd>
  728. </dl>
  729. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  730. <span class="phpdocumentor-signature__response_type">float</span>
  731. &mdash;
  732. </article>
  733. <article
  734. class="phpdocumentor-element
  735. -method
  736. -private
  737. "
  738. >
  739. <h4 class="phpdocumentor-element__name" id="method_doShiftCounts2">
  740. doShiftCounts2()
  741. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_doShiftCounts2" class="headerlink"><i class="fas fa-link"></i></a>
  742. </h4>
  743. <aside class="phpdocumentor-element-found-in">
  744. <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>
  745. :
  746. <span class="phpdocumentor-element-found-in__line">174</span>
  747. </aside>
  748. <code class="phpdocumentor-code phpdocumentor-signature ">
  749. <span class="phpdocumentor-signature__visibility">private</span>
  750. <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>
  751. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  752. <dl class="phpdocumentor-argument-list">
  753. <dt class="phpdocumentor-argument-list__entry">
  754. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  755. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  756. </dt>
  757. <dd class="phpdocumentor-argument-list__definition">
  758. </dd>
  759. </dl>
  760. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  761. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  762. &mdash;
  763. </article>
  764. <article
  765. class="phpdocumentor-element
  766. -method
  767. -private
  768. "
  769. >
  770. <h4 class="phpdocumentor-element__name" id="method_findRowSkip">
  771. findRowSkip()
  772. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_findRowSkip" class="headerlink"><i class="fas fa-link"></i></a>
  773. </h4>
  774. <aside class="phpdocumentor-element-found-in">
  775. <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>
  776. :
  777. <span class="phpdocumentor-element-found-in__line">548</span>
  778. </aside>
  779. <code class="phpdocumentor-code phpdocumentor-signature ">
  780. <span class="phpdocumentor-signature__visibility">private</span>
  781. <span class="phpdocumentor-signature__name">findRowSkip</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  782. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  783. <span class="phpdocumentor-signature__response_type">int</span>
  784. &mdash;
  785. <section class="phpdocumentor-description"><p>number of rows we could safely skip during scanning, based on the first
  786. two finder patterns that have been located. In some cases their position will
  787. allow us to infer that the third pattern must lie below a certain point farther
  788. down in the image.</p>
  789. </section>
  790. </article>
  791. <article
  792. class="phpdocumentor-element
  793. -method
  794. -private
  795. "
  796. >
  797. <h4 class="phpdocumentor-element__name" id="method_foundPatternCross">
  798. foundPatternCross()
  799. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternCross" class="headerlink"><i class="fas fa-link"></i></a>
  800. </h4>
  801. <aside class="phpdocumentor-element-found-in">
  802. <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>
  803. :
  804. <span class="phpdocumentor-element-found-in__line">197</span>
  805. </aside>
  806. <code class="phpdocumentor-code phpdocumentor-signature ">
  807. <span class="phpdocumentor-signature__visibility">private</span>
  808. <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>
  809. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  810. <dl class="phpdocumentor-argument-list">
  811. <dt class="phpdocumentor-argument-list__entry">
  812. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  813. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  814. </dt>
  815. <dd class="phpdocumentor-argument-list__definition">
  816. </dd>
  817. </dl>
  818. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  819. <span class="phpdocumentor-signature__response_type">bool</span>
  820. &mdash;
  821. </article>
  822. <article
  823. class="phpdocumentor-element
  824. -method
  825. -private
  826. "
  827. >
  828. <h4 class="phpdocumentor-element__name" id="method_foundPatternDiagonal">
  829. foundPatternDiagonal()
  830. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternDiagonal" class="headerlink"><i class="fas fa-link"></i></a>
  831. </h4>
  832. <aside class="phpdocumentor-element-found-in">
  833. <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>
  834. :
  835. <span class="phpdocumentor-element-found-in__line">205</span>
  836. </aside>
  837. <code class="phpdocumentor-code phpdocumentor-signature ">
  838. <span class="phpdocumentor-signature__visibility">private</span>
  839. <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>
  840. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  841. <dl class="phpdocumentor-argument-list">
  842. <dt class="phpdocumentor-argument-list__entry">
  843. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  844. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  845. </dt>
  846. <dd class="phpdocumentor-argument-list__definition">
  847. </dd>
  848. </dl>
  849. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  850. <span class="phpdocumentor-signature__response_type">bool</span>
  851. &mdash;
  852. </article>
  853. <article
  854. class="phpdocumentor-element
  855. -method
  856. -private
  857. "
  858. >
  859. <h4 class="phpdocumentor-element__name" id="method_foundPatternVariance">
  860. foundPatternVariance()
  861. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_foundPatternVariance" class="headerlink"><i class="fas fa-link"></i></a>
  862. </h4>
  863. <aside class="phpdocumentor-element-found-in">
  864. <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>
  865. :
  866. <span class="phpdocumentor-element-found-in__line">216</span>
  867. </aside>
  868. <code class="phpdocumentor-code phpdocumentor-signature ">
  869. <span class="phpdocumentor-signature__visibility">private</span>
  870. <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>
  871. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  872. <dl class="phpdocumentor-argument-list">
  873. <dt class="phpdocumentor-argument-list__entry">
  874. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  875. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  876. </dt>
  877. <dd class="phpdocumentor-argument-list__definition">
  878. <section class="phpdocumentor-description"><p>count of black/white/black/white/black pixels just read</p>
  879. </section>
  880. </dd>
  881. <dt class="phpdocumentor-argument-list__entry">
  882. <span class="phpdocumentor-signature__argument__name">$variance</span>
  883. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  884. </dt>
  885. <dd class="phpdocumentor-argument-list__definition">
  886. <section class="phpdocumentor-description"></section>
  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. <section class="phpdocumentor-description"><p>true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios
  893. used by finder patterns to be considered a match</p>
  894. </section>
  895. </article>
  896. <article
  897. class="phpdocumentor-element
  898. -method
  899. -private
  900. "
  901. >
  902. <h4 class="phpdocumentor-element__name" id="method_getCrossCheckStateCount">
  903. getCrossCheckStateCount()
  904. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_getCrossCheckStateCount" class="headerlink"><i class="fas fa-link"></i></a>
  905. </h4>
  906. <aside class="phpdocumentor-element-found-in">
  907. <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>
  908. :
  909. <span class="phpdocumentor-element-found-in__line">165</span>
  910. </aside>
  911. <code class="phpdocumentor-code phpdocumentor-signature ">
  912. <span class="phpdocumentor-signature__visibility">private</span>
  913. <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>
  914. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  915. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  916. &mdash;
  917. </article>
  918. <article
  919. class="phpdocumentor-element
  920. -method
  921. -private
  922. "
  923. >
  924. <h4 class="phpdocumentor-element__name" id="method_handlePossibleCenter">
  925. handlePossibleCenter()
  926. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_handlePossibleCenter" class="headerlink"><i class="fas fa-link"></i></a>
  927. </h4>
  928. <aside class="phpdocumentor-element-found-in">
  929. <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>
  930. :
  931. <span class="phpdocumentor-element-found-in__line">508</span>
  932. </aside>
  933. <p class="phpdocumentor-summary">This is called when a horizontal scan finds a possible alignment pattern. It will
  934. cross check with a vertical scan, and if successful, will, ah, cross-cross-check
  935. with another horizontal scan. This is needed primarily to locate the real horizontal
  936. center of the pattern in cases of extreme skew.</p>
  937. <code class="phpdocumentor-code phpdocumentor-signature ">
  938. <span class="phpdocumentor-signature__visibility">private</span>
  939. <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>
  940. <section class="phpdocumentor-description"><p>And then we cross-cross-cross check with another diagonal scan.</p>
  941. <p>If that succeeds the finder pattern location is added to a list that tracks
  942. the number of times each location has been nearly-matched as a finder pattern.
  943. Each additional find is more evidence that the location is in fact a finder
  944. pattern center</p>
  945. </section>
  946. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  947. <dl class="phpdocumentor-argument-list">
  948. <dt class="phpdocumentor-argument-list__entry">
  949. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  950. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  951. </dt>
  952. <dd class="phpdocumentor-argument-list__definition">
  953. <section class="phpdocumentor-description"><p>reading state module counts from horizontal scan</p>
  954. </section>
  955. </dd>
  956. <dt class="phpdocumentor-argument-list__entry">
  957. <span class="phpdocumentor-signature__argument__name">$i</span>
  958. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  959. </dt>
  960. <dd class="phpdocumentor-argument-list__definition">
  961. <section class="phpdocumentor-description"><p>row where finder pattern may be found</p>
  962. </section>
  963. </dd>
  964. <dt class="phpdocumentor-argument-list__entry">
  965. <span class="phpdocumentor-signature__argument__name">$j</span>
  966. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  967. </dt>
  968. <dd class="phpdocumentor-argument-list__definition">
  969. <section class="phpdocumentor-description"><p>end of possible finder pattern in row</p>
  970. </section>
  971. </dd>
  972. </dl>
  973. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  974. <span class="phpdocumentor-signature__response_type">bool</span>
  975. &mdash;
  976. <section class="phpdocumentor-description"><p>if a finder pattern candidate was found this time</p>
  977. </section>
  978. </article>
  979. <article
  980. class="phpdocumentor-element
  981. -method
  982. -private
  983. "
  984. >
  985. <h4 class="phpdocumentor-element__name" id="method_haveMultiplyConfirmedCenters">
  986. haveMultiplyConfirmedCenters()
  987. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_haveMultiplyConfirmedCenters" class="headerlink"><i class="fas fa-link"></i></a>
  988. </h4>
  989. <aside class="phpdocumentor-element-found-in">
  990. <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>
  991. :
  992. <span class="phpdocumentor-element-found-in__line">586</span>
  993. </aside>
  994. <code class="phpdocumentor-code phpdocumentor-signature ">
  995. <span class="phpdocumentor-signature__visibility">private</span>
  996. <span class="phpdocumentor-signature__name">haveMultiplyConfirmedCenters</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  997. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  998. <span class="phpdocumentor-signature__response_type">bool</span>
  999. &mdash;
  1000. <section class="phpdocumentor-description"><p>true if we have found at least 3 finder patterns that have been detected
  1001. at least #CENTER_QUORUM times each, and, the estimated module size of the
  1002. candidates is &quot;pretty similar&quot;</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_orderBestPatterns">
  1012. orderBestPatterns()
  1013. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_orderBestPatterns" 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">724</span>
  1019. </aside>
  1020. <p class="phpdocumentor-summary">Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
  1021. and BC is less than AC, and the angle between BC and BA is less than 180 degrees.</p>
  1022. <code class="phpdocumentor-code phpdocumentor-signature ">
  1023. <span class="phpdocumentor-signature__visibility">private</span>
  1024. <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>
  1025. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1026. <dl class="phpdocumentor-argument-list">
  1027. <dt class="phpdocumentor-argument-list__entry">
  1028. <span class="phpdocumentor-signature__argument__name">$patterns</span>
  1029. : <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>
  1030. </dt>
  1031. <dd class="phpdocumentor-argument-list__definition">
  1032. <section class="phpdocumentor-description"><p>array of three FinderPattern to order</p>
  1033. </section>
  1034. </dd>
  1035. </dl>
  1036. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1037. <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>
  1038. &mdash;
  1039. </article>
  1040. <article
  1041. class="phpdocumentor-element
  1042. -method
  1043. -private
  1044. "
  1045. >
  1046. <h4 class="phpdocumentor-element__name" id="method_selectBestPatterns">
  1047. selectBestPatterns()
  1048. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#method_selectBestPatterns" class="headerlink"><i class="fas fa-link"></i></a>
  1049. </h4>
  1050. <aside class="phpdocumentor-element-found-in">
  1051. <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>
  1052. :
  1053. <span class="phpdocumentor-element-found-in__line">621</span>
  1054. </aside>
  1055. <code class="phpdocumentor-code phpdocumentor-signature ">
  1056. <span class="phpdocumentor-signature__visibility">private</span>
  1057. <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>
  1058. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  1059. Tags
  1060. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  1061. </h5>
  1062. <dl class="phpdocumentor-tag-list">
  1063. <dt class="phpdocumentor-tag-list__entry">
  1064. <span class="phpdocumentor-tag__name">throws</span>
  1065. </dt>
  1066. <dd class="phpdocumentor-tag-list__definition">
  1067. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Detector-QRCodeDetectorException.html"><abbr title="\chillerlan\QRCode\Detector\QRCodeDetectorException">QRCodeDetectorException</abbr></a></span>
  1068. <section class="phpdocumentor-description"><p>if 3 such finder patterns do not exist</p>
  1069. </section>
  1070. </dd>
  1071. </dl>
  1072. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1073. <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>
  1074. &mdash;
  1075. <section class="phpdocumentor-description"><p>the 3 best FinderPatterns from our list of candidates. The &quot;best&quot; are
  1076. those that have been detected at least #CENTER_QUORUM times, and whose module
  1077. size differs from the average among those patterns the least</p>
  1078. </section>
  1079. </article>
  1080. </section>
  1081. <script type="text/javascript">
  1082. function loadExternalCodeSnippets(line) {
  1083. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  1084. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  1085. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  1086. var language = 'php';
  1087. var code = document.createElement('code');
  1088. code.className = 'language-' + language;
  1089. pre.textContent = '';
  1090. pre.setAttribute('data-line', line)
  1091. code.textContent = 'Loading…';
  1092. pre.appendChild(code);
  1093. var xhr = new XMLHttpRequest();
  1094. xhr.open('GET', src, true);
  1095. xhr.onreadystatechange = function () {
  1096. if (xhr.readyState == 4) {
  1097. if (xhr.status < 400 && xhr.responseText) {
  1098. code.textContent = xhr.responseText;
  1099. Prism.highlightElement(code);
  1100. }
  1101. else if (xhr.status >= 400) {
  1102. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  1103. }
  1104. else {
  1105. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  1106. }
  1107. }
  1108. };
  1109. xhr.send(null);
  1110. });
  1111. }
  1112. var modals = document.querySelectorAll("[data-modal]");
  1113. modals.forEach(function (trigger) {
  1114. trigger.addEventListener("click", function (event) {
  1115. //event.preventDefault();
  1116. const modal = document.getElementById(trigger.dataset.modal);
  1117. modal.classList.add("phpdocumentor-modal__open");
  1118. loadExternalCodeSnippets(trigger.dataset.line)
  1119. const exits = modal.querySelectorAll("[data-exit-button]");
  1120. exits.forEach(function (exit) {
  1121. exit.addEventListener("click", function (event) {
  1122. event.preventDefault();
  1123. modal.classList.remove("phpdocumentor-modal__open");
  1124. });
  1125. });
  1126. });
  1127. });
  1128. </script>
  1129. </article>
  1130. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1131. <section class="phpdocumentor-search-results__dialog">
  1132. <header class="phpdocumentor-search-results__header">
  1133. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1134. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1135. </header>
  1136. <section class="phpdocumentor-search-results__body">
  1137. <ul class="phpdocumentor-search-results__entries"></ul>
  1138. </section>
  1139. </section>
  1140. </section>
  1141. </div>
  1142. </div>
  1143. <a href="classes/chillerlan-QRCode-Detector-FinderPatternFinder.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1144. </main>
  1145. <script>
  1146. cssVars({});
  1147. </script>
  1148. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1149. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1150. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1151. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1152. </body>
  1153. </html>