Skip to content
All projects
EEL 5820 Image Processing2025

Colour transfer between images

Moving the palette of one photograph onto another by matching distributions in a decorrelated colour space.

MATLABColour spacesStatistical matching

The question

Matching colour channel by channel in RGB does not work, because the channels are strongly correlated and shifting one drags the others with it in ways that produce obvious artefacts.

Approach

Convert to a colour space where the axes are close to decorrelated, match the mean and standard deviation of each axis between source and target, then convert back. Implemented over reshaped pixel matrices in double precision.

Source, target and result.
A second pair.

Outcome

Clean palette transfer across seven source and target pairs, with the characteristic edge cases visible where the two images have very different tonal structure.

What it taught me

Choosing the right space to work in does most of the work, and a simple operation in a good basis beats an elaborate one in a bad basis. A recurring theme.

More output

A third pair.