470 likes | 754 Vues
Integer-to-Integer Transform. 整 數 轉 換. Speaker: 丁 建 均. 國立台灣大學電信工程學研究所. Integer-to-Integer Transform. Speaker: 丁 建均. Outline:. (1) Introduction (2) Several popular integer transforms (3) Method 1: Prototype Matrix (4) Method 2: Lifting Scheme
E N D
Integer-to-Integer Transform 整 數 轉 換 Speaker: 丁 建 均 國立台灣大學電信工程學研究所
Integer-to-Integer Transform Speaker: 丁 建均 Outline: (1) Introduction (2) Several popular integer transforms (3) Method 1: Prototype Matrix (4) Method 2: Lifting Scheme (5) Method 3: Triangular Matrix Scheme (6) Method 4: Improvement Triangular Matrix Scheme (7) Examples (8) Conclusion and Future Work
Definition of the Integer Transform 原始定義: input, output 皆為整數的運算 修正後的定義: input, output 皆為 summations of powers of 2 例如 皆為 integer transform
The integer transform in the matrix form , ak = 0 or 1 or , C is an integer.
Example: is an integer transform is an integer transform 4-point Walsh (Hadamard) transform is not an integer transform
Advantages of the Integer Transform: We can use the fixed-point processor to implement it exactly. --- less computation time, --- less cost for implementation. However, many popular operations are non-integer transforms.
Discrete Fourier transform: Discrete cosine transform: RGB to YCbCr Transform Karhunen-Loeve transform Wavelet transform
How do we convert a non-integer transform into an integer transform?
最簡單的方法: truncation (以 RGB-to-YCbCr transform 為例) However, after truncation, the reversibility property is always lost.
In JPEG 2000 standard, the RGB-to-YCbCr transform is approximated as follows: is satisfied
Walsh (Hadamard) transform也是 integer transform 當中一個重要的例子 (Harmuth, 1970) Walsh transform
In Ohta’s work in 1980 (KLA transform, one of the color transform) In MPEG-4 (4-point DCT)
Question: How to convert other non-integer transforms into the integer transforms that satisfy the following requirements: (1) Integerization (2) Reversibility (3) Accuracy BA, B̃A-1 (or BA, B̃-1A-1) A, A-1: original non-integer transform pair, B, B̃:integer transform pair (4) Bit Constraint: The denominator (分母)2k should not be too large. (5) Less Complexity
Development of Integer Transforms: • (A) Prototype Matrix Method • (suitable for 2, 4, 8 and 16-point DCT, DST, DFT) • (B) Lifting Scheme • (suitable for 2k-point DCT, DST, DFT) • (C) Triangular Matrix Scheme • (suitable for any matrices, satisfies Goals 1 and 2) • (D) Improved Triangular Matrix Scheme • (suitable for any matrices, satisfies Goals 1 ~ 5)
Method 1: Prototype Matrix (模型矩陣) 基本精神:原來的 transform 長什麼樣子,integer transform 的「模型」就長什麼樣子 W. K. Cham, “Development of integer cosine transform by the principles of dynamic symmetry”, Proc. Inst. Elect. Eng., pt. 1, vol. 136, no. 4, pp. 276-282, Aug. 1989. S. C. Pei and J. J. Ding, “The integer Transforms analogous to discrete trigonometric transforms,” IEEE Trans. Signal Processing, vol. 48, no. 12, pp. 3345-3364, Dec. 2000.
8-Point DCT 0.9808 a1, 0.8315 a2, 0.5556 a3, 0.1951 a4, 0.9239 b1, 0.3827 b1. 6 parameters
Constraints for the 6 parameters , (1) , (大小順序和原來一樣) (2) BBT = D, D is a diagonal matrix (orthogonality) 這個式子看起來簡單,但是其實有56 個 constraints 但由於 DCT 的 prototype matrix 有特殊的對稱性 所以可以簡化成只有一個 constraint
Example: a1 = 5, a2 = 3, a3 = 2, a4 = 1, b1 = 3, b2 = 1
Other possible choices for the 6 parameters a1 = 8, a2 = 5, a3 = 3, a4 = 2, b1 = 5, b2 = 2 a1 = 10, a2 = 9, a3 = 6, a4 = 2, b1 = 17, b2 = 7 a1 = 45, a2 = 39, a3 = 26, a4 = 9, b1 = 46, b2 = 19
--- Disadvantage of the Prototype Matrix Method: Only suitable for the case of sinusoid type transforms (e.g., the discrete Fourier, cosine, sine, and Hartley Transforms). Only suitable for the case of N = 4, 6, 8, and 16. In other cases, the prototype becomes very complicated (too many unknowns and too many orthogonality constraints)
Method 2: Lifting Scheme Important Milestone Lifting scheme: Decomposing a 22 original matrix into 3 lifting matrices. W. Sweldens, “The lifting scheme: a construction of second generation wavelets,” Applied Comput. Harmon. Anal., vol. 3, no. 2, pp. 186-200, 1996. T. D. Tran, “The binDCT: fast multiplierless approximation of the DCT,” IEEE Signal Proc. Lett., vol. 7, no. 6, pp. 141-144, June 2000.
Decomposing a 2 2 matrix: or Constraint: det(B) = adbc = 1. a b (a-1)/c c (d-1)/c c d
為什麼要這麼做? 因為對角為 1 的三角矩陣,在經過 quantization 之後,一定還是 reversible
approximation where
Extension to the 2k-point case Many 2k-point discrete operations can be decomposed into (N/2)log2Nbutterflies Example: 8-point discrete Fourier transform (DFT) x[0] x[4] x[2] x[6] x[1] x[5] x[3] x[7] X[0] X[1] X[2] X[3] X[4] X[5] X[6] X[7] -1 1 w2 -1 -1 -1 1 w w2 w3 -1 -1 -1 1 w2 -1 -1 -1 -1 -1
In fact, each butterfly is a 22 transform. a x1 y1 b c x2 y2 d We can apply the lifting-scheme to integerize it.
Advantages: --- Easy for design (avoiding solving the N(N 1) orthogonality constraint) --- Flexibility: 1/2k1, 2/2k2, 3/2k3, are free to choose --- The fast algorithm of the original non-integer transform can be preserved. The 2k-point integer discrete Fourier, cosine, sine, Hartley, and Wavelet transforms can hence be derived (k can be any integer). S. Oraintara, Y. J. Chen, and T. Q. Nguyen, “Integer fast Fourier transform”, IEEE Trans. Signal Processing, vol. 50, no. 3, pp. 607-618, March 2002.
Method 3: Triangular Matrix Scheme Lifting scheme: 2 2 matrix Triangular matrix scheme: Generalizing the lifting scheme for N N matrices, where N can be any integer. P. Hao and Q. Shi., “Matrix factorizations for reversible integer mapping”, IEEE Trans. Signal Processing, vol. 49, no. 10, pp. 2314-2324, Oct. 2001. S. C. Pei and J. J. Ding, “Improved reversible integer transform”, ISCAS, pp. 1091-1094, May 2006.
Important discovery: “All” the reversible non-integer transforms (det(A)) 0) can be converted into the reversible integer transforms by the triangular matrix scheme.
Any matrix whose determinant is a power of 2 can be decomposed as follows: A = DLUS D: diagonal matrix L: lower triangular matrix, U: upper triangular matrix, S: One row lower triangular matrix
A = DLUS 和 lifting scheme 比較 (1) 把 變成下三角矩陣 (2) 把 變成上三角矩陣 (3) 多了 diagonal matrix D 使得 det(A) 不再限定為 1
Advantages of Triangular Matrix Decomposition: -- The inverse of a triangular matrix is easy to compute. -- The inverse of an integertriangular matrix is also aninteger triangular matrix.
A = D L U S original transform quantization integer transform B = D L1U1S1 inverse integer transform B-1 = S1-1U1-1L1-1D-1
If det(A) 2k AA The performance of a discrete transform remains unchanged after multiplied by a constant.
Method 4: Further Improvements of the Triangular Matrix Scheme (1) Accuracy Problem A = D L U S quantization B = D L1U1S1 誤差: Entries of triangular matrices 的值越小,誤差越小
Decompose PAQ instead of A row permutationmatrix column permutationmatrix PAQ = D L U S PBQ = D L1U1S1 B = PTD L1U1S1QT Try to findP and Q to minimize the entries of L, U, and S
There are (N! )2 ways to find P and Q A systematical way to determine P and Q was proposed in S. C. Pei and J. J. Ding, “Improved reversible integer transform”, ISCAS, pp. 1091-1094, May 2006.
(2) Complexity Problem 乍看之下,變成三個 triangular matrices 好像會增加運算時間,其實不然 Upper triangular matrix 和 lower triangular matrix 可以同時 implemented.
(3) Further Generalization 對角線其實不必都等於 1 Why? 這樣的運算其實可以變成可逆的整數轉換 forward inverse
x和 y之間有一對一的關係 以此類推, y = ax, a 1 必定也可以變成可逆轉換
PAQ = D L U S |dn| 1, |un| 1,
這樣的方法,被稱作 scaled lifting scheme 或 scaled triangular matrix scheme S. C. Pei and J. J. Ding, “Scaled lifting scheme and generalized reversible integer transform,” ISCAS, pp. 3203-3206, May2007.
Examples Integer Color Transform RGB to YCbCr Transform x1[1] = 4B, x1[2] = R, x1[3] = 2G, Y = y1[3]/2, Cr = y1[2], Cb = y1[1]/4.
NRMSE (normalized root mean square error) of the RGB-to-YCbCr transform in JPEG 2000: 20.83% NRMSE of the proposed RGB-to-YCbCr transform: 0.1687% S. C. Pei and J. J. Ding, “Reversible integer color transform,” IEEE Trans. Image Processing, vol. 16, no. 6, pp. 1686-1690, June 2007. S. C. Pei and J. J. Ding, “Improved reversible integer-to-integer color transforms,” IEEE International Conference on Image Processing, Nov. 2009.
Conclusion and Future Work The integer transform can apparently improve the efficiency of digital signal processing and is important in VLSI design. Future works: (1) Faster design algorithm to find the optimal integer transform. (2) Applied to the multi-channel filter system (Since it can be expressed by a matrix) (3) Pseudo-reversible integer transform (the case of det(A)=0) http://djj.ee.ntu.edu.tw/Integer.ppt