<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>tag:www.local-guru.net,2005:/blog/tag/algorithm</id>
  <link type="text/html" href="http://www.local-guru.net" rel="alternate"/>
  <link type="application/atom+xml" href="http://www.local-guru.net/blog/tag/algorithm.atom" rel="self"/>
  <title>GuruBlog : Articles about algorithm</title>
  <subtitle>local-guru.net</subtitle>
  <updated>2011-04-26T05:50:08+02:00</updated>
  <generator>GuruBlog engine</generator>
  <entry>
    <id>tag:www.local-guru.net,2005:Article/380</id>
    <published>2011-04-26T05:50:08+02:00</published>
    <updated>2011-04-26T05:50:08+02:00</updated>
    <link type="text/html" href="http://www.local-guru.net//blog/2011/4/26/hexagonal-labyrinths-in-processing" rel="alternate"/>
    <author>
      <name>Nikolaus Gradwohl</name>
    </author>
    <title type="html">hexagonal labyrinths in processing</title>
    <category term="processing" scheme="http://www.local-guru.net/blog/tag/processing"/>
    <category term="algorithm" scheme="http://www.local-guru.net/blog/tag/algorithm"/>
    <category term="labyrinth" scheme="http://www.local-guru.net/blog/tag/labyrinth"/>
    <content type="html">&lt;p&gt;I took my &lt;a href="http://www.local-guru.net/blog/2011/04/23/generating-labyrinths-in-processing"&gt;labyrinth generator&lt;/a&gt;
and reworked the algorithm a bit to generate hexagonal labyrinths.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.local-guru.net/processing/hexlab"&gt;click here&lt;/a&gt; to generate some labyrinths or get the sourcecode&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/hexlab_sc.png" alt="hexagonal labyrinth" /&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:www.local-guru.net,2005:Article/377</id>
    <published>2011-04-23T15:33:23+02:00</published>
    <updated>2011-04-23T15:33:23+02:00</updated>
    <link type="text/html" href="http://www.local-guru.net//blog/2011/4/23/generating-labyrinths-in-processing" rel="alternate"/>
    <author>
      <name>Nikolaus Gradwohl</name>
    </author>
    <title type="html">Generating Labyrinths in Processing</title>
    <category term="processing" scheme="http://www.local-guru.net/blog/tag/processing"/>
    <category term="algorithm" scheme="http://www.local-guru.net/blog/tag/algorithm"/>
    <category term="labyrinth" scheme="http://www.local-guru.net/blog/tag/labyrinth"/>
    <content type="html">&lt;p&gt;I wrote a processing-sketch that generates labyrinths. It uses a simple recursive algorithm &lt;a href="http://ruby-lang.org.ru/2011/01/01/maze-generation-recursive-backtracking-2/"&gt;described
here&lt;/a&gt; to generate the maze.&lt;/p&gt;

&lt;p&gt;The + and - keys can be used to change the maze-size, any other key
generates a new maze.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.local-guru.net/processing/labyrinth"&gt;click here&lt;/a&gt; to generate some labyrinths or get the
source-code&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/labyrinth_sc.png" alt="maze" /&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>tag:www.local-guru.net,2005:Article/228</id>
    <published>2010-01-19T03:23:00+01:00</published>
    <updated>2010-01-19T03:23:00+01:00</updated>
    <link type="text/html" href="http://www.local-guru.net//blog/2010/1/19/line-detection-with-hough-transform" rel="alternate"/>
    <author>
      <name>Nikolaus Gradwohl</name>
    </author>
    <title type="html">line detection with hough-transform</title>
    <category term="processing" scheme="http://www.local-guru.net/blog/tag/processing"/>
    <category term="algorithm" scheme="http://www.local-guru.net/blog/tag/algorithm"/>
    <category term="computervision" scheme="http://www.local-guru.net/blog/tag/computervision"/>
    <content type="html">&lt;p&gt;I wrote a small processing sketch to work out how linedetection using
&lt;a href="http://en.wikipedia.org/wiki/Hough_transform"&gt;hough-transform&lt;/a&gt; works.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.local-guru.net/processing/hough_transform"&gt;click here&lt;/a&gt; to
see it in action and get the sourcecode. the code is not optimised for
speed but for my understanding :-) so don't complain if it doesn't work
on live-video.&lt;/p&gt;

&lt;p&gt;the algorithm takes a image that has run through an edge detection
algorithm and turned into a black/white image and find where things
like edges or circles are by converting the pixels from
imagespace to a parameterspace where such detection is much easyer.&lt;/p&gt;

&lt;p&gt;for each pixel that is set in the source image a set of parameters
that satisfy the formular r = x * cos(roh) + y * sin(roh) is
calculated and r and roh are plotted as the parameterspace image&lt;/p&gt;

&lt;p&gt;every line in the input image results in a bunch of lines in the
parameterspace that have a common intersection point.&lt;/p&gt;

&lt;p&gt;in my example i use a input image like this&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/hough_input.png" alt="input" /&gt;&lt;/p&gt;

&lt;p&gt;calculate how it looks in parameter space&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/hough_parameter.png" alt="parameter space" /&gt;&lt;/p&gt;

&lt;p&gt;and then reconstruct where the lines are&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/hough_reconstruct.png" alt="reconstruct" /&gt;&lt;/p&gt;
</content>
  </entry>
</feed>

