hexagonal labyrinths in processing

Nikolaus Gradwohl2011-04-26T05:50:08+02:00

I took my labyrinth generator and reworked the algorithm a bit to generate hexagonal labyrinths.

click here to generate some labyrinths or get the sourcecode

hexagonal labyrinth

read more ...

Generating Labyrinths in Processing

Nikolaus Gradwohl2011-04-23T15:33:23+02:00

I wrote a processing-sketch that generates labyrinths. It uses a simple recursive algorithm described here to generate the maze.

The + and - keys can be used to change the maze-size, any other key generates a new maze.

click here to generate some labyrinths or get the source-code

maze

read more ...

line detection with hough-transform

Nikolaus Gradwohl2010-01-19T03:23:00+01:00

I wrote a small processing sketch to work out how linedetection using hough-transform works.

click here 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.

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.

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

every line in the input image results in a bunch of lines in the parameterspace that have a common intersection point.

in my example i use a input image like this

input

calculate how it looks in parameter space

parameter space

and then reconstruct where the lines are

reconstruct

read more ...