I’m trying to deploy BIC algorithm (border/interior pixel classify) and using PIL (python imaging library) to process image . But i don’t know how to quantize RGB color from 24bit (8bit per color) to 6 bit (2bit per color) by using PIL .
Anyone can tell me how to do it by PIL or another python library such as Opencv , pythonmagick…?
I’m trying to deploy BIC algorithm (border/interior pixel classify) and using PIL (python imaging
Share
the PIL ImageOps posterize (scroll down to posterize) function should do this for you.