chillerlan-QRCode-Detector-Detector.html 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091
  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. Detector
  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/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  121. :
  122. <span class="phpdocumentor-element-found-in__line">26</span>
  123. </aside>
  124. <p class="phpdocumentor-summary">Encapsulates logic that can detect a QR Code in an image, even if the QR Code
  125. is rotated or skewed, or partially obscured.</p>
  126. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  127. Tags
  128. <a href="classes/chillerlan-QRCode-Detector-Detector.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  129. </h5>
  130. <dl class="phpdocumentor-tag-list">
  131. <dt class="phpdocumentor-tag-list__entry">
  132. <span class="phpdocumentor-tag__name">author</span>
  133. </dt>
  134. <dd class="phpdocumentor-tag-list__definition">
  135. <section class="phpdocumentor-description"><p>Sean Owen</p>
  136. </section>
  137. </dd>
  138. </dl>
  139. <h3 id="toc">
  140. Table of Contents
  141. <a href="classes/chillerlan-QRCode-Detector-Detector.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  142. </h3>
  143. <h4 id="toc-properties">
  144. Properties
  145. <a href="classes/chillerlan-QRCode-Detector-Detector.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  146. </h4>
  147. <dl class="phpdocumentor-table-of-contents">
  148. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  149. <a href="classes/chillerlan-QRCode-Detector-Detector.html#property_matrix">$matrix</a>
  150. <span>
  151. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  152. </dt>
  153. </dl>
  154. <h4 id="toc-methods">
  155. Methods
  156. <a href="classes/chillerlan-QRCode-Detector-Detector.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  157. </h4>
  158. <dl class="phpdocumentor-table-of-contents">
  159. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  160. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method___construct">__construct()</a>
  161. <span>
  162. &nbsp;: mixed </span>
  163. </dt>
  164. <dd>Detector constructor.</dd>
  165. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  166. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_detect">detect()</a>
  167. <span>
  168. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  169. </dt>
  170. <dd>Detects a QR Code in an image.</dd>
  171. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  172. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSize">calculateModuleSize()</a>
  173. <span>
  174. &nbsp;: float </span>
  175. </dt>
  176. <dd>Computes an average estimated module size based on estimated derived from the positions
  177. of the three finder patterns.</dd>
  178. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  179. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSizeOneWay">calculateModuleSizeOneWay()</a>
  180. <span>
  181. &nbsp;: float </span>
  182. </dt>
  183. <dd>Estimates module size based on two finder patterns -- it uses
  184. #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int) to figure the
  185. width of each, measuring along the axis between their centers.</dd>
  186. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  187. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_computeDimension">computeDimension()</a>
  188. <span>
  189. &nbsp;: int </span>
  190. </dt>
  191. <dd>Computes the dimension (number of modules on a size) of the QR Code based on the position
  192. of the finder patterns and estimated module size.</dd>
  193. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  194. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_createTransform">createTransform()</a>
  195. <span>
  196. &nbsp;: <a href="classes/chillerlan-QRCode-Detector-PerspectiveTransform.html"><abbr title="\chillerlan\QRCode\Detector\PerspectiveTransform">PerspectiveTransform</abbr></a> </span>
  197. </dt>
  198. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  199. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_findAlignmentInRegion">findAlignmentInRegion()</a>
  200. <span>
  201. &nbsp;: <a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null </span>
  202. </dt>
  203. <dd>Attempts to locate an alignment pattern in a limited region of the image, which is
  204. guessed to contain it.</dd>
  205. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  206. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRun">sizeOfBlackWhiteBlackRun()</a>
  207. <span>
  208. &nbsp;: float </span>
  209. </dt>
  210. <dd>This method traces a line from a po$in the image, in the direction towards another point.</dd>
  211. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  212. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRunBothWays">sizeOfBlackWhiteBlackRunBothWays()</a>
  213. <span>
  214. &nbsp;: float </span>
  215. </dt>
  216. <dd>See #sizeOfBlackWhiteBlackRun(int, int, int, int); computes the total width of
  217. a finder pattern by looking for a black-white-black run from the center in the direction
  218. of another po$(another finder pattern center), and in the opposite direction too.</dd>
  219. </dl>
  220. <section class="phpdocumentor-properties">
  221. <h3 class="phpdocumentor-elements__header" id="properties">
  222. Properties
  223. <a href="classes/chillerlan-QRCode-Detector-Detector.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  224. </h3>
  225. <article
  226. class="
  227. phpdocumentor-element
  228. -property
  229. -private
  230. "
  231. >
  232. <h4 class="phpdocumentor-element__name" id="property_matrix">
  233. $matrix
  234. <a href="classes/chillerlan-QRCode-Detector-Detector.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  235. <span class="phpdocumentor-element__modifiers">
  236. </span>
  237. </h4>
  238. <aside class="phpdocumentor-element-found-in">
  239. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  240. :
  241. <span class="phpdocumentor-element-found-in__line">28</span>
  242. </aside>
  243. <code class="phpdocumentor-code phpdocumentor-signature ">
  244. <span class="phpdocumentor-signature__visibility">private</span>
  245. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  246. <span class="phpdocumentor-signature__name">$matrix</span>
  247. </code>
  248. </article>
  249. </section>
  250. <section class="phpdocumentor-methods">
  251. <h3 class="phpdocumentor-elements__header" id="methods">
  252. Methods
  253. <a href="classes/chillerlan-QRCode-Detector-Detector.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  254. </h3>
  255. <article
  256. class="phpdocumentor-element
  257. -method
  258. -public
  259. "
  260. >
  261. <h4 class="phpdocumentor-element__name" id="method___construct">
  262. __construct()
  263. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  264. </h4>
  265. <aside class="phpdocumentor-element-found-in">
  266. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  267. :
  268. <span class="phpdocumentor-element-found-in__line">33</span>
  269. </aside>
  270. <p class="phpdocumentor-summary">Detector constructor.</p>
  271. <code class="phpdocumentor-code phpdocumentor-signature ">
  272. <span class="phpdocumentor-signature__visibility">public</span>
  273. <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-Common-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Common\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$source</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  274. <div class="phpdocumentor-label-line">
  275. </div>
  276. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  277. <dl class="phpdocumentor-argument-list">
  278. <dt class="phpdocumentor-argument-list__entry">
  279. <span class="phpdocumentor-signature__argument__name">$source</span>
  280. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Common\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a></span>
  281. </dt>
  282. <dd class="phpdocumentor-argument-list__definition">
  283. </dd>
  284. </dl>
  285. </article>
  286. <article
  287. class="phpdocumentor-element
  288. -method
  289. -public
  290. "
  291. >
  292. <h4 class="phpdocumentor-element__name" id="method_detect">
  293. detect()
  294. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_detect" class="headerlink"><i class="fas fa-link"></i></a>
  295. </h4>
  296. <aside class="phpdocumentor-element-found-in">
  297. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  298. :
  299. <span class="phpdocumentor-element-found-in__line">40</span>
  300. </aside>
  301. <p class="phpdocumentor-summary">Detects a QR Code in an image.</p>
  302. <code class="phpdocumentor-code phpdocumentor-signature ">
  303. <span class="phpdocumentor-signature__visibility">public</span>
  304. <span class="phpdocumentor-signature__name">detect</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span></code>
  305. <div class="phpdocumentor-label-line">
  306. </div>
  307. <section>
  308. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  309. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  310. </section>
  311. </article>
  312. <article
  313. class="phpdocumentor-element
  314. -method
  315. -private
  316. "
  317. >
  318. <h4 class="phpdocumentor-element__name" id="method_calculateModuleSize">
  319. calculateModuleSize()
  320. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSize" class="headerlink"><i class="fas fa-link"></i></a>
  321. </h4>
  322. <aside class="phpdocumentor-element-found-in">
  323. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  324. :
  325. <span class="phpdocumentor-element-found-in__line">82</span>
  326. </aside>
  327. <p class="phpdocumentor-summary">Computes an average estimated module size based on estimated derived from the positions
  328. of the three finder patterns.</p>
  329. <code class="phpdocumentor-code phpdocumentor-signature ">
  330. <span class="phpdocumentor-signature__visibility">private</span>
  331. <span class="phpdocumentor-signature__name">calculateModuleSize</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">$topLeft</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">$topRight</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">$bottomLeft</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  332. <div class="phpdocumentor-label-line">
  333. </div>
  334. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  335. <dl class="phpdocumentor-argument-list">
  336. <dt class="phpdocumentor-argument-list__entry">
  337. <span class="phpdocumentor-signature__argument__name">$topLeft</span>
  338. : <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>
  339. </dt>
  340. <dd class="phpdocumentor-argument-list__definition">
  341. </dd>
  342. <dt class="phpdocumentor-argument-list__entry">
  343. <span class="phpdocumentor-signature__argument__name">$topRight</span>
  344. : <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>
  345. </dt>
  346. <dd class="phpdocumentor-argument-list__definition">
  347. </dd>
  348. <dt class="phpdocumentor-argument-list__entry">
  349. <span class="phpdocumentor-signature__argument__name">$bottomLeft</span>
  350. : <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>
  351. </dt>
  352. <dd class="phpdocumentor-argument-list__definition">
  353. </dd>
  354. </dl>
  355. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  356. Tags
  357. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSize#tags" class="headerlink"><i class="fas fa-link"></i></a>
  358. </h5>
  359. <dl class="phpdocumentor-tag-list">
  360. <dt class="phpdocumentor-tag-list__entry">
  361. <span class="phpdocumentor-tag__name">throws</span>
  362. </dt>
  363. <dd class="phpdocumentor-tag-list__definition">
  364. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Detector-QRCodeDetectorException.html"><abbr title="\chillerlan\QRCode\Detector\QRCodeDetectorException">QRCodeDetectorException</abbr></a></span>
  365. </dd>
  366. </dl>
  367. <section>
  368. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  369. <span class="phpdocumentor-signature__response_type">float</span>
  370. </section>
  371. </article>
  372. <article
  373. class="phpdocumentor-element
  374. -method
  375. -private
  376. "
  377. >
  378. <h4 class="phpdocumentor-element__name" id="method_calculateModuleSizeOneWay">
  379. calculateModuleSizeOneWay()
  380. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSizeOneWay" class="headerlink"><i class="fas fa-link"></i></a>
  381. </h4>
  382. <aside class="phpdocumentor-element-found-in">
  383. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  384. :
  385. <span class="phpdocumentor-element-found-in__line">101</span>
  386. </aside>
  387. <p class="phpdocumentor-summary">Estimates module size based on two finder patterns -- it uses
  388. #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int) to figure the
  389. width of each, measuring along the axis between their centers.</p>
  390. <code class="phpdocumentor-code phpdocumentor-signature ">
  391. <span class="phpdocumentor-signature__visibility">private</span>
  392. <span class="phpdocumentor-signature__name">calculateModuleSizeOneWay</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">$a</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">$b</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  393. <div class="phpdocumentor-label-line">
  394. </div>
  395. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  396. <dl class="phpdocumentor-argument-list">
  397. <dt class="phpdocumentor-argument-list__entry">
  398. <span class="phpdocumentor-signature__argument__name">$a</span>
  399. : <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>
  400. </dt>
  401. <dd class="phpdocumentor-argument-list__definition">
  402. </dd>
  403. <dt class="phpdocumentor-argument-list__entry">
  404. <span class="phpdocumentor-signature__argument__name">$b</span>
  405. : <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>
  406. </dt>
  407. <dd class="phpdocumentor-argument-list__definition">
  408. </dd>
  409. </dl>
  410. <section>
  411. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  412. <span class="phpdocumentor-signature__response_type">float</span>
  413. </section>
  414. </article>
  415. <article
  416. class="phpdocumentor-element
  417. -method
  418. -private
  419. "
  420. >
  421. <h4 class="phpdocumentor-element__name" id="method_computeDimension">
  422. computeDimension()
  423. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_computeDimension" class="headerlink"><i class="fas fa-link"></i></a>
  424. </h4>
  425. <aside class="phpdocumentor-element-found-in">
  426. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  427. :
  428. <span class="phpdocumentor-element-found-in__line">239</span>
  429. </aside>
  430. <p class="phpdocumentor-summary">Computes the dimension (number of modules on a size) of the QR Code based on the position
  431. of the finder patterns and estimated module size.</p>
  432. <code class="phpdocumentor-code phpdocumentor-signature ">
  433. <span class="phpdocumentor-signature__visibility">private</span>
  434. <span class="phpdocumentor-signature__name">computeDimension</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">$nw</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">$ne</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">$sw</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">$size</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  435. <div class="phpdocumentor-label-line">
  436. </div>
  437. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  438. <dl class="phpdocumentor-argument-list">
  439. <dt class="phpdocumentor-argument-list__entry">
  440. <span class="phpdocumentor-signature__argument__name">$nw</span>
  441. : <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>
  442. </dt>
  443. <dd class="phpdocumentor-argument-list__definition">
  444. </dd>
  445. <dt class="phpdocumentor-argument-list__entry">
  446. <span class="phpdocumentor-signature__argument__name">$ne</span>
  447. : <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>
  448. </dt>
  449. <dd class="phpdocumentor-argument-list__definition">
  450. </dd>
  451. <dt class="phpdocumentor-argument-list__entry">
  452. <span class="phpdocumentor-signature__argument__name">$sw</span>
  453. : <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>
  454. </dt>
  455. <dd class="phpdocumentor-argument-list__definition">
  456. </dd>
  457. <dt class="phpdocumentor-argument-list__entry">
  458. <span class="phpdocumentor-signature__argument__name">$size</span>
  459. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  460. </dt>
  461. <dd class="phpdocumentor-argument-list__definition">
  462. </dd>
  463. </dl>
  464. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  465. Tags
  466. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_computeDimension#tags" class="headerlink"><i class="fas fa-link"></i></a>
  467. </h5>
  468. <dl class="phpdocumentor-tag-list">
  469. <dt class="phpdocumentor-tag-list__entry">
  470. <span class="phpdocumentor-tag__name">throws</span>
  471. </dt>
  472. <dd class="phpdocumentor-tag-list__definition">
  473. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Detector-QRCodeDetectorException.html"><abbr title="\chillerlan\QRCode\Detector\QRCodeDetectorException">QRCodeDetectorException</abbr></a></span>
  474. </dd>
  475. </dl>
  476. <section>
  477. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  478. <span class="phpdocumentor-signature__response_type">int</span>
  479. </section>
  480. </article>
  481. <article
  482. class="phpdocumentor-element
  483. -method
  484. -private
  485. "
  486. >
  487. <h4 class="phpdocumentor-element__name" id="method_createTransform">
  488. createTransform()
  489. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_createTransform" class="headerlink"><i class="fas fa-link"></i></a>
  490. </h4>
  491. <aside class="phpdocumentor-element-found-in">
  492. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  493. :
  494. <span class="phpdocumentor-element-found-in__line">308</span>
  495. </aside>
  496. <code class="phpdocumentor-code phpdocumentor-signature ">
  497. <span class="phpdocumentor-signature__visibility">private</span>
  498. <span class="phpdocumentor-signature__name">createTransform</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">$nw</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">$ne</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">$sw</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">$size</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$ap</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-PerspectiveTransform.html"><abbr title="\chillerlan\QRCode\Detector\PerspectiveTransform">PerspectiveTransform</abbr></a></span></code>
  499. <div class="phpdocumentor-label-line">
  500. </div>
  501. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  502. <dl class="phpdocumentor-argument-list">
  503. <dt class="phpdocumentor-argument-list__entry">
  504. <span class="phpdocumentor-signature__argument__name">$nw</span>
  505. : <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>
  506. </dt>
  507. <dd class="phpdocumentor-argument-list__definition">
  508. </dd>
  509. <dt class="phpdocumentor-argument-list__entry">
  510. <span class="phpdocumentor-signature__argument__name">$ne</span>
  511. : <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>
  512. </dt>
  513. <dd class="phpdocumentor-argument-list__definition">
  514. </dd>
  515. <dt class="phpdocumentor-argument-list__entry">
  516. <span class="phpdocumentor-signature__argument__name">$sw</span>
  517. : <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>
  518. </dt>
  519. <dd class="phpdocumentor-argument-list__definition">
  520. </dd>
  521. <dt class="phpdocumentor-argument-list__entry">
  522. <span class="phpdocumentor-signature__argument__name">$size</span>
  523. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  524. </dt>
  525. <dd class="phpdocumentor-argument-list__definition">
  526. </dd>
  527. <dt class="phpdocumentor-argument-list__entry">
  528. <span class="phpdocumentor-signature__argument__name">$ap</span>
  529. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a></span>
  530. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  531. <dd class="phpdocumentor-argument-list__definition">
  532. </dd>
  533. </dl>
  534. <section>
  535. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  536. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-PerspectiveTransform.html"><abbr title="\chillerlan\QRCode\Detector\PerspectiveTransform">PerspectiveTransform</abbr></a></span>
  537. </section>
  538. </article>
  539. <article
  540. class="phpdocumentor-element
  541. -method
  542. -private
  543. "
  544. >
  545. <h4 class="phpdocumentor-element__name" id="method_findAlignmentInRegion">
  546. findAlignmentInRegion()
  547. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_findAlignmentInRegion" class="headerlink"><i class="fas fa-link"></i></a>
  548. </h4>
  549. <aside class="phpdocumentor-element-found-in">
  550. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  551. :
  552. <span class="phpdocumentor-element-found-in__line">274</span>
  553. </aside>
  554. <p class="phpdocumentor-summary">Attempts to locate an alignment pattern in a limited region of the image, which is
  555. guessed to contain it.</p>
  556. <code class="phpdocumentor-code phpdocumentor-signature ">
  557. <span class="phpdocumentor-signature__visibility">private</span>
  558. <span class="phpdocumentor-signature__name">findAlignmentInRegion</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$overallEstModuleSize</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">$estAlignmentX</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">$estAlignmentY</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">$allowanceFactor</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null</span></code>
  559. <div class="phpdocumentor-label-line">
  560. </div>
  561. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  562. <dl class="phpdocumentor-argument-list">
  563. <dt class="phpdocumentor-argument-list__entry">
  564. <span class="phpdocumentor-signature__argument__name">$overallEstModuleSize</span>
  565. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  566. </dt>
  567. <dd class="phpdocumentor-argument-list__definition">
  568. <section class="phpdocumentor-description"><p>estimated module size so far</p>
  569. </section>
  570. </dd>
  571. <dt class="phpdocumentor-argument-list__entry">
  572. <span class="phpdocumentor-signature__argument__name">$estAlignmentX</span>
  573. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  574. </dt>
  575. <dd class="phpdocumentor-argument-list__definition">
  576. <section class="phpdocumentor-description"><p>x coordinate of center of area probably containing alignment pattern</p>
  577. </section>
  578. </dd>
  579. <dt class="phpdocumentor-argument-list__entry">
  580. <span class="phpdocumentor-signature__argument__name">$estAlignmentY</span>
  581. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  582. </dt>
  583. <dd class="phpdocumentor-argument-list__definition">
  584. <section class="phpdocumentor-description"><p>y coordinate of above</p>
  585. </section>
  586. </dd>
  587. <dt class="phpdocumentor-argument-list__entry">
  588. <span class="phpdocumentor-signature__argument__name">$allowanceFactor</span>
  589. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  590. </dt>
  591. <dd class="phpdocumentor-argument-list__definition">
  592. <section class="phpdocumentor-description"><p>number of pixels in all directions to search from the center</p>
  593. </section>
  594. </dd>
  595. </dl>
  596. <section>
  597. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  598. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null</span>
  599. &mdash;
  600. <section class="phpdocumentor-description"><p>if found, or null otherwise</p>
  601. </section>
  602. </section>
  603. </article>
  604. <article
  605. class="phpdocumentor-element
  606. -method
  607. -private
  608. "
  609. >
  610. <h4 class="phpdocumentor-element__name" id="method_sizeOfBlackWhiteBlackRun">
  611. sizeOfBlackWhiteBlackRun()
  612. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRun" class="headerlink"><i class="fas fa-link"></i></a>
  613. </h4>
  614. <aside class="phpdocumentor-element-found-in">
  615. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  616. :
  617. <span class="phpdocumentor-element-found-in__line">168</span>
  618. </aside>
  619. <p class="phpdocumentor-summary">This method traces a line from a po$in the image, in the direction towards another point.</p>
  620. <code class="phpdocumentor-code phpdocumentor-signature ">
  621. <span class="phpdocumentor-signature__visibility">private</span>
  622. <span class="phpdocumentor-signature__name">sizeOfBlackWhiteBlackRun</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$fromX</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">$fromY</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">$toX</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">$toY</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  623. <div class="phpdocumentor-label-line">
  624. </div>
  625. <section class="phpdocumentor-description"><p>It begins in a black region, and keeps going until it finds white, then black, then white again.
  626. It reports the distance from the start to this point.</p>
  627. <p>This is used when figuring out how wide a finder pattern is, when the finder pattern
  628. may be skewed or rotated.</p>
  629. </section>
  630. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  631. <dl class="phpdocumentor-argument-list">
  632. <dt class="phpdocumentor-argument-list__entry">
  633. <span class="phpdocumentor-signature__argument__name">$fromX</span>
  634. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  635. </dt>
  636. <dd class="phpdocumentor-argument-list__definition">
  637. </dd>
  638. <dt class="phpdocumentor-argument-list__entry">
  639. <span class="phpdocumentor-signature__argument__name">$fromY</span>
  640. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  641. </dt>
  642. <dd class="phpdocumentor-argument-list__definition">
  643. </dd>
  644. <dt class="phpdocumentor-argument-list__entry">
  645. <span class="phpdocumentor-signature__argument__name">$toX</span>
  646. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  647. </dt>
  648. <dd class="phpdocumentor-argument-list__definition">
  649. </dd>
  650. <dt class="phpdocumentor-argument-list__entry">
  651. <span class="phpdocumentor-signature__argument__name">$toY</span>
  652. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  653. </dt>
  654. <dd class="phpdocumentor-argument-list__definition">
  655. </dd>
  656. </dl>
  657. <section>
  658. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  659. <span class="phpdocumentor-signature__response_type">float</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_sizeOfBlackWhiteBlackRunBothWays">
  669. sizeOfBlackWhiteBlackRunBothWays()
  670. <a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRunBothWays" 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/Detector.php"><a href="files/src-detector-detector.html"><abbr title="src/Detector/Detector.php">Detector.php</abbr></a></abbr>
  674. :
  675. <span class="phpdocumentor-element-found-in__line">125</span>
  676. </aside>
  677. <p class="phpdocumentor-summary">See #sizeOfBlackWhiteBlackRun(int, int, int, int); computes the total width of
  678. a finder pattern by looking for a black-white-black run from the center in the direction
  679. of another po$(another finder pattern center), and in the opposite direction too.</p>
  680. <code class="phpdocumentor-code phpdocumentor-signature ">
  681. <span class="phpdocumentor-signature__visibility">private</span>
  682. <span class="phpdocumentor-signature__name">sizeOfBlackWhiteBlackRunBothWays</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$fromX</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">$fromY</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">$toX</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">$toY</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  683. <div class="phpdocumentor-label-line">
  684. </div>
  685. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  686. <dl class="phpdocumentor-argument-list">
  687. <dt class="phpdocumentor-argument-list__entry">
  688. <span class="phpdocumentor-signature__argument__name">$fromX</span>
  689. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  690. </dt>
  691. <dd class="phpdocumentor-argument-list__definition">
  692. </dd>
  693. <dt class="phpdocumentor-argument-list__entry">
  694. <span class="phpdocumentor-signature__argument__name">$fromY</span>
  695. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  696. </dt>
  697. <dd class="phpdocumentor-argument-list__definition">
  698. </dd>
  699. <dt class="phpdocumentor-argument-list__entry">
  700. <span class="phpdocumentor-signature__argument__name">$toX</span>
  701. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  702. </dt>
  703. <dd class="phpdocumentor-argument-list__definition">
  704. </dd>
  705. <dt class="phpdocumentor-argument-list__entry">
  706. <span class="phpdocumentor-signature__argument__name">$toY</span>
  707. : <span class="phpdocumentor-signature__argument__return-type">float</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-Detector.html#method_sizeOfBlackWhiteBlackRunBothWays#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</span>
  728. </section>
  729. </article>
  730. </section>
  731. <div class="phpdocumentor-modal" id="source-view">
  732. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  733. <div class="phpdocumentor-modal-container">
  734. <div class="phpdocumentor-modal-content">
  735. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Detector/Detector.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  736. </div>
  737. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  738. </div>
  739. </div>
  740. <script type="text/javascript">
  741. (function () {
  742. function loadExternalCodeSnippet(el, url, line) {
  743. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  744. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  745. const language = 'php';
  746. const code = document.createElement('code');
  747. code.className = 'language-' + language;
  748. pre.textContent = '';
  749. pre.setAttribute('data-line', line)
  750. code.textContent = 'Loading…';
  751. pre.appendChild(code);
  752. var xhr = new XMLHttpRequest();
  753. xhr.open('GET', src, true);
  754. xhr.onreadystatechange = function () {
  755. if (xhr.readyState !== 4) {
  756. return;
  757. }
  758. if (xhr.status < 400 && xhr.responseText) {
  759. code.textContent = xhr.responseText;
  760. Prism.highlightElement(code);
  761. return;
  762. }
  763. if (xhr.status === 404) {
  764. code.textContent = '✖ Error: File could not be found';
  765. return;
  766. }
  767. if (xhr.status >= 400) {
  768. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  769. return;
  770. }
  771. code.textContent = '✖ Error: An unknown error occurred';
  772. };
  773. xhr.send(null);
  774. });
  775. }
  776. const modalButtons = document.querySelectorAll("[data-modal]");
  777. const openedAsLocalFile = window.location.protocol === 'file:';
  778. if (modalButtons.length > 0 && openedAsLocalFile) {
  779. console.warn(
  780. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  781. 'browsers block XHR requests when a page is opened this way'
  782. );
  783. }
  784. modalButtons.forEach(function (trigger) {
  785. if (openedAsLocalFile) {
  786. trigger.setAttribute("hidden", "hidden");
  787. }
  788. trigger.addEventListener("click", function (event) {
  789. event.preventDefault();
  790. const modal = document.getElementById(trigger.dataset.modal);
  791. if (!modal) {
  792. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  793. return;
  794. }
  795. modal.classList.add("phpdocumentor-modal__open");
  796. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  797. const exits = modal.querySelectorAll("[data-exit-button]");
  798. exits.forEach(function (exit) {
  799. exit.addEventListener("click", function (event) {
  800. event.preventDefault();
  801. modal.classList.remove("phpdocumentor-modal__open");
  802. });
  803. });
  804. });
  805. });
  806. })();
  807. </script>
  808. </article>
  809. </section>
  810. <section class="phpdocumentor-on-this-page__sidebar">
  811. <section class="phpdocumentor-on-this-page__content">
  812. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  813. <ul class="phpdocumentor-list -clean">
  814. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  815. <li>
  816. <ul class="phpdocumentor-list -clean">
  817. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#toc-properties">Properties</a></li>
  818. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#toc-methods">Methods</a></li>
  819. </ul>
  820. </li>
  821. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  822. <li>
  823. <ul class="phpdocumentor-list -clean">
  824. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#property_matrix">$matrix<a href="classes/chillerlan-QRCode-Detector-Detector.html"></li>
  825. </ul>
  826. </li>
  827. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  828. <li>
  829. <ul class="phpdocumentor-list -clean">
  830. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method___construct">__construct()</a></li>
  831. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method_detect">detect()</a></li>
  832. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSize">calculateModuleSize()</a></li>
  833. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method_calculateModuleSizeOneWay">calculateModuleSizeOneWay()</a></li>
  834. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method_computeDimension">computeDimension()</a></li>
  835. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method_createTransform">createTransform()</a></li>
  836. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method_findAlignmentInRegion">findAlignmentInRegion()</a></li>
  837. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRun">sizeOfBlackWhiteBlackRun()</a></li>
  838. <li><a href="classes/chillerlan-QRCode-Detector-Detector.html#method_sizeOfBlackWhiteBlackRunBothWays">sizeOfBlackWhiteBlackRunBothWays()</a></li>
  839. </ul>
  840. </li>
  841. </ul>
  842. </section>
  843. </section>
  844. </div>
  845. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  846. <section class="phpdocumentor-search-results__dialog">
  847. <header class="phpdocumentor-search-results__header">
  848. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  849. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  850. </header>
  851. <section class="phpdocumentor-search-results__body">
  852. <ul class="phpdocumentor-search-results__entries"></ul>
  853. </section>
  854. </section>
  855. </section>
  856. </div>
  857. <a href="classes/chillerlan-QRCode-Detector-Detector.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  858. </main>
  859. <script>
  860. cssVars({});
  861. </script>
  862. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  863. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  864. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  865. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  866. </body>
  867. </html>