Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

Similar documents
Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

General Imaging System

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

Image and Video Processing

Image acquisition. In both cases, the digital sensing element is one of the following: Line array Area array. Single sensor

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

Photons and solid state detection

Sampling and Reconstruction

Digital Imaging Rochester Institute of Technology

IMAGE SENSOR SOLUTIONS. KAC-96-1/5" Lens Kit. KODAK KAC-96-1/5" Lens Kit. for use with the KODAK CMOS Image Sensors. November 2004 Revision 2

Cameras. CSE 455, Winter 2010 January 25, 2010

Aliasing and Antialiasing. What is Aliasing? What is Aliasing? What is Aliasing?

LENSES. INEL 6088 Computer Vision

Image Formation and Capture. Acknowledgment: some figures by B. Curless, E. Hecht, W.J. Smith, B.K.P. Horn, and A. Theuwissen

Introduction to Computer Vision

CS 548: Computer Vision REVIEW: Digital Image Basics. Spring 2016 Dr. Michael J. Reale

Visual perception basics. Image aquisition system. IE PŁ P. Strumiłło

What is Sound? Simple Harmonic Motion -- a Pendulum

Cvision 2. António J. R. Neves João Paulo Silva Cunha. Bernardo Cunha. IEETA / Universidade de Aveiro

CPSC 4040/6040 Computer Graphics Images. Joshua Levine

Light. Path of Light. Looking at things. Depth and Distance. Getting light to imager. CS559 Lecture 2 Lights, Cameras, Eyes

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

digital film technology Resolution Matters what's in a pattern white paper standing the test of time

Lecture 2: Digital Image Fundamentals -- Sampling & Quantization

ELEC Dr Reji Mathew Electrical Engineering UNSW

Digital Image Processing. Lecture # 6 Corner Detection & Color Processing

ECC419 IMAGE PROCESSING

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

Overview. Pinhole camera model Projective geometry Vanishing points and lines Projection matrix Cameras with Lenses Color Digital image

Getting light to imager. Capturing Images. Depth and Distance. Ideal Imaging. CS559 Lecture 2 Lights, Cameras, Eyes

Acquisition. Some slides from: Yung-Yu Chuang (DigiVfx) Jan Neumann, Pat Hanrahan, Alexei Efros

Cameras CS / ECE 181B

IMAGE FORMATION. Light source properties. Sensor characteristics Surface. Surface reflectance properties. Optics

CS101 Lecture 19: Digital Images. John Magee 18 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Unit 1.1: Information representation


CSCD 433 Network Programming Fall Lecture 5 Physical Layer Continued

A 1.3 Megapixel CMOS Imager Designed for Digital Still Cameras

EE390 Final Exam Fall Term 2002 Friday, December 13, 2002

YEDITEPE UNIVERSITY ENGINEERING FACULTY COMMUNICATION SYSTEMS LABORATORY EE 354 COMMUNICATION SYSTEMS

Image Formation and Capture

Graphics packages can be bit-mapped or vector. Both types of packages store graphics in a different way.

Integral 3-D Television Using a 2000-Scanning Line Video System

ECE 556 BASICS OF DIGITAL SPEECH PROCESSING. Assıst.Prof.Dr. Selma ÖZAYDIN Spring Term-2017 Lecture 2

Evaluating Commercial Scanners for Astronomical Images. The underlying technology of the scanners: Pixel sizes:

Experiment 8: Sampling

Lecture 1: image display and representation

Digital Image Processing. Lecture # 8 Color Processing

Charge-Coupled Device (CCD) Detectors pixel silicon chip electronics cryogenics

Determining MTF with a Slant Edge Target ABSTRACT AND INTRODUCTION

DIGITAL SIGNAL PROCESSING. Chapter 1 Introduction to Discrete-Time Signals & Sampling

The Xiris Glossary of Machine Vision Terminology

CS 450: COMPUTER GRAPHICS REVIEW: RASTER IMAGES SPRING 2016 DR. MICHAEL J. REALE

Fundamentals of CMOS Image Sensors

CS 376b Computer Vision

Defense Technical Information Center Compilation Part Notice

Image Enhancement in the Spatial Domain (Part 1)

Sampling and Signal Processing

Charged Coupled Device (CCD) S.Vidhya

Module 3: Video Sampling Lecture 18: Filtering operations in Camera and display devices. The Lecture Contains: Effect of Temporal Aperture:

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

Chapter 2: Digital Image Fundamentals. Digital image processing is based on. Mathematical and probabilistic models Human intuition and analysis

DIGITAL IMAGE PROCESSING (COM-3371) Week 2 - January 14, 2002

Lecture 2 Digital Image Fundamentals. Lin ZHANG, PhD School of Software Engineering Tongji University Fall 2016

Be aware that there is no universal notation for the various quantities.

2013 LMIC Imaging Workshop. Sidney L. Shaw Technical Director. - Light and the Image - Detectors - Signal and Noise

CSCD 433 Network Programming Fall Lecture 5 Physical Layer Continued

F-number sequence. a change of f-number to the next in the sequence corresponds to a factor of 2 change in light intensity,

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

Lecture 3 Digital image processing.

Topic 9 - Sensors Within

CS 262 Lecture 01: Digital Images and Video. John Magee Some material copyright Jones and Bartlett

Lecture 26. PHY 112: Light, Color and Vision. Finalities. Final: Thursday May 19, 2:15 to 4:45 pm. Prof. Clark McGrew Physics D 134

Continuous vs. Discrete signals. Sampling. Analog to Digital Conversion. CMPT 368: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

6.003: Signals and Systems. Sampling

Overview. Charge-coupled Devices. MOS capacitor. Charge-coupled devices. Charge-coupled devices:

Introduction. Lighting

Unit 1: Image Formation

ENGR 210 Lab 12: Sampling and Aliasing

Projection. Announcements. Müller-Lyer Illusion. Image formation. Readings Nalwa 2.1

5/17/2009. Digitizing Color. Place Value in a Binary Number. Place Value in a Decimal Number. Place Value in a Binary Number

Digital Camera Technologies for Scientific Bio-Imaging. Part 2: Sampling and Signal

Antialiasing and Related Issues

Exercise questions for Machine vision

MULTIMEDIA SYSTEMS

Digital Cameras The Imaging Capture Path

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

UNIT III Data Acquisition & Microcontroller System. Mr. Manoj Rajale

Unit 8: Color Image Processing

Image Acquisition and Representation. Camera. CCD Camera. Image Acquisition Hardware

Image Acquisition and Representation

Design of a digital holographic interferometer for the. ZaP Flow Z-Pinch

MULTIMEDIA SYSTEMS

Music 270a: Fundamentals of Digital Audio and Discrete-Time Signals

ISO INTERNATIONAL STANDARD. Photography Electronic still-picture cameras Resolution measurements

Image Formation and Camera Design

Chapter 2: Fundamentals of Data and Signals

On spatial resolution

Transcription:

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester Lecture 6: Image Acquisition and Digitization 14.10.2017 Dr. Mohammed Abdel-Megeed Salem Media Engineering Technology, German University in Cairo

Course Info - Contents 1. Introduction 2. Elementary Image Information and Operations 3. Fundamentals of Signal and Image Processing 1. Definition, 2. Important Signals 3. Signal & Image Processing 4. Sampling and Quantization 4. Image Acqusition and Digitization 5. Sensing and Perception (HVS) and the Color Image Processing 6. Image Operations 1. Point Image Operations 2. Local Image Operations and Filters 3. Global Image Operation and Transforms Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 2

Course Info - Contents 1. Introduction 2. Elementary Image Information and Operations 3. Fundamentals of Signal and Image Processing 4. Image Acqusition and Digitization Analog vs Digital Images Technical Aspects Principles of Digitization Systems for Image Digitizing Display Devices 2D Sampling Theorem Mathematical Description Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 3

Analog vs Digital Images Analog Data in nature are analog Analog data must be converted to digital form before it can be manipulated by computers. Digital Bits are units of data that can have one of two values. Bytes are unites of eight bits Numbers, characters, colors,... are group of bits. Digitization comprises two operations: Sampling and quantization. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 4

Analog vs Digital Images Analog Digital Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 5

Analog vs Digital Images Analog Images Original continuous image Special procedures for characterization and manipulation: Film and paper is treated in a series of chemical baths Analog results Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 6

Analog vs Digital Images Digital Images Original analog image Simple Procedure of characterization and manipulation Analog results sometimes are desirable (for photo album) Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 7

Analog vs Digital Images Optics Spatial Range Signal converter Sampler Quantizer (Lenses) (Sensors) (Frame grabber) [Lehmann P. 142] Image acquisition system: LTI system Objective: Transmit a continuous signal f(x,y) in a matrix element g(m,n) H 2 : limitation in space H 3 : CCD camera (continuous in values, discrete in space) or CMOS H 4, H 5 : sampler and quantizer united in frame grabber Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 8

Outline 0. Course Information and Objectives 1. Introduction 2. Fundamentals of Signal and Image Processing 3. Image Acqusition and Digitization Analog vs Digital Images Technical Aspects Principles of Digitization Systems for Image Digitizing Display Devices 2D Sampling Theorem Mathematical Description Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 9

Principles of Digitization Vector Graphics vs Raster Images Images are displayed (rendered) as array of pixels using internal model. Images may be modelled using vector graphics or bitmap images (raster graphics). Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 10

Principles of Digitization Vector Graphics The images are stored as a mathematical description of a collection of individual lines, curves, and shapes. Computation is required for rendering Bitmap Array Is an array of pixels (storing color values). Can be mapped directly to the physical pixels on the display (e.g., Monitor). Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 11

Principles of Digitization Vector Graphics Bitmap Array Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 12

Principles of Digitization Vector Graphics Bitmap Array Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 13

Principles of Digitization Vector Graphics Bitmap Array Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 14

Principles of Digitization Vector Graphics Easy to transform (scaling, shifting, warping) with no distortion low memory requirements Properties of geometric elements will remain or can be changed any time Modern displays and printers are raster devices. Vector formats have to be converted to raster format. Bitmap Array Transformation is only possible by means of the whole image or after segmentation. Although all pixels of a certain object have common features but they are independent. Used directly by displays and printers. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 15

Principles of Digitization Vector Graphics To store: start to target coordinates, colour value, attributes (circle: centre, radius, colour, thickness, ) conversion to a raster image simple, opposite way difficult Bitmap Array To store: A set of pixels will have common visual features, such as color. Easy to be sensed. Difficult to be converted into vector graphics Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 16

Principles of Digitization Raster Images: Generation of raster images in two steps: scanning and digitization Scanning: Every picture element (=pixel) gets its definite coordinates. Sampling and Quantization: Assignment of a numeric value to an area segment. (e.g. Black = 0, white= 255) Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 17

Principles of Digitization Analog Signal Sampled Signal (Discrete) Quantized Signal (Digital) Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 18

Principles of Digitization Real Coordinate System Image Coordinate System Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 19

Principles of Digitization Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 20

Principles of Digitization Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 21

Principles of Digitization Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 22

Principles of Digitization Gray level image of Alexander Von Humboldt Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 23

Principles of Digitization Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 24

Principles of Digitization Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 25

Principles of Digitization Remarks: Scanning addressing a location in the image Sample measuring the grey value of a pixel location Quantization converting the continuous grey value in a discrete value Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 26

Outline 0. Course Information and Objectives 1. Introduction 2. Fundamentals of Signal and Image Processing 3. Image Acqusition and Digitization Analog vs Digital Images Technical Aspects Principles of Digitization Systems for Image Digitizing Display Devices 2D Sampling Theorem Mathematical Description Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 27

Digitization System Components Aperture: fine aperture of the optics to localize the image section. (the aperture of an optical system is the opening that determines the cone angle of a bundle of rays that come to a focus in the image plane.) Light sensor: detecting the pixel brightness and converting this amount to an electrical value Quantizer: converting the sensor output in numerical values Memory: storage of the grey value for further processing Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 28

Digitization System Components Zoom Lens Aperture IR Filter Memory Light Sensor A/D Display Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 29

Digitization System Components Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 30

Digitization System Components Requirements for digitizing devices low noise and low distortion pixel size and space adaptable to the application given linearity or adjustable nonlinearity number of pixels per row/column and levels of gray adjustable Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 31

Light Sensor Single sensor, array sensor, and 2D sensor array Rolling sensor array Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 32

Light Sensor Charge-Coupled Device (CCD) A CCD image sensor is an analog device. When light strikes the chip it is held as a small electrical charge in each photo sensor. The charges are converted to voltage one pixel at a time as they are read from the chip. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 33

Light Sensor Charge-Coupled Device (CCD) matrix of photodiodes on silicon converting photons into electrical charges charge proportional to the light collection of charges in a pool (packages) transport of the charge packets of shift registers sensor elements 11x13 μm Discrete output only! Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 34

Light Sensor CCD: Different read-out principles Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 35

Light Sensor CCD: Color sensor distributed based on Bayer pattern. 50% green sensors, 25% for red and 25% for blue. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 36

Light Sensor CCD Advantages: Compact, robust camera: Used in professional, medical, applications free of geometric distortions Good resolution Produce high quality images quality depending on the price Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 37

Light Sensor CCD Disadvantages: Gaps between the individual elements ( dead pixels ) Smearing: faulty signal, which is located vertically in the image (caused if shifting is not fast enough) Blooming: in case of too much light, the electrons that are collected in the bins will overflow overdrive in over- exposed cells Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 38

Light Sensor Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 39

Light Sensor Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 40

Light Sensor CMOS: Complementary metal oxide semiconductor Is an active-pixel sensor (APS): consisting of an integrated circuit containing an array of pixel sensors, each pixel containing a photodetector and an active amplifier. Suited to applications in which packaging, power management, and on-chip processing are important. Widely used, from high-end digital photography down to mobile-phone cameras. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 41

Light Sensor CCD vs CMOS Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 42

Light Sensor CMOS Advantages: Single power supply Low power consumption X, Y addressing and subsampling Smallest system size Easy integration of circuitry Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 43

Light Sensor CMOS Disadvantages: Due to the fact that CMOS sensor captures a row at time within approximately 50 Hz or 60 Hz it may result in a "rolling shutter" effect, where the image is skewed (tilted to the left or right, depending on the direction of camera or subject movement). A frame-transfer CCD sensor does not have this problem, instead capturing the entire image at once into a frame store. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 44

Types of sensors used?! CCD: CMOS: 1. High quality low noise. 2. 100 times more power consumed than a CMOS sensor. 3. More expensive than the cmos sensors. 1. More noise. 2. Low power consumption. 3. CMOS chips can be fabricated on just about any standard silicon production line, so they tend to be extremely inexpensive compared to CCD sensors. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 45

Outline 0. Course Content and Objectives 1. Introduction 2. Fundamentals of Signal and Image Processing 3. Image Acqusition and Digitization Analog vs Digital Images Technical Aspects Principles of Digitization Systems for Image Digitizing Display Devices 2D Sampling Theorem Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 46

Display Devices Permanent systems: printer Non-permanent systems: Monitor (cathode ray tubes, LCD, TFT,... ) Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 47

Outline 1. Introduction 2. Fundamentals of Signal and Image Processing 3. Image Acqusition and Digitization Analog vs Digital Images Technical Aspects Principles of Digitization Systems for Image Digitizing Display Devices Sampling and Quantization 2D Sampling Theorem Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 48

Sampling and Quantaization The balance of Amount of data - information loss Sampling is the conversion of a continuous signal to a discrete signal. It is to produce samples equivalent to the instantaneous value of the continuous signal at the desired points. Sampling is performed by measuring the value of the continuous signal every a constant period of time, which is called the sampling interval. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 49

Sampling and Quantaization Sampling Divide the horizontal axis (time) into discrete pieces The continuous signal reduced to a sequence of equally spaced values. -> Discrete Signal Sampling rate: The number of samples in a fixed amount of time or space. Undersampling leads to aliasing Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 50

Sampling 768x1024 Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 51

Sampling 192x256 Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 52

Sampling 24x32 Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 53

Sampling 3x4 Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 54

Sampling 3x4 Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 55

5 x 4 pixel Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 56

11 x 8 pixel Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 57

22 x 16 pixel Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 58

45 x 32 pixel Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 59

about 500 x 128 pixel Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 60

Digitization Quantization: is restricting the sample values to a set of quantization levels. Hence, in order to have every sample on one of the allowed levels: some of the values may be chopped off, some of the values may be rounded up. The quantization levels are the set of values to which a signal is quantized. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 61

Digitization Quantization: Divide the vertical axis (signal strength - voltage) into pieces. For example, 8- bit quantization divides the vertical axis into 256 levels. 16 bit gives you 65536 levels. Lower the quantization, lower the quality of the sound Linear vs. Non-Linear quantization: If the scale used for the vertical axis is linear we say its linear quantization; If its logarithmic then we call it non-linear ( -law or A-law in Europe). The non-linear scale is used because small amplitude signals are more likely to occur than large amplitude signals, and they are less likely to mask any noise.

Digitization Reconstruction The information is lost between samples. In order to reconstruct the signal, we need to fill in the gaps between the samples. One way to fill in the gaps between samples is to sample and hold: The value of a sample is used for the entire extent between it and the following sample. This produces a signal with abrupt transitions. This is not very accurate but suitable for many situations. Digitized signal Reconstructed signal Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 63

Quantaization Range of quantization: s in (s min, s max ) Each sample of the signal is mapped to a quantum level s min <= c i <=s max, 1<=i<=L, L>=2. Using minimum-distance criterion: Error: g(x,y) = argmin (1<=i<=L) {d(s(x,y), c i )} g = argmin (1<=i<=L) {d(s, c i )} (Note: s, g are ind. on x,y) Summation (k) (s k -g k ) 2 Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 64

Quantization Original 80000 colours Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 65

Quantization 256 colours Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 66

Quantization 64 colours Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 67

Quantization 16 colours Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 68

Quantization 8 colours Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 69

Quantization 4 colours Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 70

Quantization 2 colours Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 71

202 grey values Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 72

16 grey values Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 73

2 grey values Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 74

Principles of Digitization Analog Signal Sampled Signal (Discrete) Quantized Signal (Digital) Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 75

Sampling Theorem Sampling Theorem is the theoretical basis for an optimum grid size. Optimisation criterion: choose grid size so that no information gets lost. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 76

Sampling Theorem f(t) 1D Problem:? T A?? t Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 77

Nyquist Theorem Consider a sine wave Sampling once a cycle Appears as a constant signal For Lossless digitization, the sampling rate should be at least twice the maximum frequency responses Sampling 1.5 times each cycle Appears as a low frequency Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 78 sine signal

Nyquist Theorem The Sampling Theorem states that, if the highestfrequency component of a signal is at f h, the signal can be properly reconstructed if it has been sampled at a frequency greater than 2 f h. This limiting value is known as the Nyquist rate. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 79

Nyquist Theorem Sampling rate vs frequency How a pure sine waves at different frequencies combine to produce more complex waveforms. Starting with a pure sine wave of frequency f, we successively add components to it with frequencies of 3f, 5f, 7f, and so on, whose amplitudes are one third, one fifth, one seventh, of the amplitude of the original signal. As you can see, as we add more harmonics, the signal begins to look more and more like a square wave; the more frequency components we add, the better the approximation. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 80

Nyquist Theorem Application: Nyquist theorem is used to calculate the optimum sampling rate in order to obtain good audio quality. For example, if the CD standard sampling rate of 44100 Hz means that the waveform is sampled 44100 times per sec. Digitally sampled audio has a bandwidth of (20 Hz - 20 KHz). By sampling at twice the maximum frequency (40 KHz) we could have achieved good audio quality. CD audio slightly exceeds this, resulting in an ability to represent a bandwidth of around 22050 Hz. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 81

Nyquist Theorem Nyquist Rate Some authors, especially in the field of audio, use the term Nyquist rate to denote the highest-frequency component that can be accurately reproduced. That is, if a signal is sampled at fs, their Nyquist rate is fs/2. The fact that the term is used with both meanings is unfortunate, but any ambiguity is usually easily resolved by context. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 82

Sampling Theorem The discrete spectrum of the time stationary signals has all information. If you have a time-limited signal (period T 0 ) it is enough to have spectral values in a distance of (f A < 1/T 0 ). -T 0 /2 +T 0 /2 t f A f Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 83

Sampling Theorem The discrete spectrum of the time stationary signals has all information If you limit the frequency content to f g then it is enough to have samples in a distance of Δt < 1/(2 f g ). T A -f g +f g f Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 84

Sampling Theorem The discrete spectrum of the time stationary signals has all information Sampling rate must be at least as double as the highest frequency contained in the signal 1/ Δt > (2 f g ). -T 0 /2 +T 0 /2 t T A Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 85

Sampling Theorem Continuous signal Continuous spectrum Periodic signal discrete spectrum Time limited signal is continued periodically discrete spectrum Discrete spectrum Fourier synthesis periodic signal cut one period Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 87

Sampling Theorem Continous Signal Sampled Signal (Discrete) Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 88

2D Sampling Theorem Image are 2D Signals Problem: given: a spatial continuous image f(x,y) wanted: a spatial discrete image Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 89

2D Sampling Theorem Image are 2D Signals Question: How to choose Δx and Δy if we don t want loss of information? Solution process: define a sequence of 2D Delta impulses multiply the image by this sequence result is a discrete image, existing only at the discrete coordinates Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 90

2D Sampling Theorem Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 91

2D Sampling Theorem 2D Dirac field: 2D discrete image: Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 92

Sampling Theorem Spectral overlap if the sampling frequency is too small a) signal to be sampled and b) corresponding spectral function c) sampled signal; Δt =2/3 s, d) corresponding spectral function, ω A = 2π/T A Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 93

Sampling Theorem e) sampled signal, Δt = 2 s, f) corresponding spectral function g) from h) reconstructed signal, h) one period from f) with ±ω N =±π/2 Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 94

Sampling Theorem Undersampling happens when samples are too far apart. In this case, any reconstruction will be inadequate. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 95

Sampling Theorem Undersampling Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 96

Sampling Theorem Undersampling This phenomenon is known as aliasing, and is perceived in different ways in different media. With sound, it is heard as distortion; in images, it is usually seen in the form of jagged edges, or, where the image contains fine repeating details, Moiré patterns. Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 97

Effect of under sampling on high detailed image.

Rio-Andirrio-Brücke Straßenbrücke über den Golf von Korinth

Comments Sampling Determines the resolution of the image Pixel dimensions (Width x Height). Reducing the resolution called down-sampling, increasing it called up-sampling. Too low Sampling rate cause loss of information and reduces the image dimensions. Pixelization Quantization Determines the number of bits used to store a colour value - the colour depth. Determines how many colours can be represented. Too low quantization level leads to loss of image details but reduces file size. Posterization Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 104

Comments 198 x 149 1654 x 1240 Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 105

Comments Pixelization Posterization Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 106

Comments Pixelization Posterization 24bit 8bit Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 107

Readings Rafael G. Gonzalaz and Richard E. Woods, Digital Image Processing, 3 rd Edition, Pearson Edu., 2008. [Section 2.2: Image Sensing and Acquisition] Chapman and Chapman, Digital Multimedia, 3rd Edition, [Section 3.1: Victor Graphics and Bitmap Graphics] Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 108

Contacts Image Processing for Mechatronics Engineering, for senior students, Winter Semester 2017 Dr. Mohammed Abdel-Megeed M. Salem Media Engineering Technology, German University in Cairo Office: C7.311 Ext. 3580 Tel.: +2 011 1727 1050 Email: mohammed.salem@guc.edu.eg Salem, Image Processing for Mechatronics Engineering, Winter Semester 2017 Lecture 6 109