def Color_Quantization(img):
'''Color quantization is the process
that drastically reduces the number of colors used in a digital color image
by approximating the original pixels with their nearest representative colors'''
img=img.filter(ImageFilter.SMOOTH)
result = img.convert('P', palette=ADAPTIVE, colors=4)
result.save('C:\Users\USER\workspace\Final Project\src\outputImage\OUTEqualization.png')
result.show()
image_func.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录