chillerlan-QRCode-Decoder-Binarizer.html 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace">
  56. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  57. </h4>
  58. <ul class="phpdocumentor-list">
  59. <li>
  60. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  61. </li>
  62. <li>
  63. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  64. </li>
  65. </ul>
  66. </section>
  67. <section class="phpdocumentor-sidebar__category">
  68. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  69. <h4 class="phpdocumentor-sidebar__root-namespace">
  70. <a href="packages/Application.html" class="">Application</a>
  71. </h4>
  72. </section>
  73. <section class="phpdocumentor-sidebar__category">
  74. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  75. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  76. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  78. </section>
  79. <section class="phpdocumentor-sidebar__category">
  80. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  81. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  82. </section>
  83. </aside>
  84. <div class="phpdocumentor-column -eight phpdocumentor-content">
  85. <ul class="phpdocumentor-breadcrumbs">
  86. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  87. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  88. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-decoder.html">Decoder</a></li>
  89. </ul>
  90. <article class="phpdocumentor-element -class">
  91. <h2 class="phpdocumentor-content__title">
  92. Binarizer
  93. <div class="phpdocumentor-element__package">
  94. in package
  95. <ul class="phpdocumentor-breadcrumbs">
  96. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  97. </ul>
  98. </div>
  99. </h2>
  100. <aside class="phpdocumentor-element-found-in">
  101. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  102. :
  103. <span class="phpdocumentor-element-found-in__line">34</span>
  104. </aside>
  105. <p class="phpdocumentor-summary">This class implements a local thresholding algorithm, which while slower than the
  106. GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for
  107. high frequency images of barcodes with black data on white backgrounds. For this application,
  108. it does a much better job than a global blackpoint with severe shadows and gradients.</p>
  109. <section class="phpdocumentor-description"><p>However it tends to produce artifacts on lower frequency images and is therefore not
  110. a good general purpose binarizer for uses outside ZXing.</p>
  111. <p>This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers,
  112. and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already
  113. inherently local, and only fails for horizontal gradients. We can revisit that problem later,
  114. but for now it was not a win to use local blocks for 1D.</p>
  115. <p>This Binarizer is the default for the unit tests and the recommended class for library users.</p>
  116. </section>
  117. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  118. Tags
  119. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  120. </h5>
  121. <dl class="phpdocumentor-tag-list">
  122. <dt class="phpdocumentor-tag-list__entry">
  123. <span class="phpdocumentor-tag__name">author</span>
  124. </dt>
  125. <dd class="phpdocumentor-tag-list__definition">
  126. <section class="phpdocumentor-description"><p>dswitkin@google.com (Daniel Switkin)</p>
  127. </section>
  128. </dd>
  129. </dl>
  130. <h3 id="toc">
  131. Table of Contents
  132. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  133. </h3>
  134. <dl class="phpdocumentor-table-of-contents">
  135. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  136. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_BLOCK_SIZE">BLOCK_SIZE</a>
  137. <span>
  138. &nbsp;= 8 </span>
  139. </dt>
  140. <dd></dd>
  141. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  142. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_BLOCK_SIZE_MASK">BLOCK_SIZE_MASK</a>
  143. <span>
  144. &nbsp;= 7 </span>
  145. </dt>
  146. <dd></dd>
  147. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  148. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_BLOCK_SIZE_POWER">BLOCK_SIZE_POWER</a>
  149. <span>
  150. &nbsp;= 3 </span>
  151. </dt>
  152. <dd></dd>
  153. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  154. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_LUMINANCE_BUCKETS">LUMINANCE_BUCKETS</a>
  155. <span>
  156. &nbsp;= 32 </span>
  157. </dt>
  158. <dd></dd>
  159. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  160. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_LUMINANCE_SHIFT">LUMINANCE_SHIFT</a>
  161. <span>
  162. &nbsp;= 3 </span>
  163. </dt>
  164. <dd></dd>
  165. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  166. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_MIN_DYNAMIC_RANGE">MIN_DYNAMIC_RANGE</a>
  167. <span>
  168. &nbsp;= 24 </span>
  169. </dt>
  170. <dd></dd>
  171. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  172. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_MINIMUM_DIMENSION">MINIMUM_DIMENSION</a>
  173. <span>
  174. &nbsp;= 40 </span>
  175. </dt>
  176. <dd></dd>
  177. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  178. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#property_luminances">$luminances</a>
  179. <span>
  180. &nbsp;: array&lt;string|int, mixed&gt; </span>
  181. </dt>
  182. <dd></dd>
  183. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  184. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#property_source">$source</a>
  185. <span>
  186. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Decoder\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a> </span>
  187. </dt>
  188. <dd></dd>
  189. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  190. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method___construct">__construct()</a>
  191. <span>
  192. &nbsp;: mixed </span>
  193. </dt>
  194. <dd></dd>
  195. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  196. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_getBlackMatrix">getBlackMatrix()</a>
  197. <span>
  198. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  199. </dt>
  200. <dd>Calculates the final BitMatrix once for all requests. This could be called once from the
  201. constructor instead, but there are some advantages to doing it lazily, such as making
  202. profiling easier, and not doing heavy lifting when callers don&#039;t expect it.</dd>
  203. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  204. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_calculateBlackPoints">calculateBlackPoints()</a>
  205. <span>
  206. &nbsp;: array&lt;string|int, mixed&gt; </span>
  207. </dt>
  208. <dd>Calculates a single black point for each block of pixels and saves it away.</dd>
  209. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  210. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_calculateThresholdForBlock">calculateThresholdForBlock()</a>
  211. <span>
  212. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  213. </dt>
  214. <dd>For each block in the image, calculate the average black point using a 5x5 grid
  215. of the blocks around it. Also handles the corner cases (fractional blocks are computed based
  216. on the last pixels in the row/column which are also used in the previous block).</dd>
  217. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  218. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_cap">cap()</a>
  219. <span>
  220. &nbsp;: int </span>
  221. </dt>
  222. <dd></dd>
  223. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  224. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_estimateBlackPoint">estimateBlackPoint()</a>
  225. <span>
  226. &nbsp;: int </span>
  227. </dt>
  228. <dd></dd>
  229. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  230. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_getHistogramBlackMatrix">getHistogramBlackMatrix()</a>
  231. <span>
  232. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  233. </dt>
  234. <dd></dd>
  235. </dl>
  236. <section class="phpdocumentor-constants">
  237. <h3 class="phpdocumentor-elements__header" id="constants">
  238. Constants
  239. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  240. </h3>
  241. <article class="phpdocumentor-element -constant -private ">
  242. <h4 class="phpdocumentor-element__name" id="constant_BLOCK_SIZE">
  243. BLOCK_SIZE
  244. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_BLOCK_SIZE" class="headerlink"><i class="fas fa-link"></i></a>
  245. </h4>
  246. <aside class="phpdocumentor-element-found-in">
  247. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  248. :
  249. <span class="phpdocumentor-element-found-in__line">39</span>
  250. </aside>
  251. <code class="phpdocumentor-signature phpdocumentor-code ">
  252. <span class="phpdocumentor-signature__visibility">private</span>
  253. <span class="phpdocumentor-signature__type">mixed</span>
  254. <span class="phpdocumentor-signature__name">BLOCK_SIZE</span>
  255. = <span class="phpdocumentor-signature__default-value">8</span>
  256. </code>
  257. <section class="phpdocumentor-description"></section>
  258. <section class="phpdocumentor-description"></section>
  259. </article>
  260. <article class="phpdocumentor-element -constant -private ">
  261. <h4 class="phpdocumentor-element__name" id="constant_BLOCK_SIZE_MASK">
  262. BLOCK_SIZE_MASK
  263. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_BLOCK_SIZE_MASK" 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/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  267. :
  268. <span class="phpdocumentor-element-found-in__line">40</span>
  269. </aside>
  270. <code class="phpdocumentor-signature phpdocumentor-code ">
  271. <span class="phpdocumentor-signature__visibility">private</span>
  272. <span class="phpdocumentor-signature__type">mixed</span>
  273. <span class="phpdocumentor-signature__name">BLOCK_SIZE_MASK</span>
  274. = <span class="phpdocumentor-signature__default-value">7</span>
  275. </code>
  276. <section class="phpdocumentor-description"></section>
  277. <section class="phpdocumentor-description"></section>
  278. </article>
  279. <article class="phpdocumentor-element -constant -private ">
  280. <h4 class="phpdocumentor-element__name" id="constant_BLOCK_SIZE_POWER">
  281. BLOCK_SIZE_POWER
  282. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_BLOCK_SIZE_POWER" class="headerlink"><i class="fas fa-link"></i></a>
  283. </h4>
  284. <aside class="phpdocumentor-element-found-in">
  285. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  286. :
  287. <span class="phpdocumentor-element-found-in__line">38</span>
  288. </aside>
  289. <code class="phpdocumentor-signature phpdocumentor-code ">
  290. <span class="phpdocumentor-signature__visibility">private</span>
  291. <span class="phpdocumentor-signature__type">mixed</span>
  292. <span class="phpdocumentor-signature__name">BLOCK_SIZE_POWER</span>
  293. = <span class="phpdocumentor-signature__default-value">3</span>
  294. </code>
  295. <section class="phpdocumentor-description"></section>
  296. <section class="phpdocumentor-description"></section>
  297. </article>
  298. <article class="phpdocumentor-element -constant -private ">
  299. <h4 class="phpdocumentor-element__name" id="constant_LUMINANCE_BUCKETS">
  300. LUMINANCE_BUCKETS
  301. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_LUMINANCE_BUCKETS" class="headerlink"><i class="fas fa-link"></i></a>
  302. </h4>
  303. <aside class="phpdocumentor-element-found-in">
  304. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  305. :
  306. <span class="phpdocumentor-element-found-in__line">46</span>
  307. </aside>
  308. <code class="phpdocumentor-signature phpdocumentor-code ">
  309. <span class="phpdocumentor-signature__visibility">private</span>
  310. <span class="phpdocumentor-signature__type">mixed</span>
  311. <span class="phpdocumentor-signature__name">LUMINANCE_BUCKETS</span>
  312. = <span class="phpdocumentor-signature__default-value">32</span>
  313. </code>
  314. <section class="phpdocumentor-description"></section>
  315. <section class="phpdocumentor-description"></section>
  316. </article>
  317. <article class="phpdocumentor-element -constant -private ">
  318. <h4 class="phpdocumentor-element__name" id="constant_LUMINANCE_SHIFT">
  319. LUMINANCE_SHIFT
  320. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_LUMINANCE_SHIFT" 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/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  324. :
  325. <span class="phpdocumentor-element-found-in__line">45</span>
  326. </aside>
  327. <code class="phpdocumentor-signature phpdocumentor-code ">
  328. <span class="phpdocumentor-signature__visibility">private</span>
  329. <span class="phpdocumentor-signature__type">mixed</span>
  330. <span class="phpdocumentor-signature__name">LUMINANCE_SHIFT</span>
  331. = <span class="phpdocumentor-signature__default-value">3</span>
  332. </code>
  333. <section class="phpdocumentor-description"></section>
  334. <section class="phpdocumentor-description"></section>
  335. </article>
  336. <article class="phpdocumentor-element -constant -private ">
  337. <h4 class="phpdocumentor-element__name" id="constant_MIN_DYNAMIC_RANGE">
  338. MIN_DYNAMIC_RANGE
  339. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_MIN_DYNAMIC_RANGE" 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/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  343. :
  344. <span class="phpdocumentor-element-found-in__line">42</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_DYNAMIC_RANGE</span>
  350. = <span class="phpdocumentor-signature__default-value">24</span>
  351. </code>
  352. <section class="phpdocumentor-description"></section>
  353. <section class="phpdocumentor-description"></section>
  354. </article>
  355. <article class="phpdocumentor-element -constant -private ">
  356. <h4 class="phpdocumentor-element__name" id="constant_MINIMUM_DIMENSION">
  357. MINIMUM_DIMENSION
  358. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#constant_MINIMUM_DIMENSION" class="headerlink"><i class="fas fa-link"></i></a>
  359. </h4>
  360. <aside class="phpdocumentor-element-found-in">
  361. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  362. :
  363. <span class="phpdocumentor-element-found-in__line">41</span>
  364. </aside>
  365. <code class="phpdocumentor-signature phpdocumentor-code ">
  366. <span class="phpdocumentor-signature__visibility">private</span>
  367. <span class="phpdocumentor-signature__type">mixed</span>
  368. <span class="phpdocumentor-signature__name">MINIMUM_DIMENSION</span>
  369. = <span class="phpdocumentor-signature__default-value">40</span>
  370. </code>
  371. <section class="phpdocumentor-description"></section>
  372. <section class="phpdocumentor-description"></section>
  373. </article>
  374. </section>
  375. <section class="phpdocumentor-properties">
  376. <h3 class="phpdocumentor-elements__header" id="properties">
  377. Properties
  378. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  379. </h3>
  380. <article
  381. class="
  382. phpdocumentor-element
  383. -property
  384. -private
  385. "
  386. >
  387. <h4 class="phpdocumentor-element__name" id="property_luminances">
  388. $luminances
  389. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#property_luminances" class="headerlink"><i class="fas fa-link"></i></a>
  390. <span class="phpdocumentor-element__modifiers">
  391. </span>
  392. </h4>
  393. <aside class="phpdocumentor-element-found-in">
  394. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  395. :
  396. <span class="phpdocumentor-element-found-in__line">49</span>
  397. </aside>
  398. <code class="phpdocumentor-code phpdocumentor-signature ">
  399. <span class="phpdocumentor-signature__visibility">private</span>
  400. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  401. <span class="phpdocumentor-signature__name">$luminances</span>
  402. </code>
  403. <section class="phpdocumentor-description"></section>
  404. <section class="phpdocumentor-description"></section>
  405. </article>
  406. <article
  407. class="
  408. phpdocumentor-element
  409. -property
  410. -private
  411. "
  412. >
  413. <h4 class="phpdocumentor-element__name" id="property_source">
  414. $source
  415. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#property_source" class="headerlink"><i class="fas fa-link"></i></a>
  416. <span class="phpdocumentor-element__modifiers">
  417. </span>
  418. </h4>
  419. <aside class="phpdocumentor-element-found-in">
  420. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  421. :
  422. <span class="phpdocumentor-element-found-in__line">48</span>
  423. </aside>
  424. <code class="phpdocumentor-code phpdocumentor-signature ">
  425. <span class="phpdocumentor-signature__visibility">private</span>
  426. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Decoder\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a></span>
  427. <span class="phpdocumentor-signature__name">$source</span>
  428. </code>
  429. <section class="phpdocumentor-description"></section>
  430. <section class="phpdocumentor-description"></section>
  431. </article>
  432. </section>
  433. <section class="phpdocumentor-methods">
  434. <h3 class="phpdocumentor-elements__header" id="methods">
  435. Methods
  436. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  437. </h3>
  438. <article
  439. class="phpdocumentor-element
  440. -method
  441. -public
  442. "
  443. >
  444. <h4 class="phpdocumentor-element__name" id="method___construct">
  445. __construct()
  446. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  447. </h4>
  448. <aside class="phpdocumentor-element-found-in">
  449. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  450. :
  451. <span class="phpdocumentor-element-found-in__line">54</span>
  452. </aside>
  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-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Decoder\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>
  456. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  457. <dl class="phpdocumentor-argument-list">
  458. <dt class="phpdocumentor-argument-list__entry">
  459. <span class="phpdocumentor-signature__argument__name">$source</span>
  460. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Decoder\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a></span>
  461. </dt>
  462. <dd class="phpdocumentor-argument-list__definition">
  463. <section class="phpdocumentor-description"></section>
  464. </dd>
  465. </dl>
  466. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  467. <span class="phpdocumentor-signature__response_type">mixed</span>
  468. &mdash;
  469. </article>
  470. <article
  471. class="phpdocumentor-element
  472. -method
  473. -public
  474. "
  475. >
  476. <h4 class="phpdocumentor-element__name" id="method_getBlackMatrix">
  477. getBlackMatrix()
  478. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_getBlackMatrix" 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/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  482. :
  483. <span class="phpdocumentor-element-found-in__line">138</span>
  484. </aside>
  485. <p class="phpdocumentor-summary">Calculates the final BitMatrix once for all requests. This could be called once from the
  486. constructor instead, but there are some advantages to doing it lazily, such as making
  487. profiling easier, and not doing heavy lifting when callers don&#039;t expect it.</p>
  488. <code class="phpdocumentor-code phpdocumentor-signature ">
  489. <span class="phpdocumentor-signature__visibility">public</span>
  490. <span class="phpdocumentor-signature__name">getBlackMatrix</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>
  491. <section class="phpdocumentor-description"><p>Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive
  492. and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or
  493. may not apply sharpening. Therefore, a row from this matrix may not be identical to one
  494. fetched using getBlackRow(), so don't mix and match between them.</p>
  495. </section>
  496. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  497. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  498. &mdash;
  499. <section class="phpdocumentor-description"><p>The 2D array of bits for the image (true means black).</p>
  500. </section>
  501. </article>
  502. <article
  503. class="phpdocumentor-element
  504. -method
  505. -private
  506. "
  507. >
  508. <h4 class="phpdocumentor-element__name" id="method_calculateBlackPoints">
  509. calculateBlackPoints()
  510. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_calculateBlackPoints" class="headerlink"><i class="fas fa-link"></i></a>
  511. </h4>
  512. <aside class="phpdocumentor-element-found-in">
  513. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  514. :
  515. <span class="phpdocumentor-element-found-in__line">206</span>
  516. </aside>
  517. <p class="phpdocumentor-summary">Calculates a single black point for each block of pixels and saves it away.</p>
  518. <code class="phpdocumentor-code phpdocumentor-signature ">
  519. <span class="phpdocumentor-signature__visibility">private</span>
  520. <span class="phpdocumentor-signature__name">calculateBlackPoints</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$subWidth</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">$subHeight</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">$width</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">$height</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  521. <section class="phpdocumentor-description"><p>See the following thread for a discussion of this algorithm:</p>
  522. </section>
  523. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  524. <dl class="phpdocumentor-argument-list">
  525. <dt class="phpdocumentor-argument-list__entry">
  526. <span class="phpdocumentor-signature__argument__name">$subWidth</span>
  527. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  528. </dt>
  529. <dd class="phpdocumentor-argument-list__definition">
  530. <section class="phpdocumentor-description"></section>
  531. </dd>
  532. <dt class="phpdocumentor-argument-list__entry">
  533. <span class="phpdocumentor-signature__argument__name">$subHeight</span>
  534. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  535. </dt>
  536. <dd class="phpdocumentor-argument-list__definition">
  537. <section class="phpdocumentor-description"></section>
  538. </dd>
  539. <dt class="phpdocumentor-argument-list__entry">
  540. <span class="phpdocumentor-signature__argument__name">$width</span>
  541. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  542. </dt>
  543. <dd class="phpdocumentor-argument-list__definition">
  544. <section class="phpdocumentor-description"></section>
  545. </dd>
  546. <dt class="phpdocumentor-argument-list__entry">
  547. <span class="phpdocumentor-signature__argument__name">$height</span>
  548. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  549. </dt>
  550. <dd class="phpdocumentor-argument-list__definition">
  551. <section class="phpdocumentor-description"></section>
  552. </dd>
  553. </dl>
  554. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  555. Tags
  556. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  557. </h5>
  558. <dl class="phpdocumentor-tag-list">
  559. <dt class="phpdocumentor-tag-list__entry">
  560. <span class="phpdocumentor-tag__name">see</span>
  561. </dt>
  562. <dd class="phpdocumentor-tag-list__definition">
  563. <span class="phpdocumentor-tag-link"><a href="http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0"><abbr title="http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0">http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0</abbr></a></span>
  564. </dd>
  565. </dl>
  566. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  567. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  568. &mdash;
  569. </article>
  570. <article
  571. class="phpdocumentor-element
  572. -method
  573. -private
  574. "
  575. >
  576. <h4 class="phpdocumentor-element__name" id="method_calculateThresholdForBlock">
  577. calculateThresholdForBlock()
  578. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_calculateThresholdForBlock" class="headerlink"><i class="fas fa-link"></i></a>
  579. </h4>
  580. <aside class="phpdocumentor-element-found-in">
  581. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  582. :
  583. <span class="phpdocumentor-element-found-in__line">301</span>
  584. </aside>
  585. <p class="phpdocumentor-summary">For each block in the image, calculate the average black point using a 5x5 grid
  586. of the blocks around it. Also handles the corner cases (fractional blocks are computed based
  587. on the last pixels in the row/column which are also used in the previous block).</p>
  588. <code class="phpdocumentor-code phpdocumentor-signature ">
  589. <span class="phpdocumentor-signature__visibility">private</span>
  590. <span class="phpdocumentor-signature__name">calculateThresholdForBlock</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$subWidth</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">$subHeight</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">$width</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">$height</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>
  591. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  592. <dl class="phpdocumentor-argument-list">
  593. <dt class="phpdocumentor-argument-list__entry">
  594. <span class="phpdocumentor-signature__argument__name">$subWidth</span>
  595. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  596. </dt>
  597. <dd class="phpdocumentor-argument-list__definition">
  598. <section class="phpdocumentor-description"></section>
  599. </dd>
  600. <dt class="phpdocumentor-argument-list__entry">
  601. <span class="phpdocumentor-signature__argument__name">$subHeight</span>
  602. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  603. </dt>
  604. <dd class="phpdocumentor-argument-list__definition">
  605. <section class="phpdocumentor-description"></section>
  606. </dd>
  607. <dt class="phpdocumentor-argument-list__entry">
  608. <span class="phpdocumentor-signature__argument__name">$width</span>
  609. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  610. </dt>
  611. <dd class="phpdocumentor-argument-list__definition">
  612. <section class="phpdocumentor-description"></section>
  613. </dd>
  614. <dt class="phpdocumentor-argument-list__entry">
  615. <span class="phpdocumentor-signature__argument__name">$height</span>
  616. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  617. </dt>
  618. <dd class="phpdocumentor-argument-list__definition">
  619. <section class="phpdocumentor-description"></section>
  620. </dd>
  621. </dl>
  622. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  623. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  624. &mdash;
  625. </article>
  626. <article
  627. class="phpdocumentor-element
  628. -method
  629. -private
  630. "
  631. >
  632. <h4 class="phpdocumentor-element__name" id="method_cap">
  633. cap()
  634. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_cap" class="headerlink"><i class="fas fa-link"></i></a>
  635. </h4>
  636. <aside class="phpdocumentor-element-found-in">
  637. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  638. :
  639. <span class="phpdocumentor-element-found-in__line">350</span>
  640. </aside>
  641. <code class="phpdocumentor-code phpdocumentor-signature ">
  642. <span class="phpdocumentor-signature__visibility">private</span>
  643. <span class="phpdocumentor-signature__name">cap</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$value</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">$min</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">$max</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  644. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  645. <dl class="phpdocumentor-argument-list">
  646. <dt class="phpdocumentor-argument-list__entry">
  647. <span class="phpdocumentor-signature__argument__name">$value</span>
  648. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  649. </dt>
  650. <dd class="phpdocumentor-argument-list__definition">
  651. <section class="phpdocumentor-description"></section>
  652. </dd>
  653. <dt class="phpdocumentor-argument-list__entry">
  654. <span class="phpdocumentor-signature__argument__name">$min</span>
  655. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  656. </dt>
  657. <dd class="phpdocumentor-argument-list__definition">
  658. <section class="phpdocumentor-description"></section>
  659. </dd>
  660. <dt class="phpdocumentor-argument-list__entry">
  661. <span class="phpdocumentor-signature__argument__name">$max</span>
  662. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  663. </dt>
  664. <dd class="phpdocumentor-argument-list__definition">
  665. <section class="phpdocumentor-description"></section>
  666. </dd>
  667. </dl>
  668. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  669. Tags
  670. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  671. </h5>
  672. <dl class="phpdocumentor-tag-list">
  673. <dt class="phpdocumentor-tag-list__entry">
  674. <span class="phpdocumentor-tag__name">noinspection</span>
  675. </dt>
  676. <dd class="phpdocumentor-tag-list__definition">
  677. <section class="phpdocumentor-description"><p>PhpSameParameterValueInspection</p>
  678. </section>
  679. </dd>
  680. </dl>
  681. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  682. <span class="phpdocumentor-signature__response_type">int</span>
  683. &mdash;
  684. </article>
  685. <article
  686. class="phpdocumentor-element
  687. -method
  688. -private
  689. "
  690. >
  691. <h4 class="phpdocumentor-element__name" id="method_estimateBlackPoint">
  692. estimateBlackPoint()
  693. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_estimateBlackPoint" class="headerlink"><i class="fas fa-link"></i></a>
  694. </h4>
  695. <aside class="phpdocumentor-element-found-in">
  696. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  697. :
  698. <span class="phpdocumentor-element-found-in__line">62</span>
  699. </aside>
  700. <code class="phpdocumentor-code phpdocumentor-signature ">
  701. <span class="phpdocumentor-signature__visibility">private</span>
  702. <span class="phpdocumentor-signature__name">estimateBlackPoint</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$buckets</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  703. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  704. <dl class="phpdocumentor-argument-list">
  705. <dt class="phpdocumentor-argument-list__entry">
  706. <span class="phpdocumentor-signature__argument__name">$buckets</span>
  707. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  708. </dt>
  709. <dd class="phpdocumentor-argument-list__definition">
  710. <section class="phpdocumentor-description"></section>
  711. </dd>
  712. </dl>
  713. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  714. Tags
  715. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  716. </h5>
  717. <dl class="phpdocumentor-tag-list">
  718. <dt class="phpdocumentor-tag-list__entry">
  719. <span class="phpdocumentor-tag__name">throws</span>
  720. </dt>
  721. <dd class="phpdocumentor-tag-list__definition">
  722. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  723. </dd>
  724. </dl>
  725. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  726. <span class="phpdocumentor-signature__response_type">int</span>
  727. &mdash;
  728. </article>
  729. <article
  730. class="phpdocumentor-element
  731. -method
  732. -private
  733. "
  734. >
  735. <h4 class="phpdocumentor-element__name" id="method_getHistogramBlackMatrix">
  736. getHistogramBlackMatrix()
  737. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#method_getHistogramBlackMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  738. </h4>
  739. <aside class="phpdocumentor-element-found-in">
  740. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/Binarizer.php"><a href="files/src-decoder-binarizer.html"><abbr title="src/Decoder/Binarizer.php">Binarizer.php</abbr></a></abbr>
  741. :
  742. <span class="phpdocumentor-element-found-in__line">165</span>
  743. </aside>
  744. <code class="phpdocumentor-code phpdocumentor-signature ">
  745. <span class="phpdocumentor-signature__visibility">private</span>
  746. <span class="phpdocumentor-signature__name">getHistogramBlackMatrix</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$width</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">$height</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>
  747. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  748. <dl class="phpdocumentor-argument-list">
  749. <dt class="phpdocumentor-argument-list__entry">
  750. <span class="phpdocumentor-signature__argument__name">$width</span>
  751. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  752. </dt>
  753. <dd class="phpdocumentor-argument-list__definition">
  754. <section class="phpdocumentor-description"></section>
  755. </dd>
  756. <dt class="phpdocumentor-argument-list__entry">
  757. <span class="phpdocumentor-signature__argument__name">$height</span>
  758. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  759. </dt>
  760. <dd class="phpdocumentor-argument-list__definition">
  761. <section class="phpdocumentor-description"></section>
  762. </dd>
  763. </dl>
  764. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  765. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  766. &mdash;
  767. </article>
  768. </section>
  769. <script type="text/javascript">
  770. function loadExternalCodeSnippets(line) {
  771. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  772. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  773. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  774. var language = 'php';
  775. var code = document.createElement('code');
  776. code.className = 'language-' + language;
  777. pre.textContent = '';
  778. pre.setAttribute('data-line', line)
  779. code.textContent = 'Loading…';
  780. pre.appendChild(code);
  781. var xhr = new XMLHttpRequest();
  782. xhr.open('GET', src, true);
  783. xhr.onreadystatechange = function () {
  784. if (xhr.readyState == 4) {
  785. if (xhr.status < 400 && xhr.responseText) {
  786. code.textContent = xhr.responseText;
  787. Prism.highlightElement(code);
  788. }
  789. else if (xhr.status >= 400) {
  790. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  791. }
  792. else {
  793. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  794. }
  795. }
  796. };
  797. xhr.send(null);
  798. });
  799. }
  800. var modals = document.querySelectorAll("[data-modal]");
  801. modals.forEach(function (trigger) {
  802. trigger.addEventListener("click", function (event) {
  803. //event.preventDefault();
  804. const modal = document.getElementById(trigger.dataset.modal);
  805. modal.classList.add("phpdocumentor-modal__open");
  806. loadExternalCodeSnippets(trigger.dataset.line)
  807. const exits = modal.querySelectorAll("[data-exit-button]");
  808. exits.forEach(function (exit) {
  809. exit.addEventListener("click", function (event) {
  810. event.preventDefault();
  811. modal.classList.remove("phpdocumentor-modal__open");
  812. });
  813. });
  814. });
  815. });
  816. </script>
  817. </article>
  818. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  819. <section class="phpdocumentor-search-results__dialog">
  820. <header class="phpdocumentor-search-results__header">
  821. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  822. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  823. </header>
  824. <section class="phpdocumentor-search-results__body">
  825. <ul class="phpdocumentor-search-results__entries"></ul>
  826. </section>
  827. </section>
  828. </section>
  829. </div>
  830. </div>
  831. <a href="classes/chillerlan-QRCode-Decoder-Binarizer.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  832. </main>
  833. <script>
  834. cssVars({});
  835. </script>
  836. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  837. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  838. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  839. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  840. </body>
  841. </html>