Atelier Tekuto http://openbuildings.com/buildings/reflection-of-mineral-profile-2113#!buildings-media/3

Studying the architecture typical of Bauhaus or of Atelier Tekuto, it’s obvious that a staple characteristic of such architecture is lots of straight lines.

The Hough Line Transform proves useful for identifying the boundary of shapes using general line models. This is pertinent in the case of modern architecture with which we’re attempting to dissect and recreate in another style, as the Hough Line Transform can help identify faces and structures of the input imagery.

In OpenCV, performing the HoughLines transform is a trivial task, and there’s also a probabilistic version of this function which is faster and more efficient, computationally.

Given an input image, of type ofImage, you can pass it into a function provided with Kyle Mcdonald’s ofxCv library which maps it to a binary open-cv Matrix representation of the same image:

Once the image is in a binary matrix representation, it’s easy to use native opencv functions and operations to perform the Hough Line transform:

This mutates the contents of the lines vector, and adds the computed relevant information needed to draw the Hough Lines on the image:

Hough lines