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

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

jquery - Keeping Kendo Datepicker in min/max range -

cordova - Plugin preferences in config.xml -