A ridiculous way to create 135 art pieces in one weekend.

Dawid Woldu
Nationall
Published in
6 min readJul 9, 2016

Himalajska (himalayan) street in Warsaw, Poland is a short (slightly less than 1 km long) street which has nothing to offer but a shitload of garages. My friend @bartekchlebek told me about the place. He and his girlfriend stumbled upon it while urban hiking. He invited me for a similar hike and was excited to go there again. When we finally went I understood why. What is really fascinating about this place that is that almost each garage door is painted in a different color.

Gorgeous garage no. 50

Each owner chose the color he liked. There was clearly no collective effort to keep any visual consistency. It’s rather a beauty contest.
It’s also super clear which garages are used and which are not. Some of them are neat, others clearly neglected.

I didn’t do any extensive research of the history of this place, but found out that it is somehow connected to Babice Airport that lays nearby and has it’s military past.

Photoshoot

I became inspired by the rich palette of these otherwise identical objects. I was struck by the idea to photograph each of the garage door and use them as large pixels. The idea was to write a computer program that will sort the colors and produce transition.

I visited the place 3 times during a weekend to take photos. Not that it took so much time. I just didn't’ want any harsh shadows on the garage doors, so went there in different times of the day to compare the lighting. I also went to shoot some closeups and details.

In the end I photographed 135 garages, which is not even a half of what’s there. I didn’t want to use garages with wooden doors. Also some metal door garages are positioned in a way that always produces harsh shadows.
Anyways… the easy part was over. Now was the time to write a program.

By the way… I’m not a software developer. I decided to learn Action Script 3 and gained some proficiency literally moments before the technology died. I still use Flash to build some tools for my personal projects.

Garage no. 130

Sorting colors

I put my photos aside and started figuring out color sorting. I didn’t realise the complexity of the problem. I found a great article about it by Alan Zucconi. I did not analyse the Python examples, but the article gave me a good theoretical base to start with my own experiments.

At the same moment I realised that ages ago I’ve researched the way Magic Wand in photoshop works and shared it on the user group. I knew I could use that knowledge to produce my algorithm for sorting.

What Magic wand does is select the area of pixels which colors are similar to a sampled pixel. The similarity of selected colors is described by a Tolerance property.

I googled for my post describing the maths behind that tool and found it. It was posted in May 2005.

I learned that the difference in color value is measured for each channel.

var dR:int = r0 - r1
var dG:int = g0 - g1
var dB:int = b0 - b1

Magic Wand then sums abstract values of the smallest and the greatest of the differences. The value is then compared against a number set as Tolerance. If it’s smaller the color is similar enough to be selected.

That was great. I could compare two colors and describe their similarity by a single number. The smaller the number the more similar are the colors.

var similarity:int = Math.abs(Math.Min([dR,dG,dB])) + Math.abs(Math.Max([dR,dG,dB]))

So I used that equation to build a sorting method. It moves colors, one by one from source array to destination array by their similarity. It always focuses on the last color in the destination array to search for the most similar in the source array. I guess it’s a nearest neighbour algorithm?

Anyway. I was super happy with the results it produced.

Left: random colors. Right: sorted colors

One thing that I haven’t thought about is that for a given array of colors my method will produce different results depending on the color it starts with.

At first I wanted to fix that problem and spent some time modifying the algorithm to always produce the same order. It worked, but I wasn’t happy with the result. I got back to refining the method, but then it hit me:

Why am I trying to end up with just one image when I can have 135 unique images?

I stopped. The sorting method was done.

What color is the garage door?

Next step was to extract the color from the photographs. I mean. I needed only one HEX value for each photograph.

After examining each file I decided to sample two pixels in the middle of each door wing. But before sampling the color value I applied a BlurFilter method to average the color value in a sampled area. As a final color I used the average of two samples.

Images were blurred then the average of two samples was the final color value.

I spent all day manually cropping and adjusting the geometry of the photos.
Once they were prepared I ran my script that extracted the colors and created an array of objects referencing the BitmapData as well as R,G,B,H,S,V and HEX values associated with it.

Final images

So, I had a method for extracting colors, I had a sorting algorithm. It was time to put them to work and produce the final images. I used Lee Burrows’s asynchronous png encoder. It saved my life as the standard encoder was unable to process such a huge bitmap.

So I just sat there and watched the pictures landing on my hard drive as the script was working.

Even though I was creatively and emotionally involved in every aspect of this stupid project I felt strangely amazed. I became the first consumer of my own art. Like I just stumbled upon a gallery and walked in expecting nothing.

The result: 135 unique images

I love them all. I decided to print the number 57.

Image #57
70x100cm image #57 on my wall
#57

That’s all I wanted to say about Himalajska street. For now. I do plan to shoot more and create another batch with 200+ and 300+ photos.

If either of you two people who’ve read it to the end have a question feel free to leave a comment (or ping me on twitter I guess)

--

--