title: Generate contours from image
body: <p>In Matlab, there is a function "contour" (<a href="http://www.mathworks.com/help/matlab/ref/contour.html" rel="nofollow">Matlab contour</a>). If I use this for my Image, I got what I want. But my goal is to implement such a function to my image editor myself. I read the Matlab's "documentation" for "contour" function and based on that, I used Marching Squares algorithm. Hovewer, my result looks "ugly". Contours are crossing each other and I have very hight number of nested contours, which are eliminated in Matlab.
  Anyone know about some solution, how to generate contours from grey-scale image with, lets say, every 10th brightness value ?</p>