Images. Images 1 / 29. Data Represenatation Data Compression Error Correction Computer Architecture

Similar documents
Data Storage 3.1. Foundations of Computer Science Cengage Learning

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Comparison of different image compression formats. ECE 533 Project Report Paula Aguilera

encoding compression encryption

CPU Organization and Assembly Language

Central Processing Unit (CPU)

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

Compression techniques

MICROPROCESSOR AND MICROCOMPUTER BASICS

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Digital Image Fundamentals. Selim Aksoy Department of Computer Engineering Bilkent University

Instruction Set Architecture

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

PROBLEMS. which was discussed in Section

Computers Are Your Future Eleventh Edition Chapter 5: Application Software: Tools for Productivity

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

MMGD0203 Multimedia Design MMGD0203 MULTIMEDIA DESIGN. Chapter 3 Graphics and Animations

Digitisation Disposal Policy Toolkit

Reading.. IMAGE COMPRESSION- I IMAGE COMPRESSION. Image compression. Data Redundancy. Lossy vs Lossless Compression. Chapter 8.

(Refer Slide Time: 00:01:16 min)

ELECTRONIC DOCUMENT IMAGING

Central Processing Unit

FCE: A Fast Content Expression for Server-based Computing

MassArt Studio Foundation: Visual Language Digital Media Cookbook, Fall 2013

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Chapter 2 Logic Gates and Introduction to Computer Architecture

Microprocessor & Assembly Language

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

Computer Organization and Architecture

CPU Organisation and Operation

CHAPTER 7: The CPU and Memory

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

TIMING DIAGRAM O 8085

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Digital Imaging and Image Editing

What Resolution Should Your Images Be?

Fast Arithmetic Coding (FastAC) Implementations

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Wan Accelerators: Optimizing Network Traffic with Compression. Bartosz Agas, Marvin Germar & Christopher Tran

Logo Standards Guideline

ACADEMIC TECHNOLOGY SUPPORT

Hardware: Input, Processing, and Output Devices. A PC in Every Home. Assembling a Computer System

Links. Blog. Great Images for Papers and Presentations 5/24/2011. Overview. Find help for entire process Quick link Theses and Dissertations

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

Digital Preservation. Guidance Note: Graphics File Formats

Processor Architectures

Get the Best Digital Images Possible. What s it all about anyway?

Introduction to image coding

1 Classical Universal Computer 3

Image Compression through DCT and Huffman Coding Technique

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Let s put together a Manual Processor

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

2011, The McGraw-Hill Companies, Inc. Chapter 3

Chapter 2: Basics on computers and digital information coding. A.A Information Technology and Arts Organizations

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

PART B QUESTIONS AND ANSWERS UNIT I

High level code and machine code

5.1 Computer Graphics Metafile. CHAPTER 5 Data Interchange Standards

8085 INSTRUCTION SET

Structures for Data Compression Responsible persons: Claudia Dolci, Dante Salvini, Michael Schrattner, Robert Weibel

Instruction Set Architecture (ISA)

Computer organization

İSTANBUL AYDIN UNIVERSITY

CHAPTER 3: DIGITAL IMAGING IN DIAGNOSTIC RADIOLOGY. 3.1 Basic Concepts of Digital Imaging

HP Smart Document Scan Software compression schemes and file sizes

Smithsonian Institution Archives Guidance Update SIA. ELECTRONIC RECORDS Recommendations for Preservation Formats. November 2004 SIA_EREC_04_03

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

LSN 2 Computer Processors

FLIX: Fast Relief for Performance-Hungry Embedded Applications

1/20/2016 INTRODUCTION

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

In the two following sections we separately consider hardware and software requirements. Sometimes, they will be offered for sale as a package.

How to Send Video Images Through Internet

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

MACHINE ARCHITECTURE & LANGUAGE

An Overview of Stack Architecture and the PSC 1000 Microprocessor

Chapter I Model801, Model802 Functions and Features

CHAPTER 2 LITERATURE REVIEW

Note monitors controlled by analog signals CRT monitors are controlled by analog voltage. i. e. the level of analog signal delivered through the

LZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b

Analysis of Compression Algorithms for Program Data

Input / Ouput devices. I/O Chapter 8. Goals & Constraints. Measures of Performance. Anatomy of a Disk Drive. Introduction - 8.1

Levent EREN A-306 Office Phone: INTRODUCTION TO DIGITAL LOGIC

AQA Level 3 Technical Level Entertainment Technology: Video Games Art and Design Digital Asset Management

Computer Organization. and Instruction Execution. August 22

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Storage Optimization in Cloud Environment using Compression Algorithm

COMPUTER ARCHITECTURE. Input/Output

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Fetch TV My Media Hub Quick Start Guide for USB Devices. Sharing your media content with the set top box from a USB device

Faculty of Engineering Student Number:

Place Values the values are doubled as you add more digits starting from the least significant bit

Transcription:

Images Images Bit map scanner, video camera, etc. image consists of dots pixels 0 white; 1 black colors use more bits red, green, blue components 3 bytes per pixel example: 1024 1024 pixels megapixels (how many millions of pixels) need to compress 1 / 29

Images Images Vector techniques fonts for printers scalable to arbitrary sizes image = lines and curves poorer photographic quality 2 / 29

Sound Sounds waves sample amplitude at regular intervals 16 bits -8000/sec long distance telephone -more for music Musical Instrument Digital Interface MIDI -musical synthesizers, keyboards, etc. -records directions for producing sounds (instead of sounds) -what instrument, how long 3 / 29

compression Many lossless techniques: run-length encoding: represent 253 ones, 118 zeros, 87 ones relative encoding/ differential encoding: record differences (film) frequency-dependent encoding: variable length codes, depending on frequencies Huffman codes Dictionary encoding: (can be lossy) Lempel-Ziv methods: most popular for lossless adaptive dictionary encoding Lempel-Ziv-Welch (LZW): used a lot - GIF 4 / 29

Lempel-Ziv-Welch Create a dictionary, as reading data. Refer to data already seen in the dictionary. 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. 5 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: 8-bit ASCII alphabet Output: 6 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256 Output: 65 7 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256, CA : 257 Output: 65,67 8 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256,CA : 257,AG : 258 Output: 65,67,65 9 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256,CA : 257,AG : 258,GA : 259 Output: 65,67,65,71 10 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256,CA : 257,AG : 258,GA : 259,AA : 260 Output: 65,67,65,71,65 11 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256,CA : 257,AG : 258,GA : 259,AA : 260,AT : 261 Output: 65,67,65,71,65,65 12 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256,CA : 257,AG : 258,GA : 259,AA : 260,AT : 261,TA : 262 Output: 65,67,65,71,65,65,84 13 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256,CA : 257,AG : 258,GA : 259,AA : 260,AT : 261,TA : 262,AGA : 263 Output: 65,67,65,71,65,65,84,258 14 / 29

Lempel-Ziv-Welch 1. Initialize the dictionary to contain all strings of length one. 2. Find the longest string W in the dictionary that matches the current input. 3. Write dictionary index for W to output and remove W from the input. 4. Add W followed by the next symbol in the input to the dictionary. 5. Go to Step 2. Input: ACAGAAT AGAGA Dictionary: ASCII alphabet,ac : 256,CA : 257,AG : 258,GA : 259,AA : 260,AT : 261,TA : 262,AGA : 263 Output: 65,67,65,71,65,65,84,258,263 15 / 29

Images GIF Graphic Interchange Format allows only 256 colors lossy? table specifying colors palette LZW applied PNG Portable Network Graphic successor to GIF palette, plus 24 or 48 bit truecolor LZ method compression (better, avoided patent problem) 16 / 29

Images JPEG photographs lossless and lossy modes different qualities TIFF has LZW option patent has expired 17 / 29

Audio and video MPEG Motion Picture Experts Group MP3/MP4 most common for audio For audio/video use properties of human hearing and sight 18 / 29

Error detection detecting that 1 bit has flipped parity bit odd even can have more to increase probability of detection checksums (hashing or parity) 19 / 29

Error correction Hamming distance number of different bits 01010101 and 11010100 Hamming distance 2 error correcting codes Hamming distance 2d+1 correct d errors detects more errors than it can fix Valid codes 000 111 Invalid codes 001,010,100 011,101,110 20 / 29

architecture Von Neumann architecture architecture where program stored in memory 21 / 29

architecture Von Neumann architecture (bottleneck memory slower than processor) Registers: general purpose special purpose program counter instruction register others... 22 / 29

architecture Adding 2 values from memory: 1. Get first value in a register 2. Get second value in a register 3. Add results in ALU result in a register 4. Store result in memory (or a register) 23 / 29

architecture Example machine language Appendix C Instruction: 4 bits op-code 12 bits operands 4 bits register 8 bits address 256 words in memory How many general purpose registers are there? A. 4 B. 8 C. 12 D. 16 E. 32 Vote at m.socrative.com. Room number 415439. 24 / 29

Example machine language Instructions: Op-code Operands Meaning 1 RXY Load reg R from memory cell XY 2 RXY Load reg R with value XY 3 RXY Store contents of reg R in cell XY 4 0RS Move contents of reg R to reg S 5 RST Add two s compl. contents of reg S to reg T; store result in R 6 RST Foating point add 7 RST OR 8 RST AND 9 RST XOR A R0X Rotate reg R X bits to right B RXY Jump to XY if c(r) = c(0) C 000 HALT Note operands are hexadecimal. 25 / 29

Example machine language One word (cell) is 1 byte. One instruction is 16 bits. Machine cycle: fetch get next instr., increment program counter by 2 decode execute (instr) 26 / 29

Example machine language Example: check if low-order 4 bits of value in reg 1 = 0 2000 load load zero into reg 0 220F load load string 00001111 into reg 2 8312 AND c(reg 1) AND c(reg 2) -> reg 3 masking B3XY JMP jump to address XY if c(reg 3) = c(reg 0) 27 / 29

Example machine language How can we complement a byte in reg 1? A. load 11 in register 2; OR 3,1,2; B. load FF in register 2; OR 3,1,2; C. load 00 in register 2; XOR 3,1,2; D. load 11 in register 2; XOR 3,1,2; E. load FF in register 2; XOR 3,1,2; Vote at m.socrative.com. Room number 415439. 28 / 29

architecture RISC reduced instr. set fast per instr. cell phones CISC complex instruction set easier to program PC Clock coordinates activities faster clock faster machine cycle Hz one cycle per second MHz mega Hz (1 million Hz) GHz giga Hz (1000 MHz) flop floating point ops / sec benchmark program to run on different machines for comparison 29 / 29