README.html 5.84 KB
Newer Older
1 2 3 4 5 6 7 8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="pandoc" />
  <title></title>
  <style type="text/css">code{white-space: pre;}</style>
Michael Murtaugh's avatar
Michael Murtaugh committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
  <style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
  margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
  </style>
46 47
</head>
<body>
Michael Murtaugh's avatar
Michael Murtaugh committed
48 49 50 51 52 53
<pre><code>   __              ____              
  / /_____  ____  / / /_  ____  _  __
 / __/ __ \/ __ \/ / __ \/ __ \| |/_/
/ /_/ /_/ / /_/ / / /_/ / /_/ /&gt;  &lt;  
\__/\____/\____/_/_.___/\____/_/|_|  </code></pre>
<p>your personal image processing toolset!</p>
54 55
<h2 id="installing-building">Installing / Building</h2>
<p>This toolset is heterogeneous; some are written in C with bindings to libraries like opencv and tesseract, others are in the python scripting language and rely on python packages like numpy, python-opencv, pillow, and scipy.</p>
Michael Murtaugh's avatar
Michael Murtaugh committed
56
<h3 id="python">Python</h3>
57 58 59 60 61 62 63 64 65 66 67 68
<p>For the python tools, it may be useful to create a &quot;virtualenv&quot;. Otherwise you might eventually have trouble with version conflicts with other tools. Option A describes this approach. Alternatively, you can install the packages in your system (option B).</p>
<h4 id="a.-installing-python-dependencies-in-a-venv">A. Installing Python dependencies in a venv</h4>
<ol style="list-style-type: decimal">
<li><p>Create one:</p>
<p>virtualenv venv</p></li>
<li><p>Activate it:</p>
<p>source venv/bin/activate</p></li>
<li><p>Use pip to install (nb you don't need sudo since you &quot;own&quot; the venv).</p>
<p>pip install scipy pillow numpy</p></li>
</ol>
<h4 id="b.-installing-python-dependencies-to-the-system">B. Installing Python dependencies to the system</h4>
<pre><code>sudo pip install scipy pillow numpy</code></pre>
Michael Murtaugh's avatar
Michael Murtaugh committed
69 70 71 72 73 74 75 76 77 78
<h3 id="c">C</h3>
<p>Some of the C-based tools like <em>contours</em> and <em>channel</em> have a simple makefile and build simply with:</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="bu">cd</span> contours
<span class="fu">make</span></code></pre></div>
<p>Other tools like <em>texture</em> and <em>houghlines</em> use cmake. Basically, if there is a file called &quot;CMakeLists.txt&quot; the build process uses cmake. An example of building texture would be:</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="bu">cd</span> texture
<span class="fu">mkdir</span> build
<span class="bu">cd</span> build
<span class="fu">cmake</span> ..
<span class="fu">make</span></code></pre></div>
79 80 81 82
<h2 id="usage">Usage</h2>
<h3 id="image-gradient">Image Gradient</h3>
<pre><code>python python/imagegradient.py foo.png --output foo.gradient.png --svg foo.gradient.svg</code></pre>
<p>Converts foo.png (input) into two outputs.</p>
Michael Murtaugh's avatar
Michael Murtaugh committed
83 84 85 86 87 88 89
<h2 id="notes">Notes</h2>
<ul>
<li>Viewer: Improve layers to show layers loading / loaded status (useful when browsing via cookbook)</li>
<li>Viewer: Add SVG layer support (technically possible ?! via img tag)... yes! using iframe ipv img</li>
<li>Viewer: Layer modes (such as masking ?!) ... and eventually export to other formats (SVG with image layers!)</li>
<li>Viewer: ?! Represent entire stacking as an SVG (to begin with!!!)</li>
</ul>
Michael Murtaugh's avatar
Michael Murtaugh committed
90 91 92 93
<h3 id="nov-24-2016">Nov 24 2016</h3>
<p>Incorporate orderings functions: * Way to talk of &quot;items&quot; and collect metadata in a single JSON. * Scripts to generate (leaflet) maps based on metadata. * Cross linkages with other visualisations (such as the map)</p>
<p>What's more complex though is that now each layer is based on a resolution which may (or may not) change the resulting order. So the orderings are now PER ZOOM LEVEL (which is interesting).</p>
<p>ALSO need to make a scraper for RMAH -- do it <em>promiscuously</em>?!</p>
94 95
</body>
</html>