Idea comes from a generative artist’s work. He uses some basic geometries to build a picture. It’s naturally beautiful. Then I found that if we turn the real world into a 2D picture. It’s comprised of points, lines and some basic geometric shapes. So why not take a real world picture as an input and then generate another picture comprised with basic geometric shapes.
I use openframeworks to make the project. Because OF has more powerful Computer Vision support. To accomplish my project, I need a lot of Computer Vision algorithms to recognize the picture.
Firstly, I use Canny Edge Detection to make the lines and shapes in the picture more obvious for computer to read. Then use Hough Transform to detect the shapes in the pictures. Because the performance of Computer Vision algorithm depends on what the picture is and what the attribute is. So I make a user interface to let user to customize their own generative picture. Some basic attribute can be changed and user can also decide whether to put the circle or contour into the generative picture. I take a easy way to generate color. It’s mix white with a random color and this makes color beautiful.
Here’s an example. Version with circle and contour.
Version with a smaller threshold.
Version with a larger threshold.