 # Mona Lisa Overdrive

## Description

Simulated annealing process of 512x512, 6x3 bit Mona Lisa using different definition of "Energy", where Energy = A*(squared neighbor pixel color differences) + B*(squared color differences to the target). I used "l2-norm", namely (Ri-Rj)^2 + (Gi-Gj)^2 + (Bi-Bj)^2. The ratio of coefficients A:B is, from top to bottom, 256:1, 64:1, 16:1, 4:1, 1:1, 1:4, 1:16, 1:64. Images from right to left shows equilibrium state at higher to lower temperature. The annealing process consists of standard Metropolis update as follows:

1. Choose a pixel i
2. Choose another pixel j, which modestly differs in color with i. To do this, one must maintain color-to-position pointers.
3. Calculate energy change by swapping i and j (=dE).
4. If dE<0, accept the change. Otherwise accept it with a probability exp(-dE/T) where T is a temperature.

Repeating this process drives the system to a Boltzmann distribution in which a state of energy E appears with probability proportional to exp(-E/T). Starting from large T and gradually decreasing T drives the system to lower energy state.

## Stats

Date March 23, 2010 16,777,216 16,777,216 4,096 × 4,096 36,819,863 