Академический Документы
Профессиональный Документы
Культура Документы
Pi19404
February 12, 2013
Contents
Contents
Uniform Color Quantization
0.1 Abstract . . . . 0.2 Uniform Color 0.3 Code . . . . . . References . . . . . . . . . . . . . . Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3 3 5 5
2 | 5
The disadvantage of uniform quantization is that some pixels near some color levels may be largely represented in image than other pixels. For example if image contains only pixel values in the range 0-64. The interval levels will be still configured as 0,64,128,192. Another option is to choose the largest integral multiple of number
3 | 5
(a) Image
(b) Quantized
(c) Image
(d) Quantized
Figure 1: Uniform Color Quantized 1
of division greater than of equal to the largest pixel value present in the image. If Number of Distinct Colors Requires are N (Interval Length) div= = ceil(max(Image)=N )N N (Transformation) Output = f loor(I 25 ) div N
(2)
(a) Image
(b) Quantized
(c) Image
(d) Quantized
Figure 2: Uniform Color Quantized 2
4 | 5
0.3 Code
OpenCV libraries are used for image processing . Code is available in repository https://code.google.com/p/m19404/source/browse/ ColorQuantization/
5 | 5