Paletizer - Color Transfer

Paletizer - Color Transfer


The goal of this project is to develop an Android application for color transfer. We develop three color transfer methods, a color palette database, and an Android application.

Color Transfer

The statistical properties of an image contain good information about its look and feel. In the first method, we leverage these properties and move the statistical mean and std of a source image onto a target image.

Statistical color transfer

Statistical Color Transfer

Furthermore, we can extract color palettes from images using k-means with a deterministic approach for center initialization. The approach is based on image histograms in LAB space. We consecutively select the color representing the largest bin, and decrease all other bins based on their distance to the chosen color. We repeat this until we get k centers, and add a final fixed black center to account for dark colors in the image.

Home Moon

Palette Extraction k=5

Using the palette extraction method, we design the second and third color transfer methods that map the images colors to make its palette match the desired colors. In the second method, we use histogram matching to ensure the target image colors match the source colors.

Histogram color transfer

Histogram Color Transfer

In the above, the color are a bit unnatural due to out of gamut colors, clipping, and loss of dynamic range. In the third method, we enforce color constraints on the target based on the palette, the gamut, the luminance and the dynamic range. The better results come at a higher computational cost.

Vector color transfer

Vector Color Transfer

Palette Database

We use Adobe Kuler to mine the 1000 most popular palettes. For each user query, we compute the semantic similarity of each palette name to the given keyword, and return the highest similarity matches. A Java implementation is available on Github. Additionally, we mine Flickr for images matching the keyword and extract palettes from there as well.

Android App

After prototyping the algorithms in Python and Matlab, we moved the code to Android using a Java wrapper of OpenCV. We chose not to implement the last color transfer method due to its computational costs. The user is able to input an image and choose either another image as a source, or look for a palette using our database search utilities. Below are some screenshots from the app, and you can find a demo on Youtube.

App Screenshots

App Screenshots