I’ve been playing around today with an image decomposition method. Given some observed image , one seeks an image so as to minimize

Where the first sum is over all pixels , and the second sum is over all *neighboring pairs* of pixels (For simplicity here, I imagine that images are just long vectors, and the grid structure is only present in what pairs are considered neighbors). This minimization has the interesting property that, at a solution, neighboring pixels in often have the same value. Thus, one can see the optimization as segmenting the image into piecewise constant regions.

I tried using the (excellent) CVX toolbox to do the optimization. Though this worked, it was quite slow. I then derived a little iteratively reweighted least-squares algorithm that is much faster.

(**Update Jan 9, 2009**: Code for doing the optimization is here.)

Anyway, the standard use of the decomposition is for “denoising”. Here is an example from an image in the Street Scenes database. At top is the original image , followed by the result . At the bottom, I use a random colors for each segment to give a better idea of the discontinuities.

Always, intensities are in the 0-1 interval, and only immediate horizontal and vertical pairs are considered neighbors.

However, more interesting (to me) images come from segmenting random images.

Uniform noise,

Uniform noise,

Uniform noise,

Uniform noise,

Uniform noise,

Uniform noise,

Gaussian noise, variance ,

Gaussian noise, variance ,

Gaussian noise, variance ,