chillerlan-QRCode-Detector-FinderPatternFinder.html 87 KB

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