Skip to content

Commit f4346e4

Browse files
committed
some fixes + segmentations docs/revision
1 parent 1c30c6f commit f4346e4

File tree

47 files changed

+136
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+136
-109
lines changed

docs/codox/clojure2d.color.html

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

docs/codox/clojure2d.core.html

Lines changed: 53 additions & 53 deletions
Large diffs are not rendered by default.

docs/codox/clojure2d.extra.overlays.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@
3333
800
3434
{:alpha 128,
3535
:intensities [10 50 100 150 200 250]})
36-
...)</code></pre><img src="../images/overlays/4752e32f7ef6d9ef5c632f64b20a98c9.jpg" /></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/overlays.clj#L235">view source</a></div></div><div class="public anchor" id="var-spots-overlay"><h3>spots-overlay</h3><div class="usage"><code>(spots-overlay w h {:keys [alpha intensities], :or {alpha 80, intensities [60 120]}})</code><code>(spots-overlay w h)</code></div><div class="doc"><div class="markdown"><p>Create vector of spotted overlays. Input: spots transparency (default 80), list of intensities (int values from 0 to 255, default [60 120]) and size of overlay.</p></div></div><div class="markdown"><h4>Examples</h4><div><blockquote><p>Generate spots overlay (it’s a list of images)</p></blockquote><pre><code class="hljs clojure">(count (spots-overlay 300 300 {:alpha 80, :intensities [10 100 200]}))
37-
;;=&gt; 3</code></pre></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/overlays.clj#L221">view source</a></div></div></div></body></html>
36+
...)</code></pre><img src="../images/overlays/4752e32f7ef6d9ef5c632f64b20a98c9.jpg" /></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/overlays.clj#L236">view source</a></div></div><div class="public anchor" id="var-spots-overlay"><h3>spots-overlay</h3><div class="usage"><code>(spots-overlay w h {:keys [alpha intensities], :or {alpha 80, intensities [60 120]}})</code><code>(spots-overlay w h)</code></div><div class="doc"><div class="markdown"><p>Create vector of spotted overlays. Input: spots transparency (default 80), list of intensities (int values from 0 to 255, default [60 120]) and size of overlay.</p></div></div><div class="markdown"><h4>Examples</h4><div><blockquote><p>Generate spots overlay (it’s a list of images)</p></blockquote><pre><code class="hljs clojure">(count (spots-overlay 300 300 {:alpha 80, :intensities [10 100 200]}))
37+
;;=&gt; 3</code></pre></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/overlays.clj#L222">view source</a></div></div></div></body></html>
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
<!DOCTYPE html PUBLIC ""
22
"">
3-
<html><head><meta charset="UTF-8" /><title>clojure2d.extra.segmentation documentation</title><script type="text/javascript" async="" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="highlight/solarized-light.css" /><script type="text/javascript" src="highlight/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a> with <a href="https://github.com/xsc/codox-theme-rdash">RDash UI</a> theme</h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Clojure2d</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clojure2d</span></div></div></li><li class="depth-2 branch"><a href="clojure2d.color.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>color</span></div></a></li><li class="depth-2 branch"><a href="clojure2d.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>extra</span></div></div></li><li class="depth-3 branch"><a href="clojure2d.extra.glitch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>glitch</span></div></a></li><li class="depth-3 branch"><a href="clojure2d.extra.overlays.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>overlays</span></div></a></li><li class="depth-3 branch"><a href="clojure2d.extra.raymarching.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>raymarching</span></div></a></li><li class="depth-3 branch current"><a href="clojure2d.extra.segmentation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>segmentation</span></div></a></li><li class="depth-3 branch"><a href="clojure2d.extra.signal.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>signal</span></div></a></li><li class="depth-3"><a href="clojure2d.extra.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="clojure2d.pixels.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>pixels</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clojure2d.extra.segmentation.html#var-segment-pixels"><div class="inner"><span>segment-pixels</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clojure2d.extra.segmentation</h1><div class="doc"><div class="markdown"></div><div class="markdown"><h4>Categories</h4><ul></ul><p>Other vars: <a href="clojure2d.extra.segmentation.html#var-segment-pixels">segment-pixels</a></p></div></div><div class="public anchor" id="var-segment-pixels"><h3>segment-pixels</h3><div class="usage"><code>(segment-pixels p ch {:keys [min-size max-size threshold], :or {min-size 4, max-size 256, threshold 15.0}})</code></div><div class="doc"><div class="markdown"><p>Decompose channel into segments where mins is minimum size of segment, maxs is maximum size, thr is accuracy (minimum std dev of pixel values to make decision about subdivision.</p></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/segmentation.clj#L36">view source</a></div></div></div></body></html>
3+
<html><head><meta charset="UTF-8" /><title>clojure2d.extra.segmentation documentation</title><script type="text/javascript" async="" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="highlight/solarized-light.css" /><script type="text/javascript" src="highlight/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a> with <a href="https://github.com/xsc/codox-theme-rdash">RDash UI</a> theme</h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Clojure2d</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clojure2d</span></div></div></li><li class="depth-2 branch"><a href="clojure2d.color.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>color</span></div></a></li><li class="depth-2 branch"><a href="clojure2d.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>extra</span></div></div></li><li class="depth-3 branch"><a href="clojure2d.extra.glitch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>glitch</span></div></a></li><li class="depth-3 branch"><a href="clojure2d.extra.overlays.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>overlays</span></div></a></li><li class="depth-3 branch"><a href="clojure2d.extra.raymarching.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>raymarching</span></div></a></li><li class="depth-3 branch current"><a href="clojure2d.extra.segmentation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>segmentation</span></div></a></li><li class="depth-3 branch"><a href="clojure2d.extra.signal.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>signal</span></div></a></li><li class="depth-3"><a href="clojure2d.extra.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="clojure2d.pixels.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>pixels</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clojure2d.extra.segmentation.html#var-segment-pixels"><div class="inner"><span>segment-pixels</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clojure2d.extra.segmentation</h1><div class="doc"><div class="markdown"><p>Segment image into parts.</p>
4+
<p>Currently contains only quadtree segmentation.</p></div><div class="markdown"><h4>Categories</h4><ul></ul><p>Other vars: <a href="clojure2d.extra.segmentation.html#var-segment-pixels">segment-pixels</a></p></div></div><div class="public anchor" id="var-segment-pixels"><h3>segment-pixels</h3><div class="usage"><code>(segment-pixels p ch)</code><code>(segment-pixels p ch {:keys [min-size max-size threshold], :or {min-size 4, max-size 256, threshold 15.0}})</code></div><div class="doc"><div class="markdown"><p>Decompose channel <code>ch</code> from <code>Pixels</code> into square segments using quadtree decomposition.</p>
5+
<ul>
6+
<li><code>min-size</code> is minimum size of segment</li>
7+
<li><code>max-size</code> is maximum size</li>
8+
<li><code>threshold</code> is accuracy (minimum std dev of pixel values to make decision about subdivision.</li>
9+
</ul>
10+
<p>Returns list of of vectors containing [x y size] where [x y] is segment position and <code>size</code> is a side length.</p></div></div><div class="markdown"><h4>Examples</h4><div><blockquote><p>Usage</p></blockquote><pre><code class="hljs clojure">(count (segment-pixels (p/load-pixels "docs/cockatoo.jpg") 0))
11+
;;=&gt; 665
12+
(nth (segment-pixels (p/load-pixels "docs/cockatoo.jpg")
13+
0
14+
{:min-size 2, :threshold 40})
15+
5)
16+
;;=&gt; [32 6 2]</code></pre></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/segmentation.clj#L33">view source</a></div></div></div></body></html>

docs/codox/clojure2d.extra.signal.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ <h4><a href="#mda-thru-zero" name="mda-thru-zero"></a>:mda-thru-zero</h4>
209209
"After call on sample" result,
210210
"Extract sample" (result)})
211211
;;=&gt; {"After call on sample"
212-
;;=&gt; #object[clojure2d.extra.signal.EffectsList 0xaea96b0 "simple-highpass (0.38911967999610275) -&gt; simple-lowpass (0.08629142927556396)"],
212+
;;=&gt; #object[clojure2d.extra.signal.EffectsList 0x4caca1 "simple-highpass (0.38911967999610275) -&gt; simple-lowpass (0.08629142927556396)"],
213213
;;=&gt; "Composed effects"
214-
;;=&gt; #object[clojure2d.extra.signal.EffectsList 0x33ddbc2f "simple-highpass (0.0) -&gt; simple-lowpass (0.0)"],
214+
;;=&gt; #object[clojure2d.extra.signal.EffectsList 0x515de635 "simple-highpass (0.0) -&gt; simple-lowpass (0.0)"],
215215
;;=&gt; "Extract sample" 0.08629142927556396}</code></pre></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/signal.clj#L296">view source</a></div></div><div class="public anchor" id="var-db-.3Elinear"><h3>db-&gt;linear</h3><div class="usage"><code>(db-&gt;linear x)</code></div><div class="doc"><div class="markdown"><p>DB to Linear</p></div></div><div class="markdown"><h4>Examples</h4><div><blockquote><p>Usage</p></blockquote><pre><code class="hljs clojure">(db-&gt;linear 0.5)
216216
;;=&gt; 1.0592537251772889</code></pre></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/signal.clj#L387">view source</a></div></div><div class="public anchor" id="var-effect"><h3>effect</h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Create effect for given name (as keyword) and optional parametrization.</p>
217217
<p>List of all possible effects is under <a href="clojure2d.extra.signal.html#var-effects-list">effects-list</a>.</p>
@@ -366,7 +366,7 @@ <h4><a href="#mda-thru-zero" name="mda-thru-zero"></a>:mda-thru-zero</h4>
366366
w2 (wave :noise 20.0 0.5 0.1)
367367
sum (sum-waves w1 w2)]
368368
(sum 0.5))
369-
;;=&gt; 0.18568849324726963</code></pre></div><div><blockquote><p>Sum waves plot</p></blockquote><pre><code class="hljs clojure">(draw-wave (let [w1 (wave :sin 1.0 0.8 1.0)
369+
;;=&gt; -0.051086158790885336</code></pre></div><div><blockquote><p>Sum waves plot</p></blockquote><pre><code class="hljs clojure">(draw-wave (let [w1 (wave :sin 1.0 0.8 1.0)
370370
w2 (wave :noise 20.0 0.5 0.1)]
371371
(sum-waves w1 w2))
372372
...)</code></pre><img src="../images/signal/e6ac224e29951cf46cddcacc14019d76.jpg" /></div></div><div class="src-link"><a href="https://github.com/Clojure2D/clojure2d/blob/master/src/clojure2d/extra/signal.clj#L1061">view source</a></div></div><div class="public anchor" id="var-wave"><h3>wave</h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Create waves from various oscilators</p>
@@ -382,7 +382,7 @@ <h4><a href="#mda-thru-zero" name="mda-thru-zero"></a>:mda-thru-zero</h4>
382382
<p>To add waves, call <a href="clojure2d.extra.signal.html#var-sum-waves">sum-waves</a>.</p></div></div><div class="markdown"><h4>Examples</h4><div><blockquote><p>Usage</p></blockquote><pre><code class="hljs clojure">(let [wave-sin (wave :sin 1.0 1.0 0.5)] (wave-sin 0.1))
383383
;;=&gt; -0.5877852522924728
384384
(let [wave-noise (wave :noise 0.1 1.0 0.123)] (wave-noise 0.1))
385-
;;=&gt; -0.08535827369189652</code></pre></div><div><blockquote><p>constant</p></blockquote><pre><code class="hljs clojure">(clojure2d.extra.signal-example/draw-wave
385+
;;=&gt; -0.20924966038530957</code></pre></div><div><blockquote><p>constant</p></blockquote><pre><code class="hljs clojure">(clojure2d.extra.signal-example/draw-wave
386386
(clojure2d.extra.signal/wave :constant 1.0 1.0 0.1)
387387
...)</code></pre><img src="../images/signal/78d9cda6274556c0ca561519ad31f1ba.jpg" /></div><div><blockquote><p>cut-triangle</p></blockquote><pre><code class="hljs clojure">(clojure2d.extra.signal-example/draw-wave
388388
(clojure2d.extra.signal/wave :cut-triangle 1.0 1.0 0.1)

0 commit comments

Comments
 (0)