简体   繁体   中英

How can I reduce colors of an image so it would have an exact number of colors?

I have an image with a histogram that look like this: 在此处输入图像描述

I want the image to have only 10 different colors, how can I do that? (in other words I want the histogram to only have 10 values).

Use a lookup table that associates [0,11] to 0, [12,35] to 23, [26,58] to 46... and [219, 255] to 230.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM