ipfml.html 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>ipfml &mdash; IPFML v0.1.9 documentation</title>
  8. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  9. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  10. <link rel="index" title="Index" href="genindex.html" />
  11. <link rel="search" title="Search" href="search.html" />
  12. <link rel="next" title="ipfml.filters" href="ipfml.filters.html" />
  13. <link rel="prev" title="Description" href="description.html" />
  14. <script src="_static/js/modernizr.min.js"></script>
  15. </head>
  16. <body class="wy-body-for-nav">
  17. <div class="wy-grid-for-nav">
  18. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  19. <div class="wy-side-scroll">
  20. <div class="wy-side-nav-search">
  21. <a href="index.html" class="icon icon-home"> IPFML
  22. </a>
  23. <div class="version">
  24. 0.1.9
  25. </div>
  26. <div role="search">
  27. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  28. <input type="text" name="q" placeholder="Search docs" />
  29. <input type="hidden" name="check_keywords" value="yes" />
  30. <input type="hidden" name="area" value="default" />
  31. </form>
  32. </div>
  33. </div>
  34. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  35. <ul class="current">
  36. <li class="toctree-l1"><a class="reference internal" href="description.html">Description</a></li>
  37. <li class="toctree-l1 current"><a class="current reference internal" href="#">ipfml</a><ul>
  38. <li class="toctree-l2"><a class="reference internal" href="#module-ipfml.metrics">ipfml.metrics</a></li>
  39. <li class="toctree-l2"><a class="reference internal" href="#module-ipfml.processing">ipfml.processing</a></li>
  40. </ul>
  41. </li>
  42. <li class="toctree-l1"><a class="reference internal" href="ipfml.filters.html">ipfml.filters</a></li>
  43. </ul>
  44. </div>
  45. </div>
  46. </nav>
  47. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  48. <nav class="wy-nav-top" aria-label="top navigation">
  49. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  50. <a href="index.html">IPFML</a>
  51. </nav>
  52. <div class="wy-nav-content">
  53. <div class="rst-content">
  54. <div role="navigation" aria-label="breadcrumbs navigation">
  55. <ul class="wy-breadcrumbs">
  56. <li><a href="index.html">Docs</a> &raquo;</li>
  57. <li>ipfml</li>
  58. <li class="wy-breadcrumbs-aside">
  59. <a href="_sources/ipfml.rst.txt" rel="nofollow"> View page source</a>
  60. </li>
  61. </ul>
  62. <hr/>
  63. </div>
  64. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  65. <div itemprop="articleBody">
  66. <div class="section" id="ipfml">
  67. <h1>ipfml<a class="headerlink" href="#ipfml" title="Permalink to this headline">¶</a></h1>
  68. <div class="section" id="module-ipfml.metrics">
  69. <span id="ipfml-metrics"></span><h2>ipfml.metrics<a class="headerlink" href="#module-ipfml.metrics" title="Permalink to this headline">¶</a></h2>
  70. <dl class="function">
  71. <dt id="ipfml.metrics.get_LAB">
  72. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_LAB</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_LAB" title="Permalink to this definition">¶</a></dt>
  73. <dd><p>Transforms RGB Image into Lab</p>
  74. <table class="docutils field-list" frame="void" rules="none">
  75. <col class="field-name" />
  76. <col class="field-body" />
  77. <tbody valign="top">
  78. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  79. </tr>
  80. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Lab information</td>
  81. </tr>
  82. </tbody>
  83. </table>
  84. <p>Usage:</p>
  85. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  86. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  87. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  88. <span class="gp">&gt;&gt;&gt; </span><span class="n">Lab</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_LAB</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  89. <span class="gp">&gt;&gt;&gt; </span><span class="n">Lab</span><span class="o">.</span><span class="n">shape</span>
  90. <span class="go">(200, 200, 3)</span>
  91. </pre></div>
  92. </div>
  93. </dd></dl>
  94. <dl class="function">
  95. <dt id="ipfml.metrics.get_LAB_L">
  96. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_LAB_L</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_LAB_L" title="Permalink to this definition">¶</a></dt>
  97. <dd><p>Transforms RGB Image into Lab and returns L</p>
  98. <table class="docutils field-list" frame="void" rules="none">
  99. <col class="field-name" />
  100. <col class="field-body" />
  101. <tbody valign="top">
  102. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  103. </tr>
  104. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The L chanel from Lab information</td>
  105. </tr>
  106. </tbody>
  107. </table>
  108. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  109. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  110. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  111. <span class="gp">&gt;&gt;&gt; </span><span class="n">L</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_LAB_L</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  112. <span class="gp">&gt;&gt;&gt; </span><span class="n">L</span><span class="o">.</span><span class="n">shape</span>
  113. <span class="go">(200, 200)</span>
  114. </pre></div>
  115. </div>
  116. </dd></dl>
  117. <dl class="function">
  118. <dt id="ipfml.metrics.get_LAB_a">
  119. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_LAB_a</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_LAB_a" title="Permalink to this definition">¶</a></dt>
  120. <dd><p>Transforms RGB Image into LAB and returns a</p>
  121. <table class="docutils field-list" frame="void" rules="none">
  122. <col class="field-name" />
  123. <col class="field-body" />
  124. <tbody valign="top">
  125. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  126. </tr>
  127. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The a chanel from Lab information</td>
  128. </tr>
  129. </tbody>
  130. </table>
  131. <p>Usage:</p>
  132. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  133. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  134. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  135. <span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_LAB_a</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  136. <span class="gp">&gt;&gt;&gt; </span><span class="n">a</span><span class="o">.</span><span class="n">shape</span>
  137. <span class="go">(200, 200)</span>
  138. </pre></div>
  139. </div>
  140. </dd></dl>
  141. <dl class="function">
  142. <dt id="ipfml.metrics.get_LAB_b">
  143. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_LAB_b</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_LAB_b" title="Permalink to this definition">¶</a></dt>
  144. <dd><p>Transforms RGB Image into LAB and returns b</p>
  145. <table class="docutils field-list" frame="void" rules="none">
  146. <col class="field-name" />
  147. <col class="field-body" />
  148. <tbody valign="top">
  149. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  150. </tr>
  151. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The b chanel from Lab information</td>
  152. </tr>
  153. </tbody>
  154. </table>
  155. <p>Usage :</p>
  156. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  157. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  158. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  159. <span class="gp">&gt;&gt;&gt; </span><span class="n">b</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_LAB_b</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  160. <span class="gp">&gt;&gt;&gt; </span><span class="n">b</span><span class="o">.</span><span class="n">shape</span>
  161. <span class="go">(200, 200)</span>
  162. </pre></div>
  163. </div>
  164. </dd></dl>
  165. <dl class="function">
  166. <dt id="ipfml.metrics.get_SVD">
  167. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_SVD</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_SVD" title="Permalink to this definition">¶</a></dt>
  168. <dd><p>Transforms Image using SVD compression</p>
  169. <table class="docutils field-list" frame="void" rules="none">
  170. <col class="field-name" />
  171. <col class="field-body" />
  172. <tbody valign="top">
  173. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert into SVD compression</td>
  174. </tr>
  175. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">U, s, V obtained from SVD compression</td>
  176. </tr>
  177. </tbody>
  178. </table>
  179. <p>Usage:</p>
  180. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  181. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  182. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  183. <span class="gp">&gt;&gt;&gt; </span><span class="n">U</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="n">V</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_SVD</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  184. <span class="gp">&gt;&gt;&gt; </span><span class="n">U</span><span class="o">.</span><span class="n">shape</span>
  185. <span class="go">(200, 200, 3)</span>
  186. <span class="gp">&gt;&gt;&gt; </span><span class="nb">len</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
  187. <span class="go">200</span>
  188. <span class="gp">&gt;&gt;&gt; </span><span class="n">V</span><span class="o">.</span><span class="n">shape</span>
  189. <span class="go">(200, 3, 3)</span>
  190. </pre></div>
  191. </div>
  192. </dd></dl>
  193. <dl class="function">
  194. <dt id="ipfml.metrics.get_SVD_U">
  195. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_SVD_U</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_SVD_U" title="Permalink to this definition">¶</a></dt>
  196. <dd><p>Transforms Image into SVD and returns only ‘U’ part</p>
  197. <table class="docutils field-list" frame="void" rules="none">
  198. <col class="field-name" />
  199. <col class="field-body" />
  200. <tbody valign="top">
  201. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  202. </tr>
  203. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">U matrix from SVD compression</td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. <p>Usage:</p>
  208. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  209. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  210. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  211. <span class="gp">&gt;&gt;&gt; </span><span class="n">U</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_SVD_U</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  212. <span class="gp">&gt;&gt;&gt; </span><span class="n">U</span><span class="o">.</span><span class="n">shape</span>
  213. <span class="go">(200, 200, 3)</span>
  214. </pre></div>
  215. </div>
  216. </dd></dl>
  217. <dl class="function">
  218. <dt id="ipfml.metrics.get_SVD_V">
  219. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_SVD_V</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_SVD_V" title="Permalink to this definition">¶</a></dt>
  220. <dd><p>Transforms Image into SVD and returns only ‘V’ part</p>
  221. <table class="docutils field-list" frame="void" rules="none">
  222. <col class="field-name" />
  223. <col class="field-body" />
  224. <tbody valign="top">
  225. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  226. </tr>
  227. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">V matrix obtained from SVD compression</td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. <p>Usage :</p>
  232. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  233. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  234. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  235. <span class="gp">&gt;&gt;&gt; </span><span class="n">V</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_SVD_V</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  236. <span class="gp">&gt;&gt;&gt; </span><span class="n">V</span><span class="o">.</span><span class="n">shape</span>
  237. <span class="go">(200, 3, 3)</span>
  238. </pre></div>
  239. </div>
  240. </dd></dl>
  241. <dl class="function">
  242. <dt id="ipfml.metrics.get_SVD_s">
  243. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_SVD_s</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_SVD_s" title="Permalink to this definition">¶</a></dt>
  244. <dd><p>Transforms Image into SVD and returns only ‘s’ part</p>
  245. <table class="docutils field-list" frame="void" rules="none">
  246. <col class="field-name" />
  247. <col class="field-body" />
  248. <tbody valign="top">
  249. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  250. </tr>
  251. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">vector of singular values obtained from SVD compression</td>
  252. </tr>
  253. </tbody>
  254. </table>
  255. <p>Usage:</p>
  256. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  257. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  258. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  259. <span class="gp">&gt;&gt;&gt; </span><span class="n">s</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_SVD_s</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  260. <span class="gp">&gt;&gt;&gt; </span><span class="nb">len</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
  261. <span class="go">200</span>
  262. </pre></div>
  263. </div>
  264. </dd></dl>
  265. <dl class="function">
  266. <dt id="ipfml.metrics.get_XYZ">
  267. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_XYZ</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_XYZ" title="Permalink to this definition">¶</a></dt>
  268. <dd><p>Transforms RGB Image into XYZ</p>
  269. <table class="docutils field-list" frame="void" rules="none">
  270. <col class="field-name" />
  271. <col class="field-body" />
  272. <tbody valign="top">
  273. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  274. </tr>
  275. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">XYZ information obtained from transformation</td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. <p>Usage:</p>
  280. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  281. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  282. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  283. <span class="gp">&gt;&gt;&gt; </span><span class="n">metrics</span><span class="o">.</span><span class="n">get_XYZ</span><span class="p">(</span><span class="n">img</span><span class="p">)</span><span class="o">.</span><span class="n">shape</span>
  284. <span class="go">(200, 200, 3)</span>
  285. </pre></div>
  286. </div>
  287. </dd></dl>
  288. <dl class="function">
  289. <dt id="ipfml.metrics.get_XYZ_X">
  290. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_XYZ_X</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_XYZ_X" title="Permalink to this definition">¶</a></dt>
  291. <dd><p>Transforms RGB Image into XYZ and returns X</p>
  292. <table class="docutils field-list" frame="void" rules="none">
  293. <col class="field-name" />
  294. <col class="field-body" />
  295. <tbody valign="top">
  296. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  297. </tr>
  298. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The X chanel from XYZ information</td>
  299. </tr>
  300. </tbody>
  301. </table>
  302. <p>Usage:</p>
  303. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  304. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  305. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  306. <span class="gp">&gt;&gt;&gt; </span><span class="n">x</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_XYZ_X</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  307. <span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="o">.</span><span class="n">shape</span>
  308. <span class="go">(200, 200)</span>
  309. </pre></div>
  310. </div>
  311. </dd></dl>
  312. <dl class="function">
  313. <dt id="ipfml.metrics.get_XYZ_Y">
  314. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_XYZ_Y</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_XYZ_Y" title="Permalink to this definition">¶</a></dt>
  315. <dd><p>Transforms RGB Image into XYZ and returns Y</p>
  316. <table class="docutils field-list" frame="void" rules="none">
  317. <col class="field-name" />
  318. <col class="field-body" />
  319. <tbody valign="top">
  320. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  321. </tr>
  322. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The Y chanel from XYZ information</td>
  323. </tr>
  324. </tbody>
  325. </table>
  326. <p>Usage:</p>
  327. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  328. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  329. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  330. <span class="gp">&gt;&gt;&gt; </span><span class="n">y</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_XYZ_Y</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  331. <span class="gp">&gt;&gt;&gt; </span><span class="n">y</span><span class="o">.</span><span class="n">shape</span>
  332. <span class="go">(200, 200)</span>
  333. </pre></div>
  334. </div>
  335. </dd></dl>
  336. <dl class="function">
  337. <dt id="ipfml.metrics.get_XYZ_Z">
  338. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_XYZ_Z</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_XYZ_Z" title="Permalink to this definition">¶</a></dt>
  339. <dd><p>Transforms RGB Image into XYZ and returns Z</p>
  340. <table class="docutils field-list" frame="void" rules="none">
  341. <col class="field-name" />
  342. <col class="field-body" />
  343. <tbody valign="top">
  344. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – image to convert</td>
  345. </tr>
  346. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The Z chanel from XYZ information</td>
  347. </tr>
  348. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code> – If <cite>nb_bits</cite> has unexpected value. <cite>nb_bits</cite> needs to be in interval [1, 8].</td>
  349. </tr>
  350. </tbody>
  351. </table>
  352. <p>Usage:</p>
  353. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  354. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  355. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  356. <span class="gp">&gt;&gt;&gt; </span><span class="n">z</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_XYZ_Z</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  357. <span class="gp">&gt;&gt;&gt; </span><span class="n">z</span><span class="o">.</span><span class="n">shape</span>
  358. <span class="go">(200, 200)</span>
  359. </pre></div>
  360. </div>
  361. </dd></dl>
  362. <dl class="function">
  363. <dt id="ipfml.metrics.get_bits_img">
  364. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_bits_img</code><span class="sig-paren">(</span><em>image</em>, <em>interval</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_bits_img" title="Permalink to this definition">¶</a></dt>
  365. <dd><p>Returns only bits specified into the interval</p>
  366. <table class="docutils field-list" frame="void" rules="none">
  367. <col class="field-name" />
  368. <col class="field-body" />
  369. <tbody valign="top">
  370. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  371. <li><strong>image</strong> – image to convert using this interval of bits value to keep</li>
  372. <li><strong>interval</strong> – (begin, end) of bits values</li>
  373. </ul>
  374. </td>
  375. </tr>
  376. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Numpy array with reduced values</p>
  377. </td>
  378. </tr>
  379. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
  380. <li><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code> – If min value from interval is not &gt;= 1.</li>
  381. <li><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code> – If max value from interval is not &lt;= 8.</li>
  382. <li><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code> – If min value from interval &gt;= max value.</li>
  383. </ul>
  384. </td>
  385. </tr>
  386. </tbody>
  387. </table>
  388. <p>Usage:</p>
  389. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  390. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  391. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  392. <span class="gp">&gt;&gt;&gt; </span><span class="n">bits_img</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_bits_img</span><span class="p">(</span><span class="n">img</span><span class="p">,</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>
  393. <span class="gp">&gt;&gt;&gt; </span><span class="n">bits_img</span><span class="o">.</span><span class="n">shape</span>
  394. <span class="go">(200, 200, 3)</span>
  395. </pre></div>
  396. </div>
  397. </dd></dl>
  398. <dl class="function">
  399. <dt id="ipfml.metrics.get_low_bits_img">
  400. <code class="descclassname">ipfml.metrics.</code><code class="descname">get_low_bits_img</code><span class="sig-paren">(</span><em>image</em>, <em>nb_bits=4</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.get_low_bits_img" title="Permalink to this definition">¶</a></dt>
  401. <dd><p>Returns Image or Numpy array with data information reduced using only low bits</p>
  402. <table class="docutils field-list" frame="void" rules="none">
  403. <col class="field-name" />
  404. <col class="field-body" />
  405. <tbody valign="top">
  406. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  407. <li><strong>image</strong> – image to convert</li>
  408. <li><strong>nb_bits</strong> – optional parameter which indicates the number of bits to keep</li>
  409. </ul>
  410. </td>
  411. </tr>
  412. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Numpy array with reduced values</p>
  413. </td>
  414. </tr>
  415. </tbody>
  416. </table>
  417. <p>Usage:</p>
  418. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  419. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  420. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  421. <span class="gp">&gt;&gt;&gt; </span><span class="n">low_bits_img</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_low_bits_img</span><span class="p">(</span><span class="n">img</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
  422. <span class="gp">&gt;&gt;&gt; </span><span class="n">low_bits_img</span><span class="o">.</span><span class="n">shape</span>
  423. <span class="go">(200, 200, 3)</span>
  424. </pre></div>
  425. </div>
  426. </dd></dl>
  427. <dl class="function">
  428. <dt id="ipfml.metrics.gray_to_mscn">
  429. <code class="descclassname">ipfml.metrics.</code><code class="descname">gray_to_mscn</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.metrics.gray_to_mscn" title="Permalink to this definition">¶</a></dt>
  430. <dd><p>Convert Grayscale Image into Mean Subtracted Contrast Normalized (MSCN)</p>
  431. <table class="docutils field-list" frame="void" rules="none">
  432. <col class="field-name" />
  433. <col class="field-body" />
  434. <tbody valign="top">
  435. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – grayscale image</td>
  436. </tr>
  437. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">MSCN matrix obtained from transformation</td>
  438. </tr>
  439. </tbody>
  440. </table>
  441. <p>Usage:</p>
  442. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  443. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  444. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  445. <span class="gp">&gt;&gt;&gt; </span><span class="n">img_mscn</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">rgb_to_mscn</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  446. <span class="gp">&gt;&gt;&gt; </span><span class="n">img_mscn</span><span class="o">.</span><span class="n">shape</span>
  447. <span class="go">(200, 200)</span>
  448. </pre></div>
  449. </div>
  450. </dd></dl>
  451. </div>
  452. <div class="section" id="module-ipfml.processing">
  453. <span id="ipfml-processing"></span><h2>ipfml.processing<a class="headerlink" href="#module-ipfml.processing" title="Permalink to this headline">¶</a></h2>
  454. <dl class="function">
  455. <dt id="ipfml.processing.divide_in_blocks">
  456. <code class="descclassname">ipfml.processing.</code><code class="descname">divide_in_blocks</code><span class="sig-paren">(</span><em>image</em>, <em>block_size</em>, <em>pil=True</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.divide_in_blocks" title="Permalink to this definition">¶</a></dt>
  457. <dd><p>Divide image into equal size blocks</p>
  458. <table class="docutils field-list" frame="void" rules="none">
  459. <col class="field-name" />
  460. <col class="field-body" />
  461. <tbody valign="top">
  462. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  463. <li><strong>image</strong> – PIL Image or Numpy array</li>
  464. <li><strong>block</strong> – tuple (width, height) representing the size of each dimension of the block</li>
  465. <li><strong>pil</strong> – block type returned (default True)</li>
  466. </ul>
  467. </td>
  468. </tr>
  469. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">list containing all 2D Numpy blocks (in RGB or not)</p>
  470. </td>
  471. </tr>
  472. <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code> – If <cite>image_width</cite> or <cite>image_heigt</cite> are not compatible to produce correct block sizes</p>
  473. </td>
  474. </tr>
  475. </tbody>
  476. </table>
  477. <p>Example:</p>
  478. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
  479. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  480. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  481. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">metrics</span>
  482. <span class="gp">&gt;&gt;&gt; </span><span class="n">image_values</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">255</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="p">(</span><span class="mi">800</span><span class="p">,</span> <span class="mi">800</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
  483. <span class="gp">&gt;&gt;&gt; </span><span class="n">blocks</span> <span class="o">=</span> <span class="n">divide_in_blocks</span><span class="p">(</span><span class="n">image_values</span><span class="p">,</span> <span class="p">(</span><span class="mi">20</span><span class="p">,</span> <span class="mi">20</span><span class="p">))</span>
  484. <span class="gp">&gt;&gt;&gt; </span><span class="nb">len</span><span class="p">(</span><span class="n">blocks</span><span class="p">)</span>
  485. <span class="go">1600</span>
  486. <span class="gp">&gt;&gt;&gt; </span><span class="n">blocks</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">width</span>
  487. <span class="go">20</span>
  488. <span class="gp">&gt;&gt;&gt; </span><span class="n">blocks</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">height</span>
  489. <span class="go">20</span>
  490. <span class="gp">&gt;&gt;&gt; </span><span class="n">img_l</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  491. <span class="gp">&gt;&gt;&gt; </span><span class="n">L</span> <span class="o">=</span> <span class="n">metrics</span><span class="o">.</span><span class="n">get_LAB_L</span><span class="p">(</span><span class="n">img_l</span><span class="p">)</span>
  492. <span class="gp">&gt;&gt;&gt; </span><span class="n">blocks_L</span> <span class="o">=</span> <span class="n">divide_in_blocks</span><span class="p">(</span><span class="n">L</span><span class="p">,</span> <span class="p">(</span><span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">))</span>
  493. <span class="gp">&gt;&gt;&gt; </span><span class="nb">len</span><span class="p">(</span><span class="n">blocks_L</span><span class="p">)</span>
  494. <span class="go">4</span>
  495. <span class="gp">&gt;&gt;&gt; </span><span class="n">blocks_L</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">width</span>
  496. <span class="go">100</span>
  497. </pre></div>
  498. </div>
  499. </dd></dl>
  500. <dl class="function">
  501. <dt id="ipfml.processing.get_LAB_L_SVD">
  502. <code class="descclassname">ipfml.processing.</code><code class="descname">get_LAB_L_SVD</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.get_LAB_L_SVD" title="Permalink to this definition">¶</a></dt>
  503. <dd><p>Returns Singular values from LAB L Image information</p>
  504. <table class="docutils field-list" frame="void" rules="none">
  505. <col class="field-name" />
  506. <col class="field-body" />
  507. <tbody valign="top">
  508. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – PIL Image or Numpy array</td>
  509. </tr>
  510. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">U, s, V information obtained from SVD compression using Lab</td>
  511. </tr>
  512. </tbody>
  513. </table>
  514. <p>Example:</p>
  515. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  516. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  517. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  518. <span class="gp">&gt;&gt;&gt; </span><span class="n">U</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="n">V</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">get_LAB_L_SVD</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  519. <span class="gp">&gt;&gt;&gt; </span><span class="n">U</span><span class="o">.</span><span class="n">shape</span>
  520. <span class="go">(200, 200)</span>
  521. <span class="gp">&gt;&gt;&gt; </span><span class="nb">len</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
  522. <span class="go">200</span>
  523. <span class="gp">&gt;&gt;&gt; </span><span class="n">V</span><span class="o">.</span><span class="n">shape</span>
  524. <span class="go">(200, 200)</span>
  525. </pre></div>
  526. </div>
  527. </dd></dl>
  528. <dl class="function">
  529. <dt id="ipfml.processing.get_LAB_L_SVD_U">
  530. <code class="descclassname">ipfml.processing.</code><code class="descname">get_LAB_L_SVD_U</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.get_LAB_L_SVD_U" title="Permalink to this definition">¶</a></dt>
  531. <dd><p>Returns U SVD from L of LAB Image information</p>
  532. <table class="docutils field-list" frame="void" rules="none">
  533. <col class="field-name" />
  534. <col class="field-body" />
  535. <tbody valign="top">
  536. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – PIL Image or Numpy array</td>
  537. </tr>
  538. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">U matrix of SVD compression</td>
  539. </tr>
  540. </tbody>
  541. </table>
  542. <p>Example:</p>
  543. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  544. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  545. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  546. <span class="gp">&gt;&gt;&gt; </span><span class="n">U</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">get_LAB_L_SVD_U</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  547. <span class="gp">&gt;&gt;&gt; </span><span class="n">U</span><span class="o">.</span><span class="n">shape</span>
  548. <span class="go">(200, 200)</span>
  549. </pre></div>
  550. </div>
  551. </dd></dl>
  552. <dl class="function">
  553. <dt id="ipfml.processing.get_LAB_L_SVD_V">
  554. <code class="descclassname">ipfml.processing.</code><code class="descname">get_LAB_L_SVD_V</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.get_LAB_L_SVD_V" title="Permalink to this definition">¶</a></dt>
  555. <dd><p>Returns V SVD from L of LAB Image information</p>
  556. <table class="docutils field-list" frame="void" rules="none">
  557. <col class="field-name" />
  558. <col class="field-body" />
  559. <tbody valign="top">
  560. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – PIL Image or Numpy array</td>
  561. </tr>
  562. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">V matrix of SVD compression</td>
  563. </tr>
  564. </tbody>
  565. </table>
  566. <p>Example:</p>
  567. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  568. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  569. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  570. <span class="gp">&gt;&gt;&gt; </span><span class="n">V</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">get_LAB_L_SVD_V</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  571. <span class="gp">&gt;&gt;&gt; </span><span class="n">V</span><span class="o">.</span><span class="n">shape</span>
  572. <span class="go">(200, 200)</span>
  573. </pre></div>
  574. </div>
  575. </dd></dl>
  576. <dl class="function">
  577. <dt id="ipfml.processing.get_LAB_L_SVD_s">
  578. <code class="descclassname">ipfml.processing.</code><code class="descname">get_LAB_L_SVD_s</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.get_LAB_L_SVD_s" title="Permalink to this definition">¶</a></dt>
  579. <dd><p>Returns s (Singular values) SVD from L of LAB Image information</p>
  580. <table class="docutils field-list" frame="void" rules="none">
  581. <col class="field-name" />
  582. <col class="field-body" />
  583. <tbody valign="top">
  584. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – PIL Image or Numpy array</td>
  585. </tr>
  586. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">vector of singular values</td>
  587. </tr>
  588. </tbody>
  589. </table>
  590. <p>Example:</p>
  591. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  592. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  593. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  594. <span class="gp">&gt;&gt;&gt; </span><span class="n">s</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">get_LAB_L_SVD_s</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  595. <span class="gp">&gt;&gt;&gt; </span><span class="nb">len</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
  596. <span class="go">200</span>
  597. </pre></div>
  598. </div>
  599. </dd></dl>
  600. <dl class="function">
  601. <dt id="ipfml.processing.normalize_2D_arr">
  602. <code class="descclassname">ipfml.processing.</code><code class="descname">normalize_2D_arr</code><span class="sig-paren">(</span><em>arr</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.normalize_2D_arr" title="Permalink to this definition">¶</a></dt>
  603. <dd><p>Return array normalize from its min and max values</p>
  604. <table class="docutils field-list" frame="void" rules="none">
  605. <col class="field-name" />
  606. <col class="field-body" />
  607. <tbody valign="top">
  608. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>arr</strong> – 2D Numpy array</td>
  609. </tr>
  610. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Normalized 2D Numpy array</td>
  611. </tr>
  612. </tbody>
  613. </table>
  614. <p>Example:</p>
  615. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  616. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  617. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  618. <span class="gp">&gt;&gt;&gt; </span><span class="n">img_mscn</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">rgb_to_mscn</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  619. <span class="gp">&gt;&gt;&gt; </span><span class="n">img_normalized</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">normalize_2D_arr</span><span class="p">(</span><span class="n">img_mscn</span><span class="p">)</span>
  620. <span class="gp">&gt;&gt;&gt; </span><span class="n">img_normalized</span><span class="o">.</span><span class="n">shape</span>
  621. <span class="go">(200, 200)</span>
  622. </pre></div>
  623. </div>
  624. </dd></dl>
  625. <dl class="function">
  626. <dt id="ipfml.processing.normalize_arr">
  627. <code class="descclassname">ipfml.processing.</code><code class="descname">normalize_arr</code><span class="sig-paren">(</span><em>arr</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.normalize_arr" title="Permalink to this definition">¶</a></dt>
  628. <dd><p>Normalize data of 1D array shape</p>
  629. <table class="docutils field-list" frame="void" rules="none">
  630. <col class="field-name" />
  631. <col class="field-body" />
  632. <tbody valign="top">
  633. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>arr</strong> – array data of 1D shape</td>
  634. </tr>
  635. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Normalized 1D array</td>
  636. </tr>
  637. </tbody>
  638. </table>
  639. <p>Example:</p>
  640. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  641. <span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
  642. <span class="gp">&gt;&gt;&gt; </span><span class="n">arr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">11</span><span class="p">)</span>
  643. <span class="gp">&gt;&gt;&gt; </span><span class="n">arr_normalized</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">normalize_arr</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
  644. <span class="gp">&gt;&gt;&gt; </span><span class="n">arr_normalized</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
  645. <span class="go">0.1</span>
  646. </pre></div>
  647. </div>
  648. </dd></dl>
  649. <dl class="function">
  650. <dt id="ipfml.processing.normalize_arr_with_range">
  651. <code class="descclassname">ipfml.processing.</code><code class="descname">normalize_arr_with_range</code><span class="sig-paren">(</span><em>arr</em>, <em>min</em>, <em>max</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.normalize_arr_with_range" title="Permalink to this definition">¶</a></dt>
  652. <dd><p>Normalize data of 1D array shape</p>
  653. <table class="docutils field-list" frame="void" rules="none">
  654. <col class="field-name" />
  655. <col class="field-body" />
  656. <tbody valign="top">
  657. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>arr</strong> – array data of 1D shape</td>
  658. </tr>
  659. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Normalized 1D Numpy array</td>
  660. </tr>
  661. </tbody>
  662. </table>
  663. <p>Example:</p>
  664. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  665. <span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
  666. <span class="gp">&gt;&gt;&gt; </span><span class="n">arr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">11</span><span class="p">)</span>
  667. <span class="gp">&gt;&gt;&gt; </span><span class="n">arr_normalized</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">normalize_arr_with_range</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">20</span><span class="p">)</span>
  668. <span class="gp">&gt;&gt;&gt; </span><span class="n">arr_normalized</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
  669. <span class="go">0.05</span>
  670. </pre></div>
  671. </div>
  672. </dd></dl>
  673. <dl class="function">
  674. <dt id="ipfml.processing.rgb_to_LAB_L_bits">
  675. <code class="descclassname">ipfml.processing.</code><code class="descname">rgb_to_LAB_L_bits</code><span class="sig-paren">(</span><em>image</em>, <em>interval</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.rgb_to_LAB_L_bits" title="Permalink to this definition">¶</a></dt>
  676. <dd><p>Returns only bits from LAB L canal specified into the interval</p>
  677. <table class="docutils field-list" frame="void" rules="none">
  678. <col class="field-name" />
  679. <col class="field-body" />
  680. <tbody valign="top">
  681. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  682. <li><strong>image</strong> – image to convert using this interval of bits value to keep</li>
  683. <li><strong>interval</strong> – (begin, end) of bits values</li>
  684. </ul>
  685. </td>
  686. </tr>
  687. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">2D Numpy array with reduced values</p>
  688. </td>
  689. </tr>
  690. </tbody>
  691. </table>
  692. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  693. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  694. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  695. <span class="gp">&gt;&gt;&gt; </span><span class="n">bits_Lab_l_img</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">rgb_to_LAB_L_bits</span><span class="p">(</span><span class="n">img</span><span class="p">,</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">6</span><span class="p">))</span>
  696. <span class="gp">&gt;&gt;&gt; </span><span class="n">bits_Lab_l_img</span><span class="o">.</span><span class="n">shape</span>
  697. <span class="go">(200, 200)</span>
  698. </pre></div>
  699. </div>
  700. </dd></dl>
  701. <dl class="function">
  702. <dt id="ipfml.processing.rgb_to_LAB_L_low_bits">
  703. <code class="descclassname">ipfml.processing.</code><code class="descname">rgb_to_LAB_L_low_bits</code><span class="sig-paren">(</span><em>image</em>, <em>nb_bits=4</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.rgb_to_LAB_L_low_bits" title="Permalink to this definition">¶</a></dt>
  704. <dd><p>Convert RGB Image into Lab L channel image using only 4 low bits values</p>
  705. <table class="docutils field-list" frame="void" rules="none">
  706. <col class="field-name" />
  707. <col class="field-body" />
  708. <tbody valign="top">
  709. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  710. <li><strong>image</strong> – 3D RGB image Numpy array or PIL RGB image</li>
  711. <li><strong>nb_bits</strong> – optional parameter which indicates the number of bits to keep (default 4)</li>
  712. </ul>
  713. </td>
  714. </tr>
  715. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">2D Numpy array with low bits information kept</p>
  716. </td>
  717. </tr>
  718. </tbody>
  719. </table>
  720. <p>Example:</p>
  721. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  722. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  723. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  724. <span class="gp">&gt;&gt;&gt; </span><span class="n">low_bits_Lab_l_img</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">rgb_to_LAB_L_low_bits</span><span class="p">(</span><span class="n">img</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
  725. <span class="gp">&gt;&gt;&gt; </span><span class="n">low_bits_Lab_l_img</span><span class="o">.</span><span class="n">shape</span>
  726. <span class="go">(200, 200)</span>
  727. </pre></div>
  728. </div>
  729. </dd></dl>
  730. <dl class="function">
  731. <dt id="ipfml.processing.rgb_to_grey_low_bits">
  732. <code class="descclassname">ipfml.processing.</code><code class="descname">rgb_to_grey_low_bits</code><span class="sig-paren">(</span><em>image</em>, <em>nb_bits=4</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.rgb_to_grey_low_bits" title="Permalink to this definition">¶</a></dt>
  733. <dd><p>Convert RGB Image into grey image using only 4 low bits values</p>
  734. <table class="docutils field-list" frame="void" rules="none">
  735. <col class="field-name" />
  736. <col class="field-body" />
  737. <tbody valign="top">
  738. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  739. <li><strong>image</strong> – 3D RGB image Numpy array or PIL RGB image</li>
  740. <li><strong>nb_bits</strong> – optional parameter which indicates the number of bits to keep (default 4)</li>
  741. </ul>
  742. </td>
  743. </tr>
  744. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">2D Numpy array with low bits information kept</p>
  745. </td>
  746. </tr>
  747. </tbody>
  748. </table>
  749. <p>Example:</p>
  750. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  751. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  752. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  753. <span class="gp">&gt;&gt;&gt; </span><span class="n">low_bits_grey_img</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">rgb_to_grey_low_bits</span><span class="p">(</span><span class="n">img</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
  754. <span class="gp">&gt;&gt;&gt; </span><span class="n">low_bits_grey_img</span><span class="o">.</span><span class="n">shape</span>
  755. <span class="go">(200, 200)</span>
  756. </pre></div>
  757. </div>
  758. </dd></dl>
  759. <dl class="function">
  760. <dt id="ipfml.processing.rgb_to_mscn">
  761. <code class="descclassname">ipfml.processing.</code><code class="descname">rgb_to_mscn</code><span class="sig-paren">(</span><em>image</em><span class="sig-paren">)</span><a class="headerlink" href="#ipfml.processing.rgb_to_mscn" title="Permalink to this definition">¶</a></dt>
  762. <dd><p>Convert RGB Image into Mean Subtracted Contrast Normalized (MSCN)</p>
  763. <table class="docutils field-list" frame="void" rules="none">
  764. <col class="field-name" />
  765. <col class="field-body" />
  766. <tbody valign="top">
  767. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>image</strong> – 3D RGB image Numpy array or PIL RGB image</td>
  768. </tr>
  769. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">2D Numpy array with MSCN information</td>
  770. </tr>
  771. </tbody>
  772. </table>
  773. <p>Example:</p>
  774. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">PIL</span> <span class="k">import</span> <span class="n">Image</span>
  775. <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">processing</span>
  776. <span class="gp">&gt;&gt;&gt; </span><span class="n">img</span> <span class="o">=</span> <span class="n">Image</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;./images/test_img.png&#39;</span><span class="p">)</span>
  777. <span class="gp">&gt;&gt;&gt; </span><span class="n">img_mscn</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">rgb_to_mscn</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
  778. <span class="gp">&gt;&gt;&gt; </span><span class="n">img_mscn</span><span class="o">.</span><span class="n">shape</span>
  779. <span class="go">(200, 200)</span>
  780. </pre></div>
  781. </div>
  782. </dd></dl>
  783. </div>
  784. </div>
  785. </div>
  786. </div>
  787. <footer>
  788. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  789. <a href="ipfml.filters.html" class="btn btn-neutral float-right" title="ipfml.filters" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
  790. <a href="description.html" class="btn btn-neutral" title="Description" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  791. </div>
  792. <hr/>
  793. <div role="contentinfo">
  794. <p>
  795. &copy; Copyright 2019, Jérôme BUISINE
  796. </p>
  797. </div>
  798. Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  799. </footer>
  800. </div>
  801. </div>
  802. </section>
  803. </div>
  804. <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  805. <script type="text/javascript" src="_static/jquery.js"></script>
  806. <script type="text/javascript" src="_static/underscore.js"></script>
  807. <script type="text/javascript" src="_static/doctools.js"></script>
  808. <script type="text/javascript" src="_static/language_data.js"></script>
  809. <script type="text/javascript" src="_static/js/theme.js"></script>
  810. <script type="text/javascript">
  811. jQuery(function () {
  812. SphinxRtdTheme.Navigation.enable(true);
  813. });
  814. </script>
  815. </body>
  816. </html>