You get a bonus - 1 coin for daily activity. Now you have 1 coin

6.3. PROCESSING OF QUANTIZED VALUES

Lecture



Numbers describing images (for example, representing brightness or color coordinates) are usually entered into a digital computer in the form of integer code combinations corresponding to sample quantization levels. Thus, the brightness of a single-color image is usually measured using a linear integer scale bounded by the numbers 0 (black level) and 255 (white level). These integer code combinations, however, should not be construed as arithmetic values. Before processing in the machine, the code combinations should be converted to real decimal numbers corresponding to the quantization level. If this is not done, then you can get completely wrong results. So, if code combinations — level numbers — change non-monotonously along the grayscale, they cannot be used for processing at all. Now consider what happens if these combinations change monotonously and are processed in a digital computer without conversion to decimal numbers - the values ​​of quantization levels.

There are two basic forms of representing numbers in digital computers: as an integer and as a real number. Integers vary from 0 to some maximum value. So, in a 16-bit minicomputer, the largest positive integer is 32,768 ( 6.3.  PROCESSING OF QUANTIZED VALUES ). If the result of an arithmetic operation is defined as an integer, and the result is a fractional number, then the fractional part is simply discarded. The ratio of 8/3, for example, will be represented as an integer 2 without decimal point and signs after it. If the processed values ​​are defined as real numbers, then the fractional part of the total of the operation will be saved and contain as many characters as it allows to obtain the capacity of the machine. The ratio of real numbers 8./3. will look like 2.66 ... 66.

6.3.  PROCESSING OF QUANTIZED VALUES

Fig. 6.3.1. Methods for converting quantized signals: a - elementwise transformation of continuous signals; b - conversion of quantized signals represented by real numbers; c - conversion of quantized signals when replacing code combinations with real numbers.

In fig. 6.3.1 for comparison, three methods of signal processing are presented. In fig. 6.3.1, and a continuous scalar 6.3.  PROCESSING OF QUANTIZED VALUES varying in the interval 6.3.  PROCESSING OF QUANTIZED VALUES subject to conversion 6.3.  PROCESSING OF QUANTIZED VALUES resulting in a continuous value

6.3.  PROCESSING OF QUANTIZED VALUES . (6.3.1)

In fig. 6.3.1, b shows the processing scheme in which the scalar value 6.3.  PROCESSING OF QUANTIZED VALUES before processing is subjected to uniform quantization and coding. Integer values ​​of code combinations are determined by the formula

6.3.  PROCESSING OF QUANTIZED VALUES , (6.3.2)

where is the symbol 6.3.  PROCESSING OF QUANTIZED VALUES , denotes rounding the argument to the nearest integer. Code 6.3.  PROCESSING OF QUANTIZED VALUES , defined as an integer, converted to a real number 6.3.  PROCESSING OF QUANTIZED VALUES according to the ratio

6.3.  PROCESSING OF QUANTIZED VALUES , (6.3.3а)

or, which is the same,

6.3.  PROCESSING OF QUANTIZED VALUES . (6.3.3b)

Next with a quantized count 6.3.  PROCESSING OF QUANTIZED VALUES the necessary operation is performed and a quantized output signal is obtained

6.3.  PROCESSING OF QUANTIZED VALUES , (6.3.4)

different from continuous output 6.3.  PROCESSING OF QUANTIZED VALUES , appearing in equality (6.3.1), only because of the quantization error of the initial value.

Unfortunately, often the processing of quantized signals is performed incorrectly - according to the scheme shown in Fig. 6.3.1, c. Code combination 6.3.  PROCESSING OF QUANTIZED VALUES considered as an integer, converted to a real number 6.3.  PROCESSING OF QUANTIZED VALUES accepting values 6.3.  PROCESSING OF QUANTIZED VALUES . After that, according to the formula

6.3.  PROCESSING OF QUANTIZED VALUES (6.3.5)

output values ​​are calculated 6.3.  PROCESSING OF QUANTIZED VALUES defined as real numbers. In general 6.3.  PROCESSING OF QUANTIZED VALUES has a whole and fractional part. If for example 6.3.  PROCESSING OF QUANTIZED VALUES then after the conversion consisting in extracting the square root to the fifth digit, the output signal is obtained 6.3.  PROCESSING OF QUANTIZED VALUES . It is clear, of course, that the quantization errors of the input sample 6.3.  PROCESSING OF QUANTIZED VALUES will appear in the output countdown 6.3.  PROCESSING OF QUANTIZED VALUES . However, there are more serious difficulties, if we assume that 6.3.  PROCESSING OF QUANTIZED VALUES can serve as a relatively good approximation of a continuous output signal 6.3.  PROCESSING OF QUANTIZED VALUES . Suppose that the number of quantization levels is large enough and therefore

6.3.  PROCESSING OF QUANTIZED VALUES . (6.3.6)

Then the output will be equal to

6.3.  PROCESSING OF QUANTIZED VALUES , (6.3.7)

where are the constants

6.3.  PROCESSING OF QUANTIZED VALUES , (6.3.8a)

6.3.  PROCESSING OF QUANTIZED VALUES . (6.3.8b)

If the conversion 6.3.  PROCESSING OF QUANTIZED VALUES linearly then

6.3.  PROCESSING OF QUANTIZED VALUES (6.3.9)

and

6.3.  PROCESSING OF QUANTIZED VALUES . (6.3.10)

Thus, the output signal of the system under consideration (Fig. 6.3.1, c) will be a good approximation of the continuous output signal of a system with analog processing (Fig. 6.3: 1, a) if the conversion performed in the system is linear. On the other hand, if this transformation is non-linear, then the approximation of one signal by another is usually very bad. So, for example, usually the logarithm of a quantized variable 6.3.  PROCESSING OF QUANTIZED VALUES differs significantly from the logarithm of a real number 6.3.  PROCESSING OF QUANTIZED VALUES formed from a code combination that specifies the number of the quantization level for 6.3.  PROCESSING OF QUANTIZED VALUES .


Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Digital image processing

Terms: Digital image processing