K Pix

Reduced colors

Part of a brief series that started here.

How can we use k-Means to understand and/or manipulate photographic images? As a first example, here’s a classic from the poster-printing world: choosing a very small number of inks to represent a full-tone photo.

In our example, we grab random photos from the web – some work great as posters, some… not so much. But the code will do its best given the narrow constraints: all it knows is grayscale values, and we’ve reduce our calculation to just one dimension: the values along the grayscale histogram from each picture.

4 min read

Special Ks

Live demo: Click on it to Pause/Resume

Part of a brief series that started here.

A follow-on to the last post on k-Means — this time, we use different criteria to determine “closeness” and to adjust where we move things around.

1 min read

Understanding Winogrand, 2017

“Photography is about finding out what can happen in the frame. When you put four edges around some facts, you change those facts.” - Garry Winogrand

K-Means

Live demo: Click to Pause/Resume

This is the first post in a brief series on algorithms (simple methods) that I like and that I think more people should know about: either because of their simplicity, their novelty, their usefulness, or all three. Each comes with a live demo. To begin, let’s introduce: k-Means Clustering .

2 min read