Image Compression Coding Schemes

96
Module 3 Image Compression (continued…) Resmi N.G. Reference: Digital Image Processing 2 nd Edition Rafael C. Gonzalez Richard E. Woods

description

CS 804B, M3_2, Lecture Notes

Transcript of Image Compression Coding Schemes

Resmi N.G. Reference: Digital Image Processing 2nd Edition Rafael C. Gonzalez Richard E. Woods Error-Free Compression Variable-Length Coding Huffman Coding Other Near Optimal Variable Length Codes Arithmetic Coding LZW Coding Bit-Plane Coding Bit-Plane Decomposition Constant Area Coding One-Dimensional Run-Length Coding Two-Dimensional Run-Length Coding Lossless Predictive Coding Lossy Compression Lossy Predictive Coding 3/24/2012CS 04 804B Image Processing Module 32 Error-Free Compression Devise an alternative representation of the image in which its interpixel redundancies are reduced. Codetherepresentationtoeliminatethecoding redundancies. 3/24/2012CS 04 804B Image Processing Module 33 Error-Free Compression Variable-Length Coding Huffman Coding Other Near Optimal Variable Length Codes Arithmetic Coding LZW Coding Bit-Plane Coding Bit-Plane Decomposition Constant Area Coding One-Dimensional Run-Length Coding Two-Dimensional Run-Length Coding Lossless Predictive Coding Lossy Compression Lossy Predictive Coding 3/24/2012CS 04 804B Image Processing Module 34 Variable-Length Coding Reduces only coding redundancy. Assigntheshortestpossiblecodewordstothemost probable graylevels. 3/24/2012CS 04 804B Image Processing Module 35 Huffman Coding Yieldsthesmallestpossiblenumberofcodesymbolsper source symbol. Createsaseriesofsourcereductionsbyorderingthe probabilities of the symbols. Combinesthelowestprobabilitysymbolsintoasingle symbol that replaces them in the next source reduction. Codeseachreducedsource,startingwiththesmallest source and working back to the original source. Thisoperationisrepeatedforeachreducedsourceuntil the original source is reached.3/24/2012CS 04 804B Image Processing Module 36 3/24/2012CS 04 804B Image Processing Module 37 3/24/2012CS 04 804B Image Processing Module 38 Huffmansprocedurecreatesoptimalcodewhichisan instantaneous uniquely decodable block code. Blockcodeeachsourcesymbolismappedintoafixed sequence of code symbols. Instantaneouseachcodewordcanbedecodedwithout referencing succeeding symbols. Uniquelydecodableanystringofcodesymbolscanbe coded in only one way. 3/24/2012CS 04 804B Image Processing Module 39 Arithmetic Coding Generates non-block codes. An entire sequence of source symbols is assigned a single arithmetic codeword. The codeword defines an interval of real numbers between 0 and 1. Asthenumberofsymbolsinthemessageincreases,the intervalusedtorepresentitbecomessmallerandthe numberofinformationunitsrequiredtorepresentthe interval becomes larger. 3/24/2012CS 04 804B Image Processing Module 310 3/24/2012CS 04 804B Image Processing Module 311 3/24/2012CS 04 804B Image Processing Module 312 Error-Free Compression Variable-Length Coding Huffman Coding Other Near Optimal Variable Length Codes Arithmetic Coding LZW Coding Bit-Plane Coding Bit-Plane Decomposition Constant Area Coding One-Dimensional Run-Length Coding Two-Dimensional Run-Length Coding Lossless Predictive Coding Lossy Compression Lossy Predictive Coding 3/24/2012CS 04 804B Image Processing Module 313 Lempel-Ziv-Welch (LZW) Coding Assignsfixedlengthcodewordstovariablelength sequences of source symbols. Requiresnoaprioriknowledgeoftheprobabilityof occurrence of the symbols to be encoded. Acodebookordictionarycontainingthesourcesymbols tobecodedisconstructedwhilethedataarebeing encoded. AnLZWdecoderbuildsanidenticaldecompression dictionary during decoding. 3/24/2012CS 04 804B Image Processing Module 314 3/24/2012CS 04 804B Image Processing Module 315 3/24/2012CS 04 804B Image Processing Module 316 Error-Free Compression Variable-Length Coding Huffman Coding Other Near Optimal Variable Length Codes Arithmetic Coding LZW Coding Bit-Plane Coding Bit-Plane Decomposition Constant Area Coding One-Dimensional Run-Length Coding Two-Dimensional Run-Length Coding Lossless Predictive Coding Lossy Compression Lossy Predictive Coding 3/24/2012CS 04 804B Image Processing Module 317 Bit-Plane Coding Reduces interpixel redundancies. Decomposesamultilevelimageintoaseriesofbinary images. Compresseseachimageusingoneofthebinary compression methods. 3/24/2012CS 04 804B Image Processing Module 318 1 2 1 01 2 1 02 2 .... 2 2m mm mm bit gray scaleimagea a a a + + + +Constant Area Coding Usespecialcodewordstoidentifylargeareasof contiguous 1s or 0s. Image is divided into blocks of size pxq pixels, which are classified as all white, all black or mixed intensity. Mostprobableorfrequentlyoccurringcategoryis assigned1-bitcodeword0,theothertwoareassigned2-bit codes 10 and 11. 3/24/2012CS 04 804B Image Processing Module 319 One-dimensional run-length coding Representseachrowofanimageorbitplanebya sequence of lengths that describe successive runs of black and white pixels. Code each contiguous group of 0s or 1s encountered in a lefttorightscanofarowbyitslengthandspecifythe value of the first run of each row. Blackandwhiterunlengthsmaybecodedseparately using variable-length codes. 3/24/2012CS 04 804B Image Processing Module 320 Error-Free Compression Variable-Length Coding Huffman Coding Other Near Optimal Variable Length Codes Arithmetic Coding LZW Coding Bit-Plane Coding Bit-Plane Decomposition Constant Area Coding One-Dimensional Run-Length Coding Two-Dimensional Run-Length Coding Lossless Predictive Coding Lossy Compression Lossy Predictive Coding 3/24/2012CS 04 804B Image Processing Module 321 Lossless Predictive Coding 3/24/2012CS 04 804B Image Processing Module 322 Basedoneliminatingtheinterpixelredundanciesof closelyspacedpixelsbyextractingandcodingonlythe new information in each pixel. The new information of a pixel is defined as the difference between the actual and predicted value of that pixel. Systemconsistsofanencoderandadecodereach containing an identical predictor. The prediction error is coded using variable-length code. 3/24/2012CS 04 804B Image Processing Module 323 n n ne f f.= Thedecoderreconstructstheerrorfromthereceived variable-lengthcodewordsandperformstheinverse operation. Prediction is usually formed by a linear combination of m previous pixels. In 1-D linear predictive coding, 3/24/2012CS 04 804B Image Processing Module 324 n n nf e f.= +1mi n i nif round f o.= (= ( 1( , ) ( , )mi nif xy round f xy i o.= (= ( Error-Free Compression Variable-Length Coding Huffman Coding Other Near Optimal Variable Length Codes Arithmetic Coding LZW Coding Bit-Plane Coding Bit-Plane Decomposition Constant Area Coding One-Dimensional Run-Length Coding Two-Dimensional Run-Length Coding Lossless Predictive Coding Lossy Compression Lossy Predictive Coding 3/24/2012CS 04 804B Image Processing Module 325 Error-Free Compression Variable-Length Coding Huffman Coding Other Near Optimal Variable Length Codes Arithmetic Coding LZW Coding Bit-Plane Coding Bit-Plane Decomposition Constant Area Coding One-Dimensional Run-Length Coding Two-Dimensional Run-Length Coding Lossless Predictive Coding Lossy Compression Lossy Predictive Coding 3/24/2012CS 04 804B Image Processing Module 326 Lossy Predictive Coding 3/24/2012CS 04 804B Image Processing Module 327 Lossy predictive coding Quantizer absorbs the nearest-integer function of the error-freeencoderandisinsertedbetweenthesymbolencoder and the point at which the prediction error is formed. It maps prediction error into a limited range of outputs and establishestheamountofcompressionanddistortion associated with lossy predictive coding. The lossy encoders predictor is placed within a feedback loop, where its input , is generated as a function of past predictions and the corresponding quantized errors. 3/24/2012CS 04 804B Image Processing Module 328 .nf Output of the decoder is also given by Optimum predictorsminimize the mean square prediction error, 3/24/2012CS 04 804B Image Processing Module 329 1n n nmi n i nif e ff round f o..== + (= ( . .n n nf e f.= +. .221{ } ,n n nmn n n n n n i n i niEe E f f subject totheconstraintsf e f e f f and f f o.. . .= (= ` ( )= + ~ + = =. . Optimumquantizersminimizethemeansquare quantization error,. 3/24/2012CS 04 804B Image Processing Module 330 | |{ }2iE s t Transform Coding Transform Selection Subimage Size Selection Bit Allocation Zonal Coding Implementation Threshold Coding Implementation Wavelet Coding Wavelet Selection Decomposition Level Selection Quantizer Design Image Compression Standards Binary Image Compression Standards One Dimensional Compression Two Dimensional Compression 3/24/2012CS 04 804B Image Processing Module 331 Transform Coding 3/24/2012CS 04 804B Image Processing Module 332 Predictivecodingdirectlyoperatesonthepixelsofan image (spatial domain method). Transform coding based on modifying the transform of an image. Areversiblelineartransform(eg;Fouriertransform)is used to map the image into a set of transform coefficients. These coefficients are then quantized and coded. 3/24/2012CS 04 804B Image Processing Module 333 Transform Coding SubimagedecompositionNxNimageisdecomposed into subimages of size nxn. TransformationThisprocessdecorrelatesthepixelsof each subimageor packs as much information as possible into the smallest number of coefficients. QuantizationSelectivelyeliminatesormorecoarsely quantizes the coefficients that carry the least information. Encoding Codes the quantized coefficients. 3/24/2012CS 04 804B Image Processing Module 334 Transform Selection Transform is selected based on the amount of reconstruction errorthatcanbetoleratedandtheavailablecomputational resources. The forward discrete transform T(u,v) of an image f(x,y) of size NxN can be expressed as, 3/24/2012CS 04 804B Image Processing Module 335 1 10 0( , ) ( , ) ( , , , ), 0,1,..., 1N Nx yTuv f xygxy uvfor uv N = === The inverse discrete transform f(x,y) can be obtained as, g(x,y,u,v)and h(x,y,u,v) are called the forward and inverse transformationkernelsrespectivelyandarealsocalledas basis functions or basis images. T(u,v)foru,v=0,1,N-1arecalledthetransform coefficients. 3/24/2012CS 04 804B Image Processing Module 336 1 10 0( , ) ( , ) ( , , , ), 0,1,..., 1N Nu vf xy Tuvhxy uvforxy N = === The forward kernel g(x,y,u,v) is said to be separable if g(x,y,u,v)= g1(x,u)g2(y,v) The kernel is symmetric if g1 is functionally equal to g2. The same applies for inverse kernel. A2-Dtransformwithaseparablekernelcanbecomputed usingrow-columnorcolumn-rowpassesofthe corresponding 1-D transform. Theforwardandinversekernelsdeterminethetypeof transformthatiscomputedandtheoverallcomputational complexity and reconstruction error of the transform coding system. 3/24/2012CS 04 804B Image Processing Module 337 Most well-known transform-pair (DFT) Walsh-Hadamard transform-pair 3/24/2012CS 04 804B Image Processing Module 338 2 ( )22 ( )1( , , , )( , , , )j ux vyNj ux vyNgxy u v eNhxy u v ett ++==10( ) ( ) ( ) ( )( , , , ) ( , , , ) ( 1)2 .mi i i iib x p u b y p vmgxy u v hxy u vwhere N=+ ( = = = The summation in the exponent is performed in modulo 2 arithmetic and bk(z) is the kth bit(from right to left) in the binary representation of z. 3/24/2012CS 04 804B Image Processing Module 339 2 1 00 11 1 22 2 31 1 03, 6 (110 ),( ) 1, ( ) 1, ( ) 0( ) ( )( ) ( ) ( )( ) ( ) ( ):( ) ( ) ( )mm mm mmIf m z inbinaryb z b z b zp u b up u b u b up u b u b up u b u b u = == = === += += + Discrete cosine transform 3/24/2012CS 04 804B Image Processing Module 340 ( , , , ) ( , , , )(2 1) (2 1)( ) ( ) cos cos2 210( )21, 2,... 1gxy uv hxy uvx u y vu vN Nfor uNwhere ufor u NNt to oo=+ + ((= (( == = 3/24/2012CS 04 804B Image Processing Module 341 1 10 01 10 0( , ) ( , ) ( , , , ), 0,1,..., 1( , )(0, 0, , ) (0,1, , ) ... (0, 1, , )(1, 0, , ) (1,1, , ) ... (1, 1, , ): : : :( 1, 0, , ) (n nu vn nuvu vuvConsider a sub imageof size nxnf xy Tuvhxy uvforxy nTuvh uv h uv h n uvh uv h uv h n uvhn uv hn = = = === ==F HH1,1, , ) ... ( 1, 1, , ) uv hn n uv ( ( ( ( ( ThematrixFwithpixelsofinputsub-imageisalinear combinationofn2matricesofsizenxn,Huvforu,v= 0,1,n-1. These n2 matrices of size nxn are the basis images and the associated T(u,v) are the expansion coefficients. Fcanbecompressedbytruncatingthetransform coefficients(settingtransformcoefficientstozerobased on a specified truncation criterion). Forthispurpose,wedefineatransformcoefficient masking function. 3/24/2012CS 04 804B Image Processing Module 342 3/24/2012CS 04 804B Image Processing Module 343 1 10 00 ( , )( , )1( , ) ( , )n nuvu vif Tuvstaisfies a specified truncationuvotherwiseApproximationof fromthetruncated expansionuv Tuv .= == =FF H3/24/2012CS 04 804B Image Processing Module 344 ( )221 1 1 10 0 0 021 10 012( , )0( , ) ( , ) ( , )( , ) 1 ( , )rmsn n n nuv uvu v u vn nuvu vnT u vvThe meansquareerror between subimage andapproximation ise EE Tuv uv TuvE Tuv uvo.. = = = = = == = ` ) = ` ) = ` )= FFF FH HH( )101 ( , )nuuv = The total mean-square approximation error is thus the sum ofthevariancesofthediscardedtransformcoefficients (coefficients for which (u,v) = 0 so that 1- (u,v) = 1). Themean-squareerroroftheN/n2subimagesofanNxN imageareidentical.Thus,themean-squareerrorofthe NxN image equals that of a single subimage. 3/24/2012CS 04 804B Image Processing Module 345 Subimage size selection Subdivide the image so that the correlation or redundancy betweenadjacentsubimagesisreducedtoaspecified acceptable level. Bit Allocation Theretainedcoefficientsaremostlyselectedonthebasis ofmaximumvariance(zonalcoding)oronthebasisof maximum magnitude (threshold coding). Theoverallprocessoftruncating,quantizingandcoding thecoefficientsofatransformedsubimageiscalledbit allocation. 3/24/2012CS 04 804B Image Processing Module 346 Zonal Coding Implementation The transform coefficients of maximum variance carry the mostimageinformationandmustberetainedinthe coding process. ZonalsamplingMultiplyingeachtransformed coefficientT(u,v)withthecorrespondingelementina zonal mask (1 for locations with maximum variance and 0 for all other locations). Coefficientsofmaximumvarianceareusuallylocated around the origin of an image transform. 3/24/2012CS 04 804B Image Processing Module 347 Thecoefficientsretainedduringzonalcodingprocess must be quantized and coded. Mostly,thecoefficientsareallocatedthesamenumberof bits(coefficientsaregenerallynormalizedbytheir standarddeviationsandareuniformlyquantized)ora fixed number of bits is distributed among them unequally (a quantizer is designed for each coefficient). Theretainedcoefficients,selectedonthebasisof maximumvariance,areallocatedbitsproportionaltothe logarithm of the coefficient variances. 3/24/2012CS 04 804B Image Processing Module 348 Threshold Coding Implementation Zonal coding uses single fixed mask for all subimages. Threshold coding Adaptive transform coding approach. Basedontheconceptthatforanysubimage,thetransform coefficientsofthelargestmagnitudemakethemost significant contribution to reconstructed subimage quality. Thelocationoftransformcoefficientsretainedforeach subimage therefore varies fromone subimage to another. Theelementsof(u,v)T(u,v)arereorederedtoforma1-D run length coded sequence. 3/24/2012CS 04 804B Image Processing Module 349 3/24/2012CS 04 804B Image Processing Module 350 Three ways to threshold a transformed subimage: AsingleglobalthresholdtoallsubimagesLevelof compressionvariesfromimagetoimagedependingonthe number of coefficients that exceed the threshold. Adifferentthresholdforeachsubimage(calledN-largest coding) Same number of coefficients are discarded for each subimage. The code rate is therefore constant and known in advance. Thresholdasafunctionofthelocationofeachcoefficient within the subimage Results in variable code rate. 3/24/2012CS 04 804B Image Processing Module 351 Inthethirdapproach,thresholdingandquantizationcan be combined by replacing (u,v)T(u,v) in with whereisathresholdedandquantized approximationofT(u,v)andZ(u,v)isanelementofthe transform normalization array Z. 3/24/2012CS 04 804B Image Processing Module 352 1 10 0( , ) ( , )n nuvu vuv Tuv .= ==F H( , )( , )( , )Tu vTu v roundZu v. (= ( ( , ) Tu v. Anormalizedsubimagetransform,mustbe denormalizedbymultipyingwithZ(u,v)beforeitis inversetransformedtoobtaintheapproximationof subimage f(x,y). 3/24/2012CS 04 804B Image Processing Module 353 ( , ) Tu v.( , ) ( , ) ( , ) Tu v Tu v Zu v.=.3/24/2012CS 04 804B Image Processing Module 354 Transform Coding Transform Selection Subimage Size Selection Bit Allocation Zonal Coding Implementation Threshold Coding Implementation Wavelet Coding Wavelet Selection Decomposition Level Selection Quantizer Design Image Compression Standards Binary Image Compression Standards One Dimensional Compression Two Dimensional Compression 3/24/2012CS 04 804B Image Processing Module 355 Wavelet Coding 3/24/2012CS 04 804B Image Processing Module 356 Based on the idea that the coefficients of a transform that decorrelatesthepixelsofanimagecanbecodedmore efficiently than the original pixels themselves. If the transforms basis functions(here, wavelets) can pack mostoftheinformationintoasmallnumberof coefficients, the remaining coefficients can be truncated to zero. Discretewavelettransformoftheimageiscomputed whichconvertsalargeportionoftheoriginalimageto vertical,horizontalanddiagonaldecomposition coefficients. 3/24/2012CS 04 804B Image Processing Module 357 Many of the computed coefficients carry little information andhencecanbequantizedandcodedtominimizethe intercoefficient and coding redundancy. Losslesscodingmethods(Run-length,Huffman, Arithmetic, and Bit-plane coding) can be used for the final symbol coding process. Maindifferencebetweenwaveletcodingandtransform codingWaveletcodingdoesnotrequiresubdivisionof original image. Less reconstruction error. 3/24/2012CS 04 804B Image Processing Module 358 Wavelet selection MostwidelyusedareDaubechieswaveletsandbiorthogonal wavelets. Decomposition level selection Thenumberofoperationsinthecomputationoftheforward andinversetransformsincreaseswiththenumberof decomposition levels. Quantizer design An enlarged quantization interval around zero Adaptingthesizeofquantizationintervalfromscaleto scale. Theselectedintervalsaretransmittedtodecoderwiththe encoded image bit stream. 3/24/2012CS 04 804B Image Processing Module 359 Transform Coding Transform Selection Subimage Size Selection Bit Allocation Zonal Coding Implementation Threshold Coding Implementation Wavelet Coding Wavelet Selection Decomposition Level Selection Quantizer Design Image Compression Standards Binary Image Compression Standards One Dimensional Compression Two Dimensional Compression 3/24/2012CS 04 804B Image Processing Module 360 International Standardization Organization (ISO) ConsultativeCommitteeoftheInternationalTelephone and Telegraph (CCITT) Binary and Continuous-tone image compression Still-frame and Video(Sequential frame) applications 3/24/2012CS 04 804B Image Processing Module 361 Transform Coding Transform Selection Subimage Size Selection Bit Allocation Zonal Coding Implementation Threshold Coding Implementation Wavelet Coding Wavelet Selection Decomposition Level Selection Quantizer Design Image Compression Standards Binary Image Compression Standards One Dimensional Compression Two Dimensional Compression 3/24/2012CS 04 804B Image Processing Module 362 Continuous Tone Still Image Compression Standards JPEG Lossy Baseline Coding System Extended Coding System Lossless Independent Coding System JPEG 2000 Video Compression Standards 3/24/2012CS 04 804B Image Processing Module 363 Continuous Tone Still Image Compression Standards Based principally on lossy transform coding techniques. Original DCT-based JPEG standard Wavelet-based JPEG 2000 standard JPEG-LS standard 3/24/2012CS 04 804B Image Processing Module 364 JPEG Three different coding systems: Lossy baseline coding system based on DCT Extended coding system for higher precision Losslessindependentcodingsystemforreversible compression 3/24/2012CS 04 804B Image Processing Module 365 Baseline coding system Input and output data precision is limited to 8 bits. Quantized DCT values are restricted to 11 bits. Compression is performed in 3 steps: DCT computation Quantization Variable-length code assignment 3/24/2012CS 04 804B Image Processing Module 366 Theimageisfirstsub-dividedintopixelblocksofsize 8x8, which are processed from left to right, top to bottom. Thepixelsineachblockarelevelshiftedbysubtracting the quantity 2n-1, where 2n is the maximum number of gray levels. 2D-DCToftheblockisthencomputed,quantizedand reorderedtoforma1D-sequenceofquantized coefficients. 3/24/2012CS 04 804B Image Processing Module 367 3/24/2012CS 04 804B Image Processing Module 368 The original 8x8 sub-image 3/24/2012CS 04 804B Image Processing Module 369 Level shifted subimage (subtract 27 from each pixel) 3/24/2012CS 04 804B Image Processing Module 370 Apply forward DCT 3/24/2012CS 04 804B Image Processing Module 371 Normalization array Z 3/24/2012CS 04 804B Image Processing Module 372 ( , )( , ) ;( , )(0, 0) 415(0, 0) 26(0, 0) 16Tu vTu v roundZu vTT round roundZ.. (= ( ( (= = = ( ( 3/24/2012CS 04 804B Image Processing Module 373 The coefficients are then reordered in a zig-zag pattern, resulting in a 1D coefficient sequence. ThedefaultJPEGcodeisthenconstructedforthis sequence. First,thedifferencebetweencurrentDCcoefficient andthatofthepreviouslyencodedsubimageis computed. 3/24/2012CS 04 804B Image Processing Module 374 3/24/2012CS 04 804B Image Processing Module 375 3/24/2012CS 04 804B Image Processing Module 376 ForaDCdifferencecategoryK,anadditionalKbitsare needed and are computed aseither the K LSBsofthe positive difference or the K LSBs of the negative difference minus 1. Example: DC difference =-9 DC Difference category = 4 (ie; K = 4) DC Code = 101 (requires additional 4 bits) 9 : 1001 -9: 0110 + 0001 = 0111 0111 1 = 0110 (K LSBs of 0110) Therefore, the complete code is 1010110. 3/24/2012CS 04 804B Image Processing Module 377 3/24/2012CS 04 804B Image Processing Module 378 Decoder regenerates the normalized transform coefficients. 3/24/2012CS 04 804B Image Processing Module 379 : ( , ) ( , ) ( , )(0, 0) (0, 0) (0, 0) ( 26)(16) 416Denormalization Tu v Tu vZu vT T Z..== = = ..3/24/2012CS 04 804B Image Processing Module 380 InverseDCTofdenormalizedarraygivescompletely reconstructed subimage. 3/24/2012CS 04 804B Image Processing Module 381 Level shift each inverse transformed pixel by adding 27. 3/24/2012CS 04 804B Image Processing Module 382 Difference between original and reconstructed images. JPEG 2000 ExtendstheinitialJPEGstandardtoprovideincreased flexibility. PortionsofJPEG2000compressedimagecanbe extracted for retransmission, storage, display and editing. Based on wavelet coding. Quantizedcoefficientsarearithmeticallycodedonbit-plane basis. 3/24/2012CS 04 804B Image Processing Module 383 Wavelet Theory Some Concepts Wavelettransformbasedonsmallwavesofvarying frequency and limited duration called wavelets. 3/24/2012CS 04 804B Image Processing Module 384 3/24/2012CS 04 804B Image Processing Module 385 3/24/2012CS 04 804B Image Processing Module 386 3/24/2012CS 04 804B Image Processing Module 387 1. First step of the encoding process is to DC level shift the samplesofthen-bitimagetobecodedbysubtracting2n-1. If image has more than one component(R,G,B), each component is individually shifted. 2. Ifthereareexactly3components,theycanbe decorrelatedusingareversibleorirreversiblelinear combination of the components. 3. eg; irreversible component transform Y0(x,y) = 0.299I0(x,y) + 0.587I1(x,y) + 0.114I2(x,y) Y1(x,y) = - 0.169I0(x,y) 0.331I1(x,y) + 0.5I2(x,y) Y2(x,y) = 0.5I0(x,y) 0.419I1(x,y) - 0.081I2(x,y) 3/24/2012CS 04 804B Image Processing Module 388 I0 , I1, I2 are the level-shifted input components. Y0,Y1,Y2 arethecorrespondingdecorrelated components. 3. After the image has been level-shifted and decorrelated, itscomponentsaredividedintotiles,whichare rectangulararraysofpixelscontainingsamerelative proportion of all components. Thesecomponentscanbeextractedandreconstructed independently. 4. The1DDiscreteWaveletTransform(DWT)ofrows andcolumnsofeachtilecomponentisthencomputed.Alifting-basedapproachinvolving6liftingandscaling operations is used. 3/24/2012CS 04 804B Image Processing Module 389 The resultant even-indexed values of Y are equivalent to fastwavelettransformlowpassfilteredoutput;odd-indexedvaluesofYcorrespondtohighpassfiltered output. Thisproduces4components:alow-resolution approximation of the tile component, and its horizontal, vertical and diagonal frequency characteristics. Wheneachofthetilecomponentshasbeenprocessed, the total number of transform coefficients is equal to the number of samples in the original image. 3/24/2012CS 04 804B Image Processing Module 390 3/24/2012CS 04 804B Image Processing Module 391 5. Quantization 6. Finalstep:coefficientbitmodeling,arithmeticcoding,bit-stream layering and packetizing. Coefficients of each transformed tile component are arranged intorectangularblockscalledcodeblocks,whichare individually coded one bit plane at a time. Startingfromthemostsignificantbitplanewithnon-zero element, each bit plane is processed in 3 passes. 3/24/2012CS 04 804B Image Processing Module 392 ( , )( , ) [ ( , )]..bb ba u vq u v sign a u v floorbb is the quantizationstepsize (= (A A Each bit is coded in one of the 3 passes: Significancepropagationcoefficientsthatare insignificantbuthasatleastonesignificantcoefficientin neighbourhood are coded. Magnituderefinementcurrentbitsofsignificant coefficients are coded. Cleanup-remaining insignificant coefficients are coded. Theoutputsarearithmetically coded and grouped with similar passes from other code blocks to form layers. Theselayersarepartitionedintopackets,whicharethe fundamental units of the encoded stream. 3/24/2012CS 04 804B Image Processing Module 393 JPEG 2000 decoders simply invert these operations. Decodesthebit-modeled,arithmeticallycoded,layeredand packetized code-stream. A user-selectednumber of the original images tile component subbands are reconstructed. Coefficients are dequantized. Dequantizedcoefficientsareinversetransformedbycolumn andbyrowusinginversefastwavelettransformorinverse lifting operations. Finalstepsaretheassemblyoftilecomponents,inverse component transformation and DC level shifting. 3/24/2012CS 04 804B Image Processing Module 394 For Self-Study Binary Image Compression Standards Video Compression Standards 3/24/2012CS 04 804B Image Processing Module 395 Thank You 3/24/2012CS 04 804B Image Processing Module 396