chillerlan-QRCode-Detector-FinderPatternFinder.html 87 KB

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