220 likes | 483 Views
Side match vector quantization. preface. To compress image, using VQ, usual method is to encode blocks indepentently. However, there are many interblock correlation. How to use information of adjacent block to further reduce the bit rate. SMVQ. U. L. X.
E N D
preface • To compress image, using VQ, usual method is to encode blocks indepentently. • However, there are many interblock correlation. How to use information of adjacent block to further reduce the bit rate.
SMVQ U L X Colored blocks ,U and L, are called seed blocks. The remain block ,X, called residual block, are recovered by seed blocks.
SMVQ • U and L are encoded blocks. • We assume X1= X2=U14 X3=U15 X4=U16 X5=L8 X9=L12 X13=L16We find the nearest codevector to recover X. • The compression rate is very high, because only fist column and first row need to be encoded, the rest of blocks are recovered by side match. • However, by side match method, the quality of image is worst and worst, called derailment.
Modify SMVQ to improve quality • Chang original seed blocks. More seed blocks or “cross” blocks. Then residual blocks can be recovered by comparing with sides of its upper, right, down, and left blocks. • We recover every residual blocks in advance. Compare with corresponding blocks in original image. When its distortion is over predetermined threshold, then encode the block in usual way.
CSMVQvariable-rate SMVQ • The idea is to divide blocks into two groups by its variance, namely “smooth” and “variation”. • If the adjacent blocks are “smooth”, we find nearest hs codewords. Then find the optimal codevector out of the hs codewords.If only one adjacent blocks are smooth, find the nearest 2*hs.If all adjancent blocks are “variation”, find the nearest 4*hs.
CSMVQ • Because CSMBVQ need to process state codebook again, encoding speed lowers down. • It’s very rough to assert blocks “smooth” or “variation” only by its variance.
Pattern-based SMVQ • Use detection mask to detect if there is an edge cross the block.We first assume block 4x4. Z =
Pattern-based SMVQ NS = EW = ( Vertical ) ( Horizontal ) NW = ES = 45o 135o
PSMVQ • PSMVQ train two codebooks by above detection method. One is trained by edge block, the other is trained by smooth. • In PSMVQ, “pattern” is a set of blocks. For example, 2x2 or 4x4 blocks form a pattern.
PSMVQ encoding steps • By detection mask, class all blocks into two groups – edge or smooth.“1” stand for edge.“0” stand for smooth.Then, build up an edge map (one bit for one block)
PSMVQ encoding steps 2 define the order in which block is chosen. Pattern size:2x2 Pattern size:4x4 Pattern size:8x8
PSMVQ encoding steps The smaller the number, the high priority is. To choose how many seed blocks for one pattern depends on the demand of image quality. The more seed blocks is , the better the image quality is , but longer the compression code is .
PSMVQ encoding steps 3 According to edge map, adjust the priority order in pattern. For example, one blocks in pattern belongs to smooth block. Then the region’s priority need to plus pattern.
PSMVQ encoding steps 4 Begin coding. After Choosing seed blocks, recover the residual blocks adjacent to seed blocks in order by SMVQ. After all block are encoded finished, test the quality if it is acceptable. If not, continuing adding seed blocks until it is acceptable. Last, record the number of seed block being used for decoding in the future.
PSMVQ decoding steps • Decompress edge map. Adjust the order which pattern is chosen according to edge map. • According the number of seed blocks, decode seed blocks according its index. • Then the rest of residual blocks are decoded by SMVQ according to the number of adjacent blocks and the order in step 1. After all residual blocks are reproduced, the decoding is complete.