What does PIL's convert method exactly do with palette = Image.adaptive in python? -


i used pil library write in python prototype of kmeans algorithm applied on image. initial centroids used first k colors

convert('p', palette=image.adaptive, colors=n_clusters)  

extracts . i've read convert's source code (in image.py) haven't understood how works when choose adaptive choice, seems effective

my aim implement kmeans in c++ can't rely on convert() method find first k centroids, have understand behavior, in order replicate in c++.

thank you


Comments

Popular posts from this blog

Linux vanilla kernel on QEMU and networking with eth0 -

rdbms - what exactly the undo information lives in oracle? -

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -