a multi-level approach to quantization
DESCRIPTION
A Multi-level Approach to Quantization. Yair Koren, Irad Yavneh, Alon Spira Department of Computer Science Technion, Haifa 32000 Israel. One dimensional (scalar) quantization. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/1.jpg)
A Multi-level Approach to Quantization
Yair Koren, Irad Yavneh, Alon Spira
Department of Computer Science
Technion, Haifa 32000
Israel
![Page 2: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/2.jpg)
One dimensional (scalar) quantization
Consider the image I consisting of G representation (gray) levels. We would like to represent I with n < G representation levels as best as possible.
More formally, given a signal X (image, voice, etc.), with probability density function (histogram) p(x), we would like an approximation q(x) of X, which minimizes the distortion:
Here, all are represented by .
1
2 2
221
( ) [ ] .i
i
dn
ii d
D q E X q X x r p x dx
1[ , )i ix d d ir
![Page 3: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/3.jpg)
Example (Lena, 512x512)
Left – Lena (gray level image), Right – Lena’s histogram, p(x).
Gray Level
![Page 4: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/4.jpg)
Lena, 8 gray levels
Gray Level
![Page 5: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/5.jpg)
Representing Lena with less levels
128 gray levels 64 gray levels
![Page 6: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/6.jpg)
Lena, 4 gray levels
Gray Level
![Page 7: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/7.jpg)
Naïve vs. Optimal Quantization
Lena, 8 levels, Left – optimal, Right - Naive
![Page 8: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/8.jpg)
The Lloyd Max Iterative Process
1
2 2
221
( ) [ ] .i
i
dn
ii d
D q E X q X x r p x dx
We wish to minimize
Differentiating w.r.t. r and d yields the Lloyd-Max equations:
1 1
1
( )
, , 1, , 12
( )
i
i i
i
i
d
d ii id
d
xp x dxr r
r d i n
p x dx
Max and Lloyd proposed a simple iterative process:
![Page 9: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/9.jpg)
The Lloyd Max Iterative Process
1
11 1
1
11
( )
, .2
( )
ki
ki iki
ki
d
k kd ik k
i id
d
xp x dxr r
r d
p x dx
Given some initial guess, , iterate for until some convergence criterion is satisfied:
0d 1, 2,k
![Page 10: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/10.jpg)
The Lloyd Max Iterative Process
1
1
1
1
1, 1, , 1.
2
i i
i i
i i
i i
d d
d di d d
d d
xp x dx xp x dx
d i n
p x dx p x dx
We can rewrite the Lloyd-Max equations in terms of d alone:
This is a generally a nonlinear system.
![Page 11: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/11.jpg)
The Lloyd Max Iterative Process
1
1 1
12 , 1, , 1.
4kk
i i i id d d d i n
However, for the simple case, p = 1, L-M reduces to
This is nothing but a damped Jacobi relaxation with damping factor 1/2 for the discrete Laplace equation. Evidently, multigrid acceleration is likely to help.
We employ a nonlinear multigrid algorithm, using the Lloyd Max process for relaxation (with over-relaxation 4/3), and a nonlinear interpolation which retains the order of d.
![Page 12: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/12.jpg)
Numerical Tests
We compare three algorithms:
1. Lloyd-Max, starting with a uniform representation
2. Our multigrid algorithm, starting similarly
3. LBG (Linze et al., 1980): Sequential refinement (coarse-to-fine).
In all the algorithms, the basic iteration is Lloyd-Max.
![Page 13: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/13.jpg)
P(x)=x
![Page 14: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/14.jpg)
Step Function and local minima
![Page 15: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/15.jpg)
Local Minima
![Page 16: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/16.jpg)
Convergence Criterion
![Page 17: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/17.jpg)
Discrete Vector Quantization
The 1D problem is used mainly as a preliminary study towards higher-dimensional problems, viz., vector quantization (e.g., for color images).
Also, the p histogram is discrete in practice, and usually quite sparse and patchy and there are many different “solutions” (local minima). “Standard” multigrid methods do not seem appropriate.
![Page 18: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/18.jpg)
Decision regions (Voronoi cells) and representation levels (centers of mass) for
P(x,y)≡1
![Page 19: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/19.jpg)
Equal height contours of P(x,y) = x*y
![Page 20: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/20.jpg)
Decision regions for P(x,y)=x*y
![Page 21: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/21.jpg)
Discrete Vector Quantization
Let G denote the number of possible representation-levels (D-tuples), P the number of such levels for which p does not vanish, and R the number of quantized representation levels. Typically,
A Lloyd Max iteration costs at least O(P) operations. As it doesn’t seem possible to usefully coarsen p, coarse–level iterations will be equally expensive, resulting in O(P log(R)) complexity for the multigrid cycle.
R P G
![Page 22: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/22.jpg)
Discrete Vector Quantization
Sketch of algorithm (V Cycle):
Sketch of Relaxation algorithm:
For 0,1, , log 1, log , log 1, ,1,0,
Relax
j R R R
j
logPartition the variables into, say, 2 aggregates
of 2 representation levels each. Then sweep over the
aggregates, changing each in turn so as to (approximately)
minimize the fine-level function
R j
j
R
al (Gauss-Seidel style).
![Page 23: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/23.jpg)
Conclusions
The multi-level approach is very promising for the problem of quantization. In 1D and (semi-) continuous p we get
• Much faster convergence.• Often better minima.• Sounder convergence criterion.
The real dividends are expected for vector quantization (as in color images). This is a significantly harder and more important problem. Research on this is in progress, led by Yair Koren.
![Page 24: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/24.jpg)
A Multigrid Approach to Binarization
Ron Kimmel and Irad Yavneh
![Page 25: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/25.jpg)
Image Binarization
Original Image
![Page 26: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/26.jpg)
Nonuniform Illumination
ilted Spherical
![Page 27: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/27.jpg)
Naïve (threshold) binarization
ilted
![Page 28: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/28.jpg)
Naïve (threshold) binarization
Spherical
![Page 29: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/29.jpg)
Yanowitz-Bruckstein Binarization
• Isolate the locations of edge centers, for example, the set of points,
for some threshold T.
• Use the values I(x,y), for (x,y) in s, as constraints for a threshold surface, u, which elsewhere satisfies the equation
For this we use our version of a multigrid algorithm with matrix-dependent prolongations.
, :s x y I T
0.u
![Page 30: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/30.jpg)
Edges
ilted Spherical
![Page 31: A Multi-level Approach to Quantization](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814bd6550346895db8b03f/html5/thumbnails/31.jpg)
Results
ilted Spherical