Self-organizing bookcase

This is what my bookcase looked like before:

Books unsorted

And this is what it looks like now:

Books sorted

Much better!

So how does a geek organize his books? He uses a technique called self-organizing maps (SOM).

I basically took a high resolution photo of my bookcase (the first picture shown) and then cut out all the book spines and saved them as separate images. After doing that I had 347 little images. I used the ImageMagick command-line tool to resize all these images to a 1×1 picture. I figured that the single pixel in these images would more or less approximate the average spine color. The RGB values of these pixels were then used to train a 1 dimensional SOM. After training, the best-matching unit on the SOM for each bookspine was determined telling me how I should reorder my books.

And yes, I realize that there are easier ways to sort books by color 😉

2 thoughts on “Self-organizing bookcase

Leave a Reply

Your email address will not be published. Required fields are marked *