Sunteți pe pagina 1din 101

Digital Image Processing

Dr. Salma Hamdy


s.hamdy@cis.asu.edu.eg

Course Information
(3 hour lecture + 2 hour lab) a week. Assignments and lab tasks. Assessment
Final-Term Examination Oral Discussion Practical Examination Semester Work 65 % 10 % 15 % 10 %

Office hours: undetermined due to the lack of an office.

Course Text Book and References


Digital Image Processing, 3rd edition, Rafael C. Gonzalez and Richard E. Woods, Prentice Hall, 2008, http://www.imageprocessingplace.com

Image Processing, Analysis and Machine Vision, Milan Sonka, Vaclav Hlavac, Roger Boyle, Thomson, 2008, http://visionbook.felk.cvut.cz/index.html The Essential Guide to Image Processing, Alan C. Bovik, Academic Press, 2009. Digital Image Processing and Analysis: Human and Computer Vision Application with CVIPtools, 2nd edition, S. E. Umbaugh, CRC Press, 2011. Mastering Matlab 6: A Comprehensive Tutorial and Reference, D. Hanselman and B. Littlefield, Prentice Hall, 2000. Digital Image Processing Using MATLAB, 2nd edition, Rafael C. Gonzalez, Richard E. Woods, and Steven L. Eddins, Gatesmark Publishing, 2009.

Course Outline
Later in the lecture.

Course Outcomes
During and upon the completion of this course, you will Know how to write programs that display and manipulate 2D images. Have a basic understanding of various image operations. Make use of data structures, linear algebra, and signal processing. Require substantial programming effort and good software engineering practices. Develop and deploy an image processing application of your own design.

Introduction

Contents
1. 2. 3. 4. 5. 6. What is a Digital Image? What is Digital Image Processing? History. Applications. Components of Image Processing System. Fundamental Steps of Digital Image Processing. 7. Image Acquisition.

1. What is a Digital Image?


Photo Vs. Image Vs. Picture. Digital image.

1. What is a Digital Image? (cont.)


Photo Vs. Image Vs. Picture. Digital image.
(0,0) y
1 pixel

f(x,y)

2. What is DIP?
DIP: Processing of a digital image by means of a computer.

Major tasks:
Improvement of pictorial information for human interpretation. Processing of scene data for autonomous machine perception.

2. What is DIP? (cont.)


Image Processing
Low Level Process

Image Analysis
Mid Level Process

Machine Vision
High Level Process

Input: Image Output: Image


Examples: Noise removal, image sharpening

Input: Image Output: Attributes


Examples: Object recognition, segmentation

Input: Attributes Output: Understanding


Examples: Scene understanding, autonomous navigation

In this course we will stop here

Interaction with related fields.

3. History
NY <--- submarine cable ---> London Bartlane System (1920)

Early digital image Improved digital image Early 15 tone digital image

3. History (cont.)
Space programs (1960s) Medical applications (1970s)

A picture of the moon taken by the Ranger 7 probe minutes before landing

Typical head slice CAT image

3. History (cont.)
1980s - Today
Human interpretation
Space programs. Medical imaging. Tomography scans. Remote earth observations from aerials/satellites. Astronomy. Archeology. Physics.

Machine perception
Automatic character recognition. Industrial machine vision. Military recognition. Auto-processing of fingerprints. Auto-processing of aerial/satellite imagery -> weather forecasting.

4. Example Applications
Could be useful to categorize by image source. Selected most common:
Image enhancement/restoration. Special effects. Medical Visualisation. Industrial inspection. Law enforcement. Human computer interfaces.

4. Example Applications (cont.)


- Image Enhancement/restoration: One of the most common uses of DIP techniques: improve quality, remove noise, etc.

4. Example Applications (cont.)


- Image Enhancement/restoration: One of the most common uses of DIP techniques: improve quality, remove noise, etc.

4. Example Applications (cont.)


- Special Effects: make images more visually appealing, or make composites.

4. Example Applications (cont.)


- Medical Visualization: Computerized Axial Tomography (CAT) scans. Magnetic Resonance Imaging (MRI).

4. Example Applications (cont.)


- Industrial Inspection: detecting anomalies.

4. Example Applications (cont.)


- Law Enforcement: automated detection, tracking, and identification.

4. Example Applications (cont.)


- HCI: Try to make human computer interfaces more natural
Face recognition Gesture recognition Computer Graphics

5. Components of a IP System
Network Image Display Mass Storage

Computer

Hardcopy

Specialized Hardware

Image Processing Software

Image sensors Problem Domain

6. Fundamental Steps of DIP


Output is generally images Wavelet and Multiresolution Color Image Processing Compression Morphological Processing

Output is generally attributes

Knowledge base

Restoration

Segmentation Representation and Description Object Recognition

Enhancement

Acquisition
Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

6. Fundamental Steps of DIP (cont.)


Image Restoration Morphological Processing

Image Enhancement Image Acquisition

Segmentation

Object Recognition Representation & Description Colour Image Processing Image Compression

Problem Domain

Image Acquisition

Contents
1. 2. 3. 4. 5. 6. 7. Human Visual Perception Light and Electromagnetic Spectrum Image Sensing and Acquisition Image Sampling and Quantization Self-study sections. Summary Next Lecture.

1. Human Visual Perception


- Structure of the Human Eye

1. Human Visual Perception (cont.)


- Image Formation in the Eye

1. Human Visual Perception (cont.)


- Blind Spot Experiment

Close your right eye and focus on the cross with your left eye. Hold the image about 20 inches away from your face and move it slowly towards you. The dot should disappear!

1. Human Visual Perception (cont.)


- Brightness Adaptation and Discrimination
The HVS can perceive approximately 1010 different light intensity levels However, at any one time we can only discriminate between a much smaller number (brightness adaptation)

1. Human Visual Perception (cont.)


- Brightness Adaptation and Discrimination Resulting Phenomena: Mach Bands.

An example of Mach bands

1. Human Visual Perception (cont.)


- Brightness Adaptation and Discrimination Resulting Phenomena: Mach Bands.

1. Human Visual Perception (cont.)


- Brightness Adaptation and Discrimination Resulting Phenomena: Simultaneous Contrast.

1. Human Visual Perception (cont.)


- Brightness Adaptation and Discrimination Resulting Phenomena: Optical Illusions.

1. Human Visual Perception (cont.)


- Brightness Adaptation and Discrimination Resulting Phenomena: Optical Illusions.

1. Human Visual Perception (cont.)


- Brightness Adaptation and Discrimination Resulting Phenomena: Optical Illusions.

2. Light and Electromagnetic Spectrum


Light is a part of the EM spectrum that can be sensed by the human eye.

2. Light and Electromagnetic Spectrum

2. Light and Electromagnetic Spectrum

2. Light and Electromagnetic Spectrum


Reflected Light Colours we perceive are determined by the nature of the light reflected from an object. Chromatic light
Radiance Luminance Brightness
Colours Absorbed

Achromatic light
Intensity

3. Image Sensing & Acquisition

3. Image Sensing & Acquisition (cont.)


Incoming energy lands on a sensor material responsive to that type of energy and this generates a voltage. Collections of sensors are arranged to capture images.

Imaging Sensor

3. Image Sensing & Acquisition (cont.)


Incoming energy lands on a sensor material responsive to that type of energy and this generates a voltage. Collections of sensors are arranged to capture images.

Line of Image Sensors

Array of Image Sensors

3. Image Sensing & Acquisition (cont.)


- Single Sensor

3. Image Sensing & Acquisition (cont.)


- Sensor Strips and Rings

4. Image Sampling & Quantization


Image is continuous in x- and y-coordinates sampling amplitude quantization

4. Image Sampling & Quantization (cont.)

sample

sample

sample

4. Image Sampling & Quantization (cont.)


- Continuous Image

4. Image Sampling & Quantization (cont.) - Quantization Sampling

4. Image Sampling & Quantization (cont.)


Quality depends on number of samples and discrete intensity levels used in sampling and quantization.

4. Image Sampling & Quantization (cont.)


- Image Formation Digital image is composed of M rows and N columns of pixels each storing a value f(x,y). Usually in practice, the grey scale is shifted to [0,L-1]. x and y are called spatial coordinates. Usually we deal with square images; M=N.

4. Image Sampling & Quantization (cont.)


- Image Representation

4. Image Sampling & Quantization (cont.)


- Image Representation

4. Image Sampling & Quantization (cont.)


- Image Representation

4. Image Sampling & Quantization (cont.)


- Image Representation

4. Image Sampling & Quantization (cont.)


- Image Representation The number L of discrete intensity levels is typically a power of 2. L = 2k Bits required to store the image. k-bit image. Dynamic range affects contrast.

4. Image Sampling & Quantization (cont.)


- Contrast Ratio

4. Image Sampling & Quantization (cont.)


- Contrast Ratio

4. Image Sampling & Quantization (cont.)


- Contrast Ratio

4. Image Sampling & Quantization (cont.)


- Image Resolution A measure of quality of the image. How close the lines can be to each other and still be visibly resolved. Depends strongly on the number of Samples Pixel and Spatial Resolution Gray levels Intensity Resolution

4. Image Sampling & Quantization (cont.)


1- Pixel Resolution Refers to the pixel count of the image. Conventions:
The number of pixel columns (width) times the number of pixel rows (height), e.g. as 640 by 480. The total number of pixels in the image, typically given as number of megapixels.

4. Image Sampling & Quantization (cont.)


1- Pixel Resolution

128 256

64 32

512

1024

4. Image Sampling & Quantization (cont.)


1- Pixel Resolution

10241024

4. Image Sampling & Quantization (cont.)


1- Pixel Resolution

512512

4. Image Sampling & Quantization (cont.)


1- Pixel Resolution

256256

4. Image Sampling & Quantization (cont.)


1- Pixel Resolution

128128

4. Image Sampling & Quantization (cont.)


1- Pixel Resolution

6464

4. Image Sampling & Quantization (cont.)


1- Pixel Resolution

3232

4. Image Sampling & Quantization (cont.)


2- Spatial Resolution The size of the smallest object that can be resolved on the ground. Could be application dependent. Refers to the number of pixel in a spatial measurement of a physical image (values per unit length).
e.g. pixels per inch (ppi) or dots per inch (dpi). e.g. newspaper dpi, magazine dpi.

4. Image Sampling & Quantization (cont.)


2- Spatial Resolution It is a property of the physical imaging system not the digital image. In practice, the clarity of an image is decided by its spatial resolution NOT the count of pixels. Pixel size and spatial resolution are used interchangeably, but in reality they are NOT equivalent.

4. Image Sampling & Quantization (cont.)


- Spatial Resolution Vs. Pixel Size

10 m resolution 10 m pixel size

30 m resolution 10 m pixel size

80 m resolution 10 m pixel size

4. Image Sampling & Quantization (cont.)


- Pixel Size
Pixel Size = 10 m Image size = 160X160 pixels Pixel Size = 20 m Image Size = 80X80 pixels Pixel Size = 40 m Image Size = 40X40 pixels Pixel Size = 80 m Image Szie = 20X20 pixels

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution Refers to the number of intensity levels used to represent the image
More intensity levels = finer discernable detail. In terms of number of bits used to store each intensity level.

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution
256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)

16 grey levels (4 bpp)

8 grey levels (3 bpp)

4 grey levels (2 bpp)

2 grey levels (1 bpp)

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution

256 grey levels (8 bits per pixel)

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution

128 grey levels (7 bbp)

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution

64 grey levels (6 bbp)

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution

32 grey levels (5 bbp)

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution

16 grey levels (4 bbp)

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution

8 grey levels (3 bbp)

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution

4 grey levels (2 bbp)

4. Image Sampling & Quantization (cont.)


3- Intensity Resolution

2 grey levels (1 bbp)

4. Image Sampling & Quantization (cont.)


- Resolution: How much is enough? This all depends on what is in the image and what you would like to do with it Key questions include - Does the image look aesthetically pleasing? - Can you see what you need to see within the image?

4. Image Sampling & Quantization (cont.)


- Resolution: How much is enough?

The picture on the right is fine for counting the number of cars, but not for reading the number plate.

4. Image Sampling & Quantization (cont.)


- Resolution: How much is enough? Varying N and k.

Low Detail

Medium Detail

High Detail

4. Image Sampling & Quantization (cont.)


- Resolution: How much is enough?

Isopreference curve in the Nk-plane

5. Self-study
Section (2.5)
Neighborhood Adjacency Connectivity Regions Boundaries Distance Mathematical operations used in DIP.

Section (2.6)

7. Summary mind map


Restoration Acquisition Enhancement Morphological y

Digital Image
x

Steps of DIP
Segmentation Representation Recognition & Description

History

DIP

Components of IP System

Display Networking

Apps

Storage Sensors HW SW Computer

7. Summary mind map


Restoration Acquisition Enhancement Morphological y

Digital Image
x

Steps of DIP
Segmentation Representation Recognition & Description

History

DIP

Components of IP System

Display Networking

Apps

Storage Sensors HW SW Computer

7. Summary mind map


Restoration Acquisition Quantization Enhancement Morphological Digital Sampling Representation y

Image

Steps of DIP
Segmentation

Acquisition

History

Representation HVS Sensing Recognition & Description EM Spectrum

DIP

Components of IP System

Display Networking

Apps

Storage Sensors HW SW Computer

7. Next Lecture
Image Enhancement Techniques - Intensity Transformations - Histogram Processing ------ Smoothing Spatial Filters - Sharpening Spatial Filters - Combined Methods.

S-ar putea să vă placă și