IT472 Digital Image Processing

Slides:



Advertisements
Similar presentations
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Advertisements

Data Compression CS 147 Minh Nguyen.
Image Compression. Data and information Data is not the same thing as information. Data is the means with which information is expressed. The amount of.
Sampling and Pulse Code Modulation
Information Theory EE322 Al-Sanie.
SWE 423: Multimedia Systems
SWE 423: Multimedia Systems
Spatial and Temporal Data Mining
JPEG.
Computer Science 335 Data Compression.
Image Compression (Chapter 8)
Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007.
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
1 Image Compression อ. รัชดาพร คณาวงษ์ วิทยาการคอมพิวเตอร์ คณะ วิทยาศาสตร์ มหาวิทยาลัยศิลปากรวิทยาเขต พระราชวังสนามจันทร์
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Software Research Image Compression Mohamed N. Ahmed, Ph.D.
Basics of Compression Goals: to understand how image/audio/video signals are compressed to save storage and increase transmission efficiency to understand.
©2003/04 Alessandro Bogliolo Background Information theory Probability theory Algorithms.
Chapter 5 : IMAGE COMPRESSION – LOSSLESS COMPRESSION - Nur Hidayah Bte Jusoh (IT 01481) 2)Azmah Bte Abdullah Sani (IT 01494) 3)Dina Meliwana.
CSE & CSE Multimedia Processing Lecture 7
Lecture 1 Contemporary issues in IT Lecture 1 Monday Lecture 10:00 – 12:00, Room 3.27 Lab 13:00 – 15:00, Lab 6.12 and 6.20 Lecturer: Dr Abir Hussain Room.
Computer Vision – Compression(2) Hanyang University Jong-Il Park.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
Klara Nahrstedt Spring 2011
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007.
Digital Image Processing
Prof. Amr Goneid Department of Computer Science & Engineering
Chapter 8 Image Compression. What is Image Compression? Reduction of the amount of data required to represent a digital image → removal of redundant data.
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
Indiana University Purdue University Fort Wayne Hongli Luo
Image Compression (Chapter 8) CSC 446 Lecturer: Nada ALZaben.
8. 1 MPEG MPEG is Moving Picture Experts Group On 1992 MPEG-1 was the standard, but was replaced only a year after by MPEG-2. Nowadays, MPEG-2 is gradually.
1 Classification of Compression Methods. 2 Data Compression  A means of reducing the size of blocks of data by removing  Unused material: e.g.) silence.
Digital Image Processing Image Compression
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
Image Compression – Fundamentals and Lossless Compression Techniques
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
Image Compression Fasih ur Rehman. Goal of Compression Reduce the amount of data required to represent a given quantity of information Reduce relative.
Compression There is need for compression: bandwidth constraints of multimedia applications exceed the capability of communication channels Ex. QCIF bit.
COMPRESSION. Compression in General: Why Compress? So Many Bits, So Little Time (Space) CD audio rate: 2 * 2 * 8 * = 1,411,200 bps CD audio storage:
Computer Vision – Compression(1) Hanyang University Jong-Il Park.
Chapter 17 Image Compression 17.1 Introduction Redundant and irrelevant information  “Your wife, Helen, will meet you at Logan Airport in Boston.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
Lecture 4: Lossless Compression(1) Hongli Luo Fall 2011.
CS654: Digital Image Analysis
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Digital Image Processing Lecture 22: Image Compression
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Chapter 7 Lossless Compression Algorithms 7.1 Introduction 7.2 Basics of Information Theory 7.3 Run-Length Coding 7.4 Variable-Length Coding (VLC) 7.5.
Fundamentals of Multimedia Chapter 6 Basics of Digital Audio Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny.
Entropy vs. Average Code-length Important application of Shannon’s entropy measure is in finding efficient (~ short average length) code words The measure.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
Introductions What Is Data Compression ? Data compression is the process of reduction in the amount of signal space that must be allocated to a given.
Image Compression (Chapter 8)
JPEG Compression What is JPEG? Motivation
IMAGE PROCESSING IMAGE COMPRESSION
IMAGE COMPRESSION.
Data Compression.
Image Compression The still image and motion images can be compressed by lossless coding or lossy coding. Principle of compression: - reduce the redundant.
Data Compression.
Data Compression CS 147 Minh Nguyen.
CH 8. Image Compression 8.1 Fundamental 8.2 Image compression models
Image Compression 9/20/2018 Image Compression.
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
Image Coding and Compression
Presentation transcript:

IT472 Digital Image Processing Asim Banerjee Faculty Block #1, Room No. 1109 Extn. # 554

Data Redundancies - Types In image compression three basic data redundancies can be identified Coding redundancy Inter-pixel redundancy Psycho-visual redundancy NOTE: Data compression is achieved when one or more of these redundancies are reduced or eliminated. IT472 - Digital Image Processing

IT472 - Digital Image Processing What is a Code? A code is a set of symbols (letters, numbers, bits, etc.) used to represent a body of information or set of events. Each piece of information or event is assigned a sequence of code symbols, called a code word. The number of symbols in each code word is its length. IT472 - Digital Image Processing

IT472 - Digital Image Processing Coding Redundancy In general coding redundancy is present when the codes assigned to a set of gray-level values have not been selected to take full advantage of the probabilities of their occurrence in the image. It is always present when an image’s gray levels are represented in natural binary code. Assigning fewer bits to more frequently occurring gray levels than to less probable ones achieves compression. NOTE: This is also referred to as variable length coding. The histogram of an image is used to construct a code that reduces the amount of data used to represent it (the image). IT472 - Digital Image Processing

IT472 - Digital Image Processing Coding Redundancy If the number of bits used to represent each value rk is l(rk) then the average number of bits required to represent each pixel is Lavg =  l(rk) pr(rk) where pr(rk) = nk / n k = 0,1,…,L-1 The total number of bits required to code an image of size M x N is MNLavg IT472 - Digital Image Processing

Coding Redundancy - Example rk pr(rk) l(rk) Code 0.19 3 000 1 0.25 001 2 0.21 010 0.16 011 4 0.08 100 5 0.06 101 6 0.03 110 7 0.02 111 Lavg = 3 IT472 - Digital Image Processing

Coding Redundancy - Example rk pr(rk) l(rk) Code 0.19 2 11 1 0.25 01 0.21 10 3 0.16 001 4 0.08 0001 5 0.06 00001 6 0.03 000001 7 0.02 000000 Lavg = ? and CR = ? IT472 - Digital Image Processing

Coding Redundancy - Example rk pr(rk) l(rk) Code 0.19 2 11 1 0.25 01 0.21 10 3 0.16 011 4 0.08 0001 5 0.06 0011 6 0.03 00001 7 0.02 00011 Lavg = ? and CR = ? IT472 - Digital Image Processing

Interpixel Redundancy (1/2) Interpixel redundancy exploits the correlation between pixels, that result from the structural or geometric relationships between the objects in the image. The value of any given pixel can be reasonably predicted from the value of its neighbors, the information carried by individual pixels is relatively small. NOTE: This is also known as spatial redundancy, geometric redundancy and interframe redundancy. IT472 - Digital Image Processing

Interpixel Redundancy (2/2) In order to reduce interpixel redundancies in an image, the 2D pixel array must be transformed into a more efficient (usually nonvisual) format. Transformations of the type that remove interpixel redundancies are referred to as mappings NOTE: These become reversible mappings if the original image elements can be reconstructed from the transformed data set. IT472 - Digital Image Processing

Psychovisual Redundancy (1/2) The brightness of a region as perceived by the eye, depends on factors other than simply the light reflected by the region. NOTE: Mach bands can be perceived in an area of constant intensity. Such a phenomena result from the fact that the eye does not respond with equal sensitivity to all visual information i.e. certain information has less relative importance than other information in normal visual processing. IT472 - Digital Image Processing

Psychovisual Redundancy (2/2) This relatively less important information is said to be psychovisually redundant and can be easily eliminated without significantly impairing the quality of the perceived image. Psychovisual redundancy is associated with real or quantifiable visual information. NOTE: Since elimination of psychovisually redundant data results in a loss of quantitative information, it commonly referred to as quantization. IT472 - Digital Image Processing

IT472 - Digital Image Processing Fidelity Criteria Removal of psychovisually redundant information results in a loss of real or quantifiable visual information. Because information of interest may be lost, a repeatable or reproducible means of quantifying the nature and extent of information loss is highly desirable. Two general classes of criteria are used as a basis for assessment Objective fidelity criteria Subjective fidelity criteria IT472 - Digital Image Processing

Objective Fidelity Criteria When the level information loss is expressed as a function of the original or input image and the compressed and subsequently decompressed image, it is said to be based on an objective fidelity criteria. Example Root mean square error (RMSE) between the input and the output images. Mean square signal to noise ratio of the compressed-decompressed image. IT472 - Digital Image Processing

Subjective Fidelity Criteria Although objective fidelity criteria offer a simple and convenient mechanism for evaluating information loss, most decompressed image are ultimately viewed humans, hence subjective evaluation by human observer is often more appropriate The typical mechanism is to have observers rate the images on a scale of (say) –4 to 4 to represent their subjective evaluation. NOTE: -4  worst 0  the same 4 best IT472 - Digital Image Processing

Image Compression Models Source encoder and decoder Reduces or eliminates any coding, interpixel and/or psycho visual redundancies in the input image. Channel encoder and decoder Plays an important role when the channel is noisy or prone to error by inserting “controlled redundancy”. IT472 - Digital Image Processing

IT472 - Digital Image Processing Types of Compression Lossless compression Huffman coding Bit-plane coding Run length coding Lossy compression Lossy predictive coding Transform coding JPEG IT472 - Digital Image Processing

IT523 - Digital Image Processing Huffman Coding (1/2) It is the most popular technique for removing coding redundancy. When coding the symbols of an independent source individually, it yields the smallest possible number of code symbols per source symbol. It involves a series of source reductions by ordering the probabilities of symbols under consideration and combining the two lowest probability symbols into a single symbol that replaces them in the next source reduction. IT523 - Digital Image Processing

Source Reductions - Example Source: “Digital Image Processing” by R. C. Gonzalez and R. E. Woods A series of source reductions by ordering the probabilities of symbols under consideration and combining the bottom two lowest probability symbols into a single symbol that replaces them in the next source reduction. IT523 - Digital Image Processing

IT523 - Digital Image Processing Huffman Coding (2/2) The second step is to code each reduced source starting with the smallest source and working backwards to the original source. It is called a block code because each source symbol is mapped into a fixed sequence of code symbols. It is instantaneous because each code word in a sting of code symbols can be decoded without referencing succeeding symbols. It is uniquely decodable because any string of code symbols can be decoded in only one way. Source: “Digital Image Processing” by R. C. Gonzalez and R. E. Woods The Huffman code is an instantaneous uniquely decodable block code. IT523 - Digital Image Processing

IT523 - Digital Image Processing Bitplane Coding (1/2) It reduces the images interpixel redundancies by processing the image’s bit planes individually. The multilevel images are decomposed into a series of binary images and then compressing the binary images using one of the several well-known binary compression methods. The images are often first gray coded before the bit plane decomposition is carried out to avoid too many 0 to 1 transitions across bit planes for pixel values that are close to each other. Binary compression methods like constant area coding, one-dimensional run length coding, 2-D run length coding and contour tracing and coding. IT523 - Digital Image Processing

IT523 - Digital Image Processing Bitplane Coding (2/2) Normal Gray coded Normal Gray coded Source: “Digital Image Processing” by R. C. Gonzalez and R. E. Woods IT523 - Digital Image Processing

IT523 - Digital Image Processing Run-length Coding (1/2) 1-D run length coding Represents each row or column of an image or a bit plane by a sequence of lengths that describe successive runs of black and white pixels. It is a standard compression approach in facsimile (FAX) coding. It involves specifying the value of the gray level and the length of that run. Binary compression methods like constant area coding, one-dimensional run length coding, 2-D run length coding and contour tracing and coding. IT523 - Digital Image Processing

IT523 - Digital Image Processing Run-length Coding (2/2) The most common approaches for determining the value of a run are Specify the value of the first run of each row To assume that each row begins with a white run whose run length may be zero. NOTE: One can employ variable length coding on the run lengths themselves to achieve further compression. The same can be extended to 2-D run length coding. Binary compression methods like constant area coding, one-dimensional run length coding, 2-D run length coding and contour tracing and coding. IT523 - Digital Image Processing

Constant Area Coding (1/2) A simple method to compress binary or bit plane images is to use special code words to denote large areas of continuous 0’s or 1’s. The image is divided into blocks of p x q pixels, which are classified as all black, all white or mixed. The most probable or frequently occurring category is assigned the 1-bit code word 0, and the other two categories are assigned 2 bit code words 10 and 11. IT472 - Digital Image Processing

Constant Area Coding (2/2) Compression is achieved because the pq bits that normally would be normally used to represent each constant area are replaced by a 1-bit or 2-bit code words. NOTE: The code assigned to the mixed intensity category is used as a prefix which is followed by the pq bit pattern of the block. IT472 - Digital Image Processing

IT472 - Digital Image Processing White Block Skipping When predominantly white text document are being compressed, one can code the solid white areas as 0 and all other blocks (including solid black blocks) by a 1 followed by the bit pattern of the block. A modification of the above (with block size 1 x q) is to code the solid white lines as 0 and all other lines with a 1 followed by the normal WBS code sequence. IT472 - Digital Image Processing

Variable Length Coding The simplest approach to error free (lossless) image compression is to reduce only coding redundancy. This is achieved by assigning the shortest possible code words to the most probable gray levels Example - Huffman Coding NOTE: There are various other variable length coding startegies including a variants of the Huffman Coding viz. the truncated Huffman Coding; B-code and shift codes. IT472 - Digital Image Processing

IT472 - Digital Image Processing Arithmetic Coding (1/2) Arithmetic coding generates non-block codes. In it, a one to one correspondence between source symbols and code words does not exist. Instead an entire sequence of source symbols (or message) is assigned a single arithmetic code word. The code word itself defines an interval of real numbers between 0 and 1. IT472 - Digital Image Processing

IT472 - Digital Image Processing Arithmetic Coding (2/2) As the number of symbols in the message increases, the interval used to represent it becomes smaller and the number of information unit (bits) required to represent the interval becomes larger. Each symbol of the message reduces the size of the interval in accordance with its probability of occurrence. NOTE: It achieves (theoretically) the bound established by the noiseless coding theorem. IT472 - Digital Image Processing

Noiseless Coding Theorem When both the information channel and communication system are error free, the principal function of the communication system is to represent the source as compactly as possible. Under such circumstances, noiseless coding theorem (aka Shannon’s first theorem) defines the minimum average code word length per source symbol that can be achieved. IT472 - Digital Image Processing

Lossless Predictive Coding (1/3) It is based on eliminating the interpixel redundancies of closely spaced pixels by extracting and coding only the new information in each pixel. The new information of a pixel is defined as the difference between the actual and the predicted value of that pixel. The system consists of an encoder and decoder each having an identical predictor. IT472 - Digital Image Processing

Lossless Predictive Coding (2/3) Predictor Nearest Integer Symbol Encoder Encoder Input Image Compressed Image O/P + -  IT472 - Digital Image Processing

Lossless Predictive Coding (3/3) Predictor Symbol Decoder Decoder Decompressed Image O/P Compressed Image I/P +  IT472 - Digital Image Processing

IT472 - Digital Image Processing Lossy Compression Lossy encoding is based on the concept of compromising the accuracy of the reconstructed image in exchange for increased compression. The idea is, if the resulting distortion is tolerable (at times not visually significant), and the increase in compression is significant, then the approach is worthwhile. Typical compression ratios achieved by these approaches are of the order of 10:1 to 100:1. NOTE: Lossless the figure is 3:1 IT472 - Digital Image Processing

Lossy Predictive Coding (1/2) Predictor Symbol Encoder Encoder Input Image + -  Quantizer en en' fn' fn ^ Compressed Image O/P IT472 - Digital Image Processing

Lossy Predictive Coding (2/2) Predictor Symbol Decoder Decompressed Image O/P Compressed Image I/P + -  Decoder IT472 - Digital Image Processing

Subimage Size Selection It is a significant factor affecting the transform coding error and computational complexity. In most applications, the image is subdivided so that the correlation (redundancy) between adjacent subimages is reduced to some acceptable level The subimage dimension, n, is an integer power of 2. NOTE: Both the level of compression and computational complexity increase as the subimage size increases. IT472 - Digital Image Processing

IT472 - Digital Image Processing Bit Allocation (1/2) The overall process of truncating, quantizing and coding the coefficients in a transformed subimage is commonly called bit allocation. The reconstruction error associated with the truncated series expansion of the transform code is a function of The number and relative importance of the transform coefficients that are discarded The precision that is used to represent the retained coefficients. IT472 - Digital Image Processing

IT472 - Digital Image Processing Bit Allocation (2/2) NOTE: If the retained coefficients are selected on the basis of Maximum variance – zonal coding Maximum magnitude – threshold coding IT472 - Digital Image Processing

IT472 - Digital Image Processing Assignment What is LZW coding? Give an example of using LZW coding. What are the tradeoffs involved in LZW coding? Submit by: 12:00 hrs on 6th March 2011. IT472 - Digital Image Processing

Transform Coding System Source: “Digital Image Processing” by R. C. Gonzalez and R. E. Woods IT523 - Digital Image Processing

Compression Standards Jointly developed and sanctioned by International Standardization Organization (ISO) Consultative Committee of the International Telephone and Telegraph (CCITT) Examples JPEG standard MPEG standard (MPEG 1 and MPEG 2) IT472 - Digital Image Processing

IT472 - Digital Image Processing Assignment Write a short report on JPEG standard (JPEG and JPEG2000) MPEG standards (viz. MPEG 1, MPEG 2, MPEG 4, MPEG 7 and MPEG 21) Submit by: 12:00 hrs on 6th March 2011. IT472 - Digital Image Processing

That’s all for now. We shall continue in the next class. IT472 - Digital Image Processing