Misalignment Correction and Lossless Compression of Pixelated Images
Total Page:16
File Type:pdf, Size:1020Kb
MISALIGNMENT CORRECTION AND LOSSLESS COMPRESSION OF PIXELATED IMAGES By Md. Ahasan Kabir MASTER OF SCIENCE IN INFORMATION AND COMMUNICATION TECHNOLOGY INSTITUTE OF INFORMATION AND COMMUNICATION TECHNOLOGY BANGLADESH UNIVERSITY OF ENGINEERING AND TECHNOLOGY ii Declaration It is hereby declared that this thesis or any part of it has not been submitted elsewhere for the award of any degree or diploma. Signature of the Candidate Md. Ahasan Kabir 1014312013 IICT, BUET iii Dedication THIS THESIS IS DEDICATED TO MY FAMILY iv Table of Contents Page Declaration…………...…………………………………………………………………… iii Dedication…………………………………………………………………………………. iv Table of Contents…..……………………………………………………………………... v List of Figures….…………………………………………………………………………. viii List of Table …………………………………………………………………………….... x List of Abbreviation………………………………………………………………………. xi Acknowledgment………………………………………………………………………….. xii Abstract……………………………………………………………………………………. xiii 1. Introduction…………………………………………………………………………… 01 1.1. Overview………………………………………………………………………….. 01 . 1.2. Pixelated Images…………………………………………………………………... 02 1.3. Image Compression……………………………………………………………….. 03 1.4. Motivation of the Thesis…..……………………………………………………..... 04 1.5. Objectives of the Thesis...……………………………………………………….... 04 1.6. Contribution of this Thesis………………………………………………………... 05 1.7. Thesis Organization……………………………………………………………….. 06 2. Literature Review……..……………………………………………………………… 07 2.1. Overview….………………………………………………………………………. 07 2.2. Data Redundancy…..……………………………………………………………… 07 2.2.1. Coding Redundancy ……………………………………………………..... 07 2.2.2. Inter Pixel Redundancy…………………………………………………..... 08 2.2.3. Psychovisual Redundancy………………………………………………… 08 2.3. Types of Image Compression……………………………………………………... 09 2.3.1. Lossless Compression……………………………………………………... 09 2.3.2. Lossy Compression………………………………………………………... 09 2.4. Image Compression Formats……………………………………………………… 10 2.5. Literature Review on Image Compression………………………………………... 11 2.6. Summary…………………………………………………………………………... 23 v 3. Pixelated System and Misalignment Correction……………………….…………… 24 3.1. Overview………………………………………………………………………….. 24 . 3.2. Pixelated Communication System………………………………………………… 24 3.3. Misalignment Effect on Pixelated System………………………………………… 25 3.4. ProposedMisalignment Correction Method……………………………………..... 26 3.4.1. Capture Image……………………………………………………………… 26 3.4.2. Noise Removal……………………………………………………………... 27 3.4.3. Finding Edge………………………………………………………………. 27 3.4.4. Finding Border Line……………………………………………………….. 29 3.4.5. Finding Corner Point………………………………………………………. 30 3.4.6. Correcting Shape and Orientation………………………………………….. 30 3.5. Result and Discussion……………………………………………………………... 32 3.6. Summary…………………………………………………………………………... 34 4. Existing Image Compression Techniques…………………………………………… 35 4.1. Overview………………………………………………………………………….. 35 . 4.2. JPEG-LS………………………………………………………………………….. 35 4.3. SPIHT……………………………………………………………………………... 37 4.4. Wavelet Transforms……………………………………………………………….. 38 4.5. SPIHT Coding Algorithm………………………………………………………..... 39 4.6. DPCM……………………………………………………………………………... 42 4.7. Arithmetic Coding……………………………………………………………........ 43 4.8. Huffman Coding…………………………………………………………………... 45 4.9. Run Length Coding……………………………………………………………...... 47 4.10. Summary………………………………………………………………………..... 47 5. Proposed ETEC Algorithm…………...……………………………………………… 48 5.1. Overview………………………………………………………………………….. 48 5.2. Proposed ETEC Algorithm………………………………………………………... 48 5.3. Result and Discussion……………………………………………………………... 51 5.4. Summary…………………………………………………………………………... 66 vi 6. Proposed PTEC Algorithm…….…………………………………………………….. 67 6.1. Overview …………………………………………………………………………. 67 6.2. Proposed PTEC Algorithm………………………………………………………... 67 6.3. Result and Discussion……………………………………………………………... 71 6.4. Summary…………………………………………………………………………... 77 7. Practical Demonstration………………...….………………………………………… 78 7.1. Overview………………………………………………………………………….. 78 . 7.2. Implementation…………………………………………………………………… 78 7.2.1. System Description………………………………………………………… 78 7.2.2. Transmitter ………………………………………………………………… 79 7.2.3. Receiver …………………………………………………………………… 80 7.3. Summary………………………………………………………………….............. 81 8. Conclusion…………………………………………………………………………….. 82 8.1. Conclusion………………………………………………………………………… 82 8.2. Limitation…………………………………………………………………………. 83 8.3. Future Work………………………………………………………………………. 83 References……….………………………………………………………………………… 84 vii List of Figures Page 2.1 Two-stage near-lossless wavelet coder. 13 2.2 Casual template 15 2.3 Prediction model of DPCM model. 18 2.4 Block diagram of discrete color image compression. 20 3.1 Block diagram of the pixelated wireless optical channel. 25 3.2 Comparison between different type of edge detection methods with proposed 27 method. 3.3 Received image at receiver (a) Square, (b) Rectangle or (c) Rhombic. 31 3.4 Trapezoidal shaped desired image to rectangular shape. 31 3.5 Trapezium shaped desired image to rectangular shape. 32 3.6 Reconstruction of misalignment error of the captured image. 33 4.1 Block diagram of JPEG-LS. 35 4.2 An illustration of image pixels. 36 4.3 Flow chart of SPIHT method. 37 4.4 Block diagram of operational algorithm of sorting pass. 41 4.5 Block diagram of operational algorithm of refinement pass. 41 4.6 Block diagram of DPCM encoder and decoder. 42 4.7 Example of the arithmetic coding process. 44 4.8 Huffman encoding technique. 46 5.1 Example of pixelated image block. 49 5.2 Edges in the pixelated image block. 49 5.3 Modified J-bit encoding process. 50 5.4 Block diagram of proposed ETEC algorithm. 51 5.5 Tested pixelated images. 54 5.6 Comparison the effect of threshold on compression ratio in ETEC (with 57 Arithmetic) technique. 5.7 Comparison the effect of threshold on compression ratio in ETEC (with 57 Huffman) technique. 5.8 Comparison of compression ratio for pixelated images. 61 viii 5.9 Comparison of bit per pixels for pixelated images. 61 5.10 Comparison of percentage saving of storages for pixelated images. 62 5.11 Standard test image. (a) Lena (b) Peppers(c) Ankle (d) Brain (e) Mri_top (f) 63 Boat (g) Barbara (h) House. 5.12 Comparison of bit per pixels for non-pixelated images. 65 5.13 Comparison of compression ratio for non-pixelated images. 65 5.14 Comparison of percentage saving of storages for non-pixelated images. 66 6.1 Illustration of hierarchical decompression. 68 6.2 Input image and its decomposition image. 68 6.3 Ordering of the casual neighbors. 69 6.4 Ordering of the casual neighbors to predict X oe and X oo respectively. 71 6.5 Block diagram of proposed PTEC algorithm. 71 6.6 Comparison of bits per pixels for pixelated images. 73 6.7 Comparison of simulation time for pixelated images. 74 6.8 Comparison of bits per pixels for non-pixelated images. 75 6.9 Comparison of compression ratio for non-pixelated images. 76 7.1 Aschematic of a pixelated system. 79 7.2 Transmitter block diagram of a pixelated system. 79 7.3 Transmitted image frame. 80 7.4 Receiver block diagram to compress pixelated images. 80 7.5 Illustration of received images. 80 ix List of Tables Page 2.1 Technical scenarios of few existing lossless and near lossless image compression 22 algorithms. 4.1 Probabilities and the initial subinterval of symbols. 44 5.1 Comparison the effect of threshold on compression ratio in ETEC with 55 Arithmetic coding. 5.2 Comparison the effect of threshold on compression ratio in ETEC with Huffman 55 coding. 5.3 Comparison the effect of threshold on simulation time in ETEC with Arithmetic 56 coding. 5.4 Comparison the effect of threshold on simulation time in ETEC with Huffman 56 coding. 5.5 Comparison of bits/pixel and compression ratio (CR). 59 5.6 Comparison of storage saving and computation time. 60 5.7 Comparison of compression ratio and simulation time for non-pixelated images. 63 5.8 Comparison of percentage saving and simulation time for non-pixelated images. 64 6.1 Comparison of bits per pixel and compression ratio for pixelated images. 72 6.2 Comparison of percentage saving and simulation time for pixelated images. 73 6.3 Comparison of bits per pixels and compression ratio for non-pixelated images. 75 6.4 Comparison of percentage saving and simulation time for non-pixelated images. 76 x List of Abbreviations HDTV High-Definition Television LCD Liquid Crystal Display FOV Field Of View JPEG Joint Photographic Experts Group MPEG Moving Picture Experts Group ZIP Zone Improvement Plan JPEG-LS Joint Photographic Experts Group Lossless SPIHT Set Partitioning In Hierarchical Trees AQC Adaptive Quantization Coding LZW Lempel–Ziv–Welch ETEC Edge based Transformation and Entropy Coding PTEC Prediction based Transformation and Entropy Coding DPCM Differential Pulse CodeModulation BMP Bitmap PNG Portable Network Graphics TIFF Tagged Image File Format JPEG2000 Joint Photographic Experts Group 2000 DCT Discrete Cosine Transform EZW Embedded Zerotree Wavelet IBAQC Intensity Based Adaptive Quantizer Coding DWT Discrete Wavelet Transformation VT Visual Threshold GAP Gradient Adjustment Predictor AVIRIS Airborne Visible Infrared Imaging Spectrometer LOCO Low Complexity Lossless Compression MED Median Edge Detection LIS List of Insignificant Set LSP List of Significant Pixels LIP List of Insignificant Pixels xi Acknowledgement All praises are for the almighty Allah for giving me the strength, without which I couldn’t afford to attempt this research work.. I would like to express my sense of gratitude towards my honorable thesis supervisor Dr. Md. Rubaiyat Hossain Mondal, Associate Professor, Institute of Information and Communication