24.02.2014 Views

Optimal requantization of deep grayscale images and Lloyd-Max ...

Optimal requantization of deep grayscale images and Lloyd-Max ...

Optimal requantization of deep grayscale images and Lloyd-Max ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

446 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 15, NO. 2, FEBRUARY 2006<br />

2) infinite number <strong>of</strong> samples; in our case, the number <strong>of</strong> pixels,<br />

(specifically in [1], that follows from the Nyquist theorem);<br />

3) the observed signal values differ from certain true<br />

values by additive <strong>and</strong> relatively smoothly distributed noise.<br />

Although it was not said explicitly, an ideal data model would<br />

have been defined by a continuous <strong>and</strong> strictly increasing cumulative<br />

distribution function (c.d.f.), . A good example might<br />

be a mixture <strong>of</strong> normal distributions<br />

where factors account for normalization <strong>and</strong> probabilities <strong>of</strong><br />

different quanta .<br />

In [1], the problem was stated for the c.d.f. <strong>of</strong> general<br />

type; however, any deviation from the continuity <strong>and</strong> strictly<br />

increasing behavior was considered a nonessential <strong>and</strong> merely<br />

technical complication. This might be acceptable when the ideal<br />

data model assumption was true in the major part <strong>of</strong> domain. It<br />

is usually the case for the quantization <strong>of</strong> analog signals.<br />

Practically, signal measurement always eventually results in<br />

conversion to digital form; so, we can assume a finite number <strong>of</strong><br />

initial quanta (speaking more accurately, a number <strong>of</strong> distinct<br />

initial quanta <strong>of</strong> nonzero probability). In order for the model to<br />

be close to the analog case, the following two inequalities should<br />

take place:<br />

where the left one would make the interval include many initial<br />

quanta, so the probability <strong>of</strong> any particular value <strong>of</strong> the signal<br />

would be negligible; the right one would make a histogram close<br />

to the true distribution density.<br />

In case <strong>of</strong> image <strong>requantization</strong>, e.g., if<br />

, at least the first inequality<br />

in (5) is not true. It is a combinatorial, rather than a regular<br />

optimization, problem. The c.d.f. has discontinuity in each<br />

integer<br />

, <strong>and</strong> intervals <strong>of</strong> constancy in between.<br />

There is no one “regular” (in terms <strong>of</strong> the ideal model) point at<br />

all in the entire domain. Hence, it is a different problem.<br />

The first consequence <strong>of</strong> this difference is that the pro<strong>of</strong> <strong>of</strong> the<br />

<strong>Lloyd</strong>’s key statement cannot be fully extrapolated to the digital<br />

image domain, because the special case <strong>of</strong> the signal value exactly<br />

at the boundary point (midway between the two adjacent<br />

quanta) is ignored. It was ignored in [1] <strong>and</strong> in later literature<br />

(e.g., [5, p. 176]). This is acceptable in the analog case, where<br />

any single value can be treated as one <strong>of</strong> probabilistic measure<br />

zero. In case <strong>of</strong> image <strong>requantization</strong>, endpoints with nonzero<br />

probability are quite possible. Therefore, it is important which<br />

<strong>of</strong> the two adjacent intervals the boundary intensity will be assigned<br />

to, according to optimal partitioning. Even more important<br />

is the question: Could part <strong>of</strong> the corresponding pixels belong<br />

to the left interval, while the rest belong to the right one?<br />

Had this split been possible, the key statement would not have<br />

been true in the digital domain.<br />

The answer cannot be obtained using <strong>Lloyd</strong>’s reasoning; a<br />

different <strong>and</strong> independent pro<strong>of</strong> <strong>of</strong> this statement in the digital<br />

domain is required. In [6], we showed in particular, that<br />

the optimality in (1)–(3) could never be reached with a “split<br />

end-point”:If is the optimal <strong>requantization</strong> <strong>of</strong> , then for any<br />

(4)<br />

(5)<br />

pair <strong>of</strong> pixel indices<br />

; the last implication means that pixels with<br />

equal intensity values cannot fall in the different intervals.<br />

The second consequence <strong>of</strong> the difference between the classic<br />

quantization <strong>and</strong> image <strong>requantization</strong> relates to the algorithms.<br />

While <strong>Lloyd</strong>’s key statement, with the above extension, holds<br />

true for the problem (1)–(3), both quantization methods in [1]<br />

face serious difficulties in the digital domain.<br />

The basic idea <strong>of</strong> both heuristic solution methods in [1] is<br />

that the endpoint between adjacent intervals is always midway<br />

between the corresponding quanta<br />

(6)<br />

Method I starts with r<strong>and</strong>om partition<br />

. Each<br />

quantum is calculated as an average <strong>of</strong> the signal values in<br />

the th interval. Then, the endpoints <strong>of</strong> the intervals are adjusted<br />

according to (6), <strong>and</strong> the quanta are recalculated again. The iterations<br />

continue until a certain stopping criterion is met.<br />

Method II starts with r<strong>and</strong>om value ; endpoint <strong>of</strong> the first<br />

interval is calculated to make an average in the first interval<br />

. Then, quantum is calculated to satisfy condition<br />

(6); endpoint <strong>of</strong> the second interval is calculated to make<br />

an average in , <strong>and</strong> so forth. If the last quantum in this<br />

sequence differs from the average signal value in the last interval<br />

by more than certain threshold , the process restarts from<br />

a new initial value . The process stops when the difference between<br />

<strong>and</strong> the average in the last interval does not exceed .<br />

Obviously, (6) is not sufficient for optimality, so the algorithms<br />

usually stop in the local minima. Moreover, it is not necessary,<br />

either, because optimal intervals may be separated not<br />

only by endpoints (6), but also by separating intervals (SIs)<br />

<strong>of</strong> nonzero length <strong>and</strong> probability 0. In our case, every SI has<br />

length <strong>of</strong> at least 1. Any point <strong>of</strong> such a SI, including midpoint<br />

defined in (6), may be treated as an endpoint between adjacent<br />

target intervals. Indefiniteness <strong>of</strong> the endpoints is inherent to our<br />

problem, while in [1], it is, rather, an exception.<br />

Specifically, these SI (intervals <strong>of</strong> constancy <strong>of</strong> c.d.f. )<br />

are a real problem for Method II. If only a few SI exist, <strong>Lloyd</strong><br />

proposed to add a few more minimization parameters. In our<br />

8-bit scale example, there are exactly 255 intervals <strong>of</strong> constancy;<br />

it is hardly feasible to minimize by 255 additional parameters,<br />

so Method II is, in fact, inapplicable.<br />

Unlike Method II, there are no obvious obstacles for using<br />

Method I, so its applicability to image <strong>requantization</strong> should<br />

also be studied experimentally. We describe our experiments<br />

<strong>and</strong> discuss the results in Section V.<br />

IV. OPTIMAL REQUANTIZATION<br />

As an alternative to <strong>Lloyd</strong>’s algorithms, a globally optimal<br />

image <strong>requantization</strong> (partitioning <strong>of</strong> the source scale for maximum<br />

homogeneity <strong>of</strong> intervals), based on DP, can be used. Although<br />

the algorithms in [2]–[4] are formally different, they are<br />

equivalent in terms <strong>of</strong> asymptotical computational complexity,<br />

which is .<br />

In the early days <strong>of</strong> quantization theory, DP was either unknown,<br />

or not feasible as a practical optimization method for<br />

the problem at h<strong>and</strong>. When applied to <strong>grayscale</strong> <strong>images</strong>, with<br />

modern computers, it takes just a few seconds for the DP algorithm<br />

to obtain an optimally requantized image.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!