Categories
etcetera fluids halftoning image processing

Advection-Diffusion of Ink

I want to have the ink on a photo clump together, leading to a black and white image. This is a sort of flow, so my first thought isr to take a look at the advection-diffusion equation. Let’s say that the ink distribution across an image is , the diffusion factor is , and the […]

Categories
etcetera image processing

Rearrange a Picture into Itself

Previously, I took one photo and rearranged its squares to make a version of another photo. How about a sillier version, where you use one image to re-make itself? The simple answer is to just keep every square in its original place, but that’s no fun at all. Instead, we can add the requirement that […]

Categories
etcetera

Text Processing of The Dresden Files: Word2Vec

In my previous post, I did some statistical analyses of the Dresden Files novels. Now I want to do some fancy stuff with vectors. Word2Vec is a method for turning a bunch of words in text into related vectors, as the name implies. Using a shallow neural network, it represents finds vectors such that words […]

Categories
etcetera

Text Processing of The Dresden Files: Statistics

The Dresden Files is a series of very fun books by Jim Butcher, with a wizard detective getting into trouble and saving the world and all that. I’ve wanted do do some Natural Language Processing (NLP) on a body of text, and with fifteen novels so far (two more later this year!), this is a […]

Categories
etcetera image processing

Photomosaics, with repetition

Previously, I recreated an image by rearranging squares of another image. Typical photomosaics allow for repeated use of tiles, so I’ll try that for comparison. I’ll still allow rotation, as it helps the edges so much. The image on the left is the result: It works, but isn’t great. The repeated use of certain tiles […]

Categories
etcetera image processing

Rearrange a picture into another

I want to take one image, chop it into square tiles, and use those to make an approximation of another image. When the images are the same size, the simplest version is identical to the assignment problem. This is a classical optimization problem that has been well studied. In those terms, there is a “cost” […]

Categories
etcetera image processing

Image Approximation with Constant-Color Shapes

I want to approximate images using constant-color shapes. Given a shape, how do we choose where to put it? We have the original image, , and the approximate image, . I want to place a shape, , with area on such that it improves the approximation. First, define the average color under the shape (which […]

Categories
etcetera

Angled Splitulate

I’ve refined image approximations with rectangles and triangles. Let’s try with splitting regions into two with a straight line, and filling each part with the average color that they’re covering. This is the same basic idea as the rectangles, except that now the line can be at any angle, rather than just vertical or horizontal. […]

Categories
etcetera

Image Triangulation: Voronoi Method

Voronoi diagrams are great, so let’s use them to stylize images. First, let’s just throw a bunch of points on an image, and compute the Voronoi diagram. Then for each cell, we fill it with the average or median color within: Hmm. That’s not great. It doesn’t pay attention to the edges at all, and […]

Categories
etcetera

Image Triangulation

Previously, I split an image into a bunch of rectangles. What about using triangles? This requires more thought, as it’s a little trickier to divide up the plane using triangles. The natural solution is to keep track of a set of vertices, then use a Delaunay triangulation to split up the image. First, let’s do […]