MMA 113 Pr-Lec-03.pdf.pdf

Full Transcript

Compression MMA 113 PR-LEC-03 Compression Lossy Lossless Compression Introduction The emergence of multimedia technologies has made digital libraries a reality. Nowadays, libraries, museums, film studios, and governments are converting more and more data and archive...

Compression MMA 113 PR-LEC-03 Compression Lossy Lossless Compression Introduction The emergence of multimedia technologies has made digital libraries a reality. Nowadays, libraries, museums, film studios, and governments are converting more and more data and archives into digital form. Some of the data (e.g., precious books and paintings) indeed need to be stored without any loss. Compression Data compression is a reduction in the number of bits needed to represent data. Compression Why data compression? It is used to maximize the use of bandwidth. Bandwidth is measured as the amount of data that can be transferred from one point to another within a network in a specific amount of time. To optimize disk space. Compression Why data compression? 1. Storage -reduce the size of the file 2. Data Transmission - saves the time required to transmit the file Compression 2 Main Components of Data Compression 1. Encoding Algorithm To convert data in a format such that it is readable by other processes and systems. 2. Encryption Algorithm On the other hand, is not decipherable by anyone and everyone. Data can be decoded only using special keys or algorithms. Compression Compression Ratio The compression ratio is shown as 50:1 or 15:1, etc. For example, a 900 MB file compressed at 15:1 would be reduced to a 60 MB file. Perhaps the easiest way to understand compression ratio is to think of it in terms of file size and quality. The higher the compression ratio, the smaller the file but the lower the quality of the compressed product. Lossy Compression Lossy Compression Removes non-useful parts of the data Decrease the size of the file to a “greater extent” Quality of data degrades Nowadays, almost all videos you see are compressed in some way, and the compression used is mostly lossy. As well, most images on the web are in the standard JPEG format. And this is almost always a lossy compression format. It is known that lossy compression methods achieve a much higher level of compression than lossless ones. Ie. JPEG, Chroma Subsampling Lossless Method Run Length Coding (lossless method) A type of data compression where a string of identical values is replaced by codes to indicate the value and the number of times it occurs. Lossless Method Run Length Coding (lossless method) Input : AAABBCDDDD – 10 bytes Encoded : 3A2B1C4D - 8 bytes Other Types of Lossless Compression Variable-length coding (lossless method) - A code in which a fixed number of source symbols are encoded into a variable number of output symbols. Types Huffman Coding Dictionary Based Coding (lossless method) Types Lempel–Ziv–Welch (LZW) Arithmetic Coding (lossless method) Outperforms Huffman coding in practice. Image Compression Standards What is Image Compression? a process applied to a graphics file to minimize its size in bytes without degrading image quality below an acceptable threshold. By reducing the file size, more images can be stored in a given amount of disk or memory space. The image also requires less bandwidth when being transmitted over the internet or downloaded from a webpage Image Compression Standards Why is JPEG important? The advantages of using JPEG in a digital image format are: 1. Portability The JPEG files are highly compressible. The small file size means that JPEG images can easily be uploaded to web pages. 2. Compatibility JPEG images are compatible with almost all devices and software, which means that there is no need to change the format for usage. Image Compression Standards Why is JPEG important? 3. Vibrant High-resolution JPEG images are vibrant and colorful. The JPEG standard is that it supports 24-bit color with up to 16 million colors. 4. Variable Compression JPEG images can be compressed according to the needs of the application. The degree of compression is flexible. Image Compression Standards Image Compression Standards When zoomed in, the lossy compression information is removed Video Compression What is video compression? Video compression occurs by removing repetitive frames or unnecessary data from the original video file. However, when compression is used on its own, it doesn’t usually produce the highest quality of video, which is why video compression is generally used hand-in-hand with video encoding. Video Compression What is video compression? After a video file has been encoded and compressed, it will typically be placed (or saved) into “containers” — more commonly known as “video formats”. You can tell what container a video file is in by looking at its file extension. Here are the most commonly used video formats: MP4 FLV MPEG-2 MOV WEBM AVI AVCHD WMV MKV Video Compression Video Compression Top left: original Bottom left: compressed using HandBrake Top right: compressed using YouTube Video Compression YouTube Compression Reference Link REFERENCES https://iq.opengenus.org/types-of-data-encoding-algorithms/ https://cheapsslweb.com/resources/encoding-vs-encryption Book Fundamentals of Multimedia 2nd Edition by Ze-Nian Li, Mark S. Drew & Jiangchuan Liu

Use Quizgecko on...
Browser
Browser