我能夠與BufferedImage
以獲得一個640x640的圖像的每個像素的RGB值,輸出看起來是這樣的:轉換24位圖像RGB到3位8色
[...]
Pixel :(640, 634) RGB: 166 94 82
Pixel :(640, 635) RGB: 166 94 80
Pixel :(640, 636) RGB: 163 91 77
Pixel :(640, 637) RGB: 157 88 73
Pixel :(640, 638) RGB: 157 88 73
Pixel :(640, 639) RGB: 159 90 74
Pixel :(640, 640) RGB: 158 89 73
This image has 69197 colors.
我需要將這種方式獲得的每種RGB顏色分類爲3位RGB(8種顏色),我需要對如何做到這一點有一個想法...如何知道RGB的8個顏色中的每一個的範圍3位RGB。謝謝!
該操作稱爲[抖動](http://en.wikipedia.org/wiki/Dither#Digital_photography_and_image_processing)。 – 2012-07-18 18:41:36