Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 516 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 516 Bytes

ImageColorTheme

Extract Color Themes from Images

pixData

import numpy as np

pixData = np.array([[R, G, B], [R, G, B],...], dtype=np.uint8)
print(pixData.shape)
# (h, w, d)

MMCQ

from ict.MMCQ import MMCQ
mmcq = MMCQ(pixData, maxColor)
theme= mmcq.quantize()

k-means

from ict.KMeans import KMeans
km = KMeans(pixData, maxColor)
theme = km.quantize()

Results