490 likes | 640 Views
Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302, India jay@cse.iitkgp.ernet.in. Image Processing in the block DCT Space. Processing in the spatial domain. Processing in the compressed domain. Motivations.
E N D
Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302, India jay@cse.iitkgp.ernet.in Image Processing in the block DCT Space
Motivations • Computation with reduced storage. • Avoid overhead of inverse and forward transform. • Exploit spectral factorization for improving the quality of result and speed of computation.
Typical Applications • Resizing. • Transcoding. • Enhancement. • Retrieval.
Different types of DCTs Let x (n), n=0,1,2,...N+1 be a sequence of length N+1. Then N-point type-I DCT is defined as: Note:- Type-I N-point DCT is defined over N+1 data points.
Different types of DCTs Similarly, x (n), n=0,1,2,...N, be a sequence of length N. Its N-point type-II DCT is defined as: Note:- Type-II N-point DCT is defined over N data points.
Subband DCT • DCT of a 2D images x(m,n) of size N x N Jung, Mitra and Mukherjee , IEEE CSVT (1996)
Low-low subband Sub-band approximation
Truncated approximation Generalized Truncated approximation C′ (k,l) = √(L.M).C(k,l), k,l=0,1,...., (N-1) = 0 otherwise Mukherjee and Mitra (2005), IEE VISP
Need for Analysis of the Relation between DCT blocks and sub-blocks • Direct conversion of DCT blocks of one size into another possible in the compressed domain itself • Saving of computation complexity and memory required • Decompression and re-compression steps reduced • DCT matrices being sparse number of multiplications and additions reduced • DCT blocks of different sizes required for different standards Jiang and Feng (2002), IEEE SP
Equations to find the transform matrices for composition and decomposition
EXAMPLES OF TRANSFORM MATRICES • A(2,4) = • 0.7071 0 0 0 0.7071 0 0 0 • 0.6407 0.2040 –0.0528 0.0182 -0.6407 0.2040 0.0528 0.0182 • 0 0.7071 0 0 0 0.7071 0 0 • -0.2250 0.5594 0.3629 –0.0690 0.225 0.5594 -0.3629 –0.0690 • 0 0 0.7071 0 0 0 0.7071 0 • 0.1503 –0.2492 0.5432 0.3468 –0.1503 -0.2492 -0.5432 0.3468 • 0 0 0 0.7071 0 0 0 -0.7071 • -0.1274 0.1964 –0.2654 0.6122 0.1274 0.1964 0.2654 0.6122 A(2,2)= 0.7071 0 0.7071 0 0.6533 0.2706 –0.6533 0.2706 0 0.7071 0 -0.7071 -0.2706 0.6533 0.2706 0.6533
Block Composition and Decomposition in 2D Composition of L x M adjacent N x N DCT blocks to a single LN x MN DCT block: Decomposition of LN x MN size DCT blockto L x M adjacent N x N DCT blocks
Type-I Symmetric Extension • For type-I DCT symmetric extension of N+1 sample take place in the following:
Type-II Symmetric Extension • For type-II DCT the symmetric extension of input sequence is done in the following manner:
Symmetric Convolution Let type –II symmetric extension of x(n) be denoted by and type –I symmetric extension of h(n) be denoted as . Symmetric convolution of x(n) and h(n) defined as follows:
h(n) y(n)=h(n)*x(n) x(n) • Symmetric convolution operation HI(k) XII(k) YII(k)=HI(k).XII(k) CONVOLUTION-MULTIPLICATION PROPERTY Martucci (1994), IEEE SP
Filtering Approaches • Based on Symmetrical Convolution • Linear filtering with DCT of filter matrices
1. Filtering with Symmetric Convolution Note:- JPEG compression scheme uses type-II DCT, transform domainfiltering directly gives the type-II DCT. Martucci and Mersereau, IEEE ASSSP 1993, Martucci, IEEE SP 1994, Mukherjee and Mitra LNCS 2006
BOUNDARY EFFECT IN BLOCK DCT DOMAIN Block Symmetric Convolution Linear Convolution
Computation with larger blocks: The BFCD filtering Algorithm Filtered image Larger DCT blocks Convolution Multiplication Filtering Operations Block Composition Original image Larger DCT blocks Original Image 8x8 blocks Block Decomposition Filtered Image 8x8 blocks ( Mukherjee and Mitra, LNCS-4338, ICVGIP 2006)
Exact Computation: The Overlapping BFCD (OBFCD) filtering Algorithm Filtered image Larger DCT blocks Convolution Multiplication Filtering Operations Block Composition Original image Larger DCT blocks Original Image 8x8 blocks Accept Central Blocks Block Decomposition Filtered Image 8x8 blocks ( Mukherjee and Mitra, LNCS-4338, ICVGIP 2006)
Filtered Images BFCD Algorithm (5x5) OBFCD Algorithm
Computational Cost: BFCD L(=M) Per Pixel Computation Equivalent Operations 2 28 M + 32 A 116 3 46.17 M + 53.33 A 191.84 4 71.5 M + 96 A 310.5
Computational Cost: OBFCD L(=M) Per Pixel Computation Equivalent Operations 3 103.88 M + 120 A 431.64 4 127.11 M + 170.62 A 552 5 144.92 M + 180 A 614.76
Removal of Blocking Artifacts Blocking artifacts Compressed with quality factor 10 Artifacts removed By filtering in DCT domain
Image Sharpening in DCT domain Peppers Lena
2. Linear Filtering in the block DCT domain Here, both filter matrices and input both in Type-II DCT space. Spatial Domain: DCT Domain: Merhav and Bhaskaran, HPL-95-56, 1996, Kresch and Merhav, IEEE IP 1999, Yim, IEEE CSVT 20004
Filtering in the block DCT domain • DCT convolution-multiplication property reduces the cost of filtering. • Type-I DCT of the filter and the Type-II DCT data are used. • To avoid boundary effect, Filtering is performed on the larger DCT block. • The filtering technique by Mukherjee and Mitra • Three separate steps: composition, filtering and decomposition of the DCT blocks. • Cost of filtering is high. • In this work, three operations are computed in a single step. ( Mukherjee and Mitra, LNCS-4338, ICVGIP 2006)
CMP Filtering: an improvement B_1 B0 B1 Input 1. Compose 2. Filter 3. Decompose Filter response Point wise Multiply Type-II DCT, B Type-I DCT of Filter Type-II DCT,Bf Bf-1 Bf 0 Bf 1 Steps 1-3: combined step
Filtering in the block DCT space 1. 2. 3. 4. 5.
Filtering in the block DCT space In 2-D:
Results: Gaussian filter Close to 300 dB 4x4 Note:- Sparse DCT block
Performance: Gaussian filtering Variation in Number of blocks No variation in PSNR and cost Cost varies with L and M
Results:Threshold variation Original Images Threshold =10-3 Threshold =10-4
Image Sharpening Sharpened Images
Observations • The proposed technique provides equivalent results as obtained by Linear convolution. • Complexity can be reduced by varying the threshold value. • The technique is comparable with existing techniques. • The technique is based on simple linear operations.