Skip to content
プロジェクト

ardila/paintingReorganize

GitHubで見る

概要

Use PCA analysis to reorganize the pixels of a painting into a smooth color palette.

その他のプロジェクト

この数値の測り方

計測したスター増加

24時間
0
7日間
+1
15日間
+1
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

paintingReorganize

To install

pip install -r requirements.txt

If that doesn't work you will have to manually track down and install these pip packages.

To use

python palette.py /path/to/input_file.jpg

Output will be written to output.png

Examples

Input:

Kupka - Mme Kupka Among Verticals

Input

Output:

Output

Input:

Van Gogh - Starry Night

Input

Output:

Output

Input:

Picasso - Demoiselles D'Avignon

Input

Output:

Output

Input:

Cezanne - The Large Bathers

Input

Output:

Output

How it works

Mostly based on PCA a little tutorial on what that means here

  1. Organize pixels according to their first principal component (the direction along which variance is greatest)

  2. Grab a column of pixels at a time, and organize them according to their first principal component

  3. Use the resulting columns one by one in the final result. With each column, check to see if flipping it upside down gives a better match to the previous column.

関連プロジェクトを探す

読み込み中…