Content deleted Content added
→Quantization matrices: consistent US spelling |
Added Grayscale Quantization |
||
Line 9:
It is common to combine color quantization with [[dither]]ing to create an impression of a larger number of colors and eliminate [[colour banding|banding]] artifacts.
== Grayscale quantization ==
Grayscale quantization, also known as gray level quantization, is a process in digital image processing that involves reducing the number of unique intensity levels (shades of gray) in an image while preserving its essential visual information. This technique is commonly used for simplifying images, reducing storage requirements, and facilitating processing operations. In grayscale quantization, an image with ''N'' intensity levels is converted into an image with a reduced number of levels, typically ''L'' levels, where ''L''<''N''. The process involves mapping each pixel's original intensity value to one of the new intensity levels. One of the simplest methods of grayscale quantization is uniform quantization, where the intensity range is divided into equal intervals, and each interval is represented by a single intensity value. Let's say we have an image with intensity levels ranging from 0 to 255 (8-bit grayscale). If we want to quantize it to 4 levels, the intervals would be [0-63], [64-127], [128-191], and [192-255]. Each interval would be represented by the midpoint intensity value, resulting in intensity levels of 31, 95, 159, and 223 respectively.
The formula for uniform quantization is:
<math>Q(x) = \left \lfloor \frac{x}{\Delta} \right \rfloor \times \Delta + \frac{\Delta}{2} </math>
Where:
* ''Q''(''x'') is the quantized intensity value.
* ''x'' is the original intensity value.
* Δ is the size of each quantization interval.
Let's quantize an original intensity value of 147 to 3 intensity levels.
Original intensity value: ''x''=147
Desired intensity levels: ''L''=3
We first need to calculate the size of each quantization interval:
<math>\Delta = \frac{255}{L-1} = \frac{255}{3-1} = 127.5</math>
Using the uniform quantization formula:
<math>Q(x) = \left \lfloor \frac{147}{127.5} \right \rfloor \times 127.5 + \frac{127.5}{2}</math>
<math>Q(x) = \left \lfloor 1.15294118 \right \rfloor \times 127.5 + \frac{127.5}{2}</math>
<math>Q(x) = 1 \times 127.5 + 63.75 = 191.25</math>
Rounding 191.25 to the nearest integer, we get <math>Q(x) = 191</math>
So, the quantized intensity value of 147 to 3 levels is 191.
== Frequency quantization for image compression ==
Line 88 ⟶ 122:
==References==
{{reflist}}<ref>{{Cite book |last=Smith |first=Steven W. |title=Digital signal processing: a practical guide for engineers and scientists |date=2003 |publisher=Newnes |isbn=978-0-7506-7444-7 |series=Demystifying technology series |___location=Amsterdam Boston}}</ref>{{Compression Methods}}
{{DEFAULTSORT:Quantization (Image Processing)}}
|