def quantize(cls, raster, n_colors, **kwargs):
lab_raster = color.rgb2lab(raster)
lab_quantized_raster = super(RGBtoLABmixin, cls).quantize(
lab_raster, n_colors, **kwargs)
quantized_raster = (color.lab2rgb(lab_quantized_raster) * 255).astype(
'uint8')
return quantized_raster
concrete_quantizer.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录