SGN-3016 Digital Image Processing (5 cr)moncef/SGN-3016-DIP/Chapter01-2p.pdf · • Use Matlab to...

25
9/2/2010 1 SGN-3016 Digital Image Processing (5 cr) Lecturer: Moncef Gabbouj Lectures: Term 1 (Periods I and II), Room TB 223, Fridays12:15 – 14.00 Exercises and Assistants: Dr. Esin Guldogan (Office TX xxx) Group 1: Tuesdays 14.15-16.00, room TC 415 Group 2: Wednesdays 14.15-16.00, room TC 415 Group 3: Thursdays 14.15-16.00, room TC 415 Course webpage: http://www.cs.tut.fi/~moncef/SGN-3016-DIP/ First Lecture: Friday3 September 2010 First Exercises: Tuesday 7 th September 2010 (Group 1), Wednesday 8 th September 2010 (Group 2) and Thursday 9 th September 2010 (Group 3). Each student is assigned to ONE exercise group! Description: Basic principles and concepts of image processing will be covered in the course. 1.1 Textbook: Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing, Third Edition, Prentice Hall, 2007, Chapters 1-6. Other references: The Image Processing Handbook, John C. Russ, Editor, CRC Press, 1999. Introduction to Digital Image Processing with Matlab, A. McAndrew, Thomson, 2004. Chapters to be Covered Chapter 1: Introduction to Digital Image Processing Chapter 2: Digital Image Fundamentals Chapter 2: Digital Image Fundamentals Chapter 3: Intensity Transformations and Spatial Filtering Chapter 4: Filtering in the Frequency Domain Chapter 5: Image Restoration and Reconstruction Chapter 6: Color Image Processing 1.2

Transcript of SGN-3016 Digital Image Processing (5 cr)moncef/SGN-3016-DIP/Chapter01-2p.pdf · • Use Matlab to...

9/2/2010

1

SGN-3016 Digital Image Processing (5 cr)Lecturer: Moncef GabboujLectures: Term 1 (Periods I and II), Room TB 223, Fridays12:15 – 14.00

Exercises and Assistants:Dr. Esin Guldogan (Office TX xxx)Group 1: Tuesdays 14.15-16.00, room TC 415Group 2: Wednesdays 14.15-16.00, room TC 415Group 3: Thursdays 14.15-16.00, room TC 415Course webpage: http://www.cs.tut.fi/~moncef/SGN-3016-DIP/

First Lecture: Friday3 September 2010First Exercises: Tuesday 7th September 2010 (Group 1), Wednesday 8th September 2010 (Group 2)

and Thursday 9th September 2010 (Group 3). Each student is assigned to ONE exercise group!

Description: Basic principles and concepts of image processing will be covered in the course.

1.1

Textbook: Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing, Third Edition, Prentice Hall, 2007,

Chapters 1-6.

Other references:The Image Processing Handbook, John C. Russ, Editor, CRC Press, 1999.Introduction to Digital Image Processing with Matlab, A. McAndrew, Thomson, 2004.

Chapters to be CoveredChapter 1: Introduction to Digital Image ProcessingChapter 2: Digital Image FundamentalsChapter 2: Digital Image FundamentalsChapter 3: Intensity Transformations and Spatial FilteringChapter 4: Filtering in the Frequency DomainChapter 5: Image Restoration and ReconstructionChapter 6: Color Image Processing

1.2

9/2/2010

2

Course Goals and OutcomesCourse Goals: This course is designed to help the student:• Apply principles and techniques of digital image processing in applications related

to digital imaging system design and analysis.• Analyze and implement image processing algorithms.• Gain hands-on experience in using software tools for processing digital images.

Course Outcomes: This course requires the student to demonstrate the ability to:• Explain the basic elements and applications of image processing• Analyze image sampling and quantization requirements and implications• Perform Gray level transformations for image enhancement• Apply histogram equalization for image enhancement• Use and implement order-statistics image enhancement methods• Design and implement two-dimensional spatial filters for image enhancement• Model the image restoration problem in both time and frequency domains

1.3

• Model the image restoration problem in both time and frequency domains• Explain Wiener filtering for de-blurring and noise removal• Explain the representation of colors in digital color images • Use Matlab to implement different image processing tasks• Document implementation code, report experimental results and draw proper

conclusions• Prepare and submit a (optional) project report.

Course Schedule

03.09. Introduction to Digital Image Processing10.09. Chapter 2: Digital Image Fundamentals10.09. Chapter 2: Digital Image Fundamentals17.09. Chapter 2: Digital Image Fundamentals (cont’d)24.09. Chapter 3: Intensity Transformation and Spatial Filtering01.10. No lecture08.10. Chapter 3: Intensity Transformation and Spatial Filtering (cont’d)15.10. Chapter 4: Filtering in the Frequency Domain

18.-22.10. Exam week29 10 Ch 4 Fil i i h F D i ( ’d)

1.4

29.10. Chapter 4: Filtering in the Frequency Domain (cont’d)05.11. Chapter 4: Filtering in the Frequency Domain (cont’d)12.11. Chapter 5: Image Restoration19.11. Chapter 5: Image Restoration (cont’d)26.11. Chapter 6: Color Image Processing 03.12. Chapter 6: Color Image Processing (cont’d) and Course Review

9/2/2010

3

General InformationPrerequisitesStudents should be familiar with mathematical analysis, matrix theory,

probability, linear systems theory, and computer (Matlab) programming.RequirementsOne final exam, homework and attendance of the exercises and an optional

computer project. The optional project may not raise your course grade by more than one point.

To pass the course, you need to get at least 50% of the exam points and attend a minimum of 8 exercises.

1.5

Exam Dates13 Dec 2010, 9.00 - 12.00, Make-up 24 Jan 2011, 9.00 - 12.00 and 7 March

2011, 9.00-12.00. Pre-registration for ALL exams is mandatory!AttendanceHighly recommended for the lectures as from time to time, additional topics,

not covered in the book, will be discussed in class

Chapter 1: IntroductionEarly stages of digital photographyChapter 1: IntroductionEarly stages of digital photography

over

1.6

85-year old!

9/2/2010

4

Chapter 1: IntroductionChapter 1: Introduction

1.7

Chapter 1: IntroductionChapter 1: IntroductionIn contrast, look at the image of the smallest object ever photographed

1.4 nanometer-long pentacene molecule comprised of 22 carbon atoms and 14 hydrogen atoms. You can actually make out each of those atoms and their bonds, and it's thanks to the atomic force microscope.

1.8

and their bonds, and it s thanks to the atomic force microscope.

http://gizmodo.com/5346964/crazy+powerful-ibm-microscope-takes-first-3d-image-of-molecular-atomic-bonds

9/2/2010

5

Chapter 1: IntroductionChapter 1: Introduction

A team from IBM Research Zurich used what is known as an atomic

1.9

A team from IBM Research Zurich used what is known as an atomic force microscope or AFM to photograph the molecule at using a silicon microscale cantilever coated in carbon dioxide lasers, an "ultrahigh vacuum" and temperature around 5 degrees Kelvin!

Chapter 1: IntroductionChapter 1: Introduction

1.10

FIGURE 1.4 The first picture of the moon by a US spacecraft.Ranger 7 took this image on July 31, 1964, about 17 minutes before impacting the lunar surface (Courtesy of NASA)

9/2/2010

6

Chapter 1: IntroductionRadiation-based imagesChapter 1: IntroductionRadiation-based images

Images based on radiation from ElectroMagnetic spectrum are most familiar, e.g. X-ray images and visible spectrum images.

EM waves can be thought of as propagating sinusoidal waves of varying wavelengths or as a stream of massless particles, each traveling in a wavelike pattern and moving at the speed of light.

Each massless particle contains a certain amount (or bundle) of energy. Each bundle of energy is called a photon.

1.11

100

If spectral bands are grouped according to energy per photon, we obtain the spectrum below.

Chapter 1: IntroductionRadiation-based imagesChapter 1: IntroductionRadiation-based images

Each massless particle contains a certain amount (or bundle) of energy Each

100

Each massless particle contains a certain amount (or bundle) of energy. Each bundle of energy is called a photon.

If spectral bands are grouped according to energy per photon, we obtain the spectrum below.

1.12

9/2/2010

7

Chapter 1: IntroductionChapter 1: IntroductionBone Scan PET Scan

notice the tumori h b i d

Examples ofGamma-ray in the brain and

in the lung

Ga a ayimaging

1.13

Cygnus loop is a gas cloudgenerated by a star in theconstellation of Cygnus

Gamma radiation froma valve in a nuclear reactor

notice the area ofstrong radiation

Center for Gamma-Ray Imaging, Univ of Arizona: http://www.radiology.arizona.edu/CGRI/research.html

Chapter 1: IntroductionExamples of X-ray imagingChapter 1: IntroductionExamples of X-ray imaging

Chest X-rayChest X ray

Image of bloodvessels(angiogram)

X-ray of circuit board

1.14

Computerisedaxial tomography(CT) of the head

Cygnus loop in theX-ray band

9/2/2010

8

Chapter 1: IntroductionChapter 1: Introduction

1.15

Chapter 1: IntroductionExamples of X-ray imagingChapter 1: IntroductionExamples of X-ray imaging

CT scan vs MRI imaging:CT scan vs MRI imaging:

http://www.cancerhelp.org.uk/help/default.asp?page=149

1.16

9/2/2010

9

Chapter 1: IntroductionChapter 1: IntroductionExamples of ultraviolet imaging

UV is used in fluorescence microscopy, a method to study material which can be made to fluoresce.

Normal cornInfected corn (by smut)

1.17

UV imaging is used in lithography, industrial inspection, microscopy, biological imaging and astronomical observations

Cygnus loop in theUV band

Smut corn disease

Chapter 1: IntroductionImaging in the visible and IR bandsChapter 1: IntroductionImaging in the visible and IR bands

Examples ofExamples of light microscopy images

1.18

Applications range from enhancement to measurements.

9/2/2010

10

Chapter 1: IntroductionChapter 1: Introduction

1.19

NASA’s Landsat satellite captures and transmits images of Earth from space for the purpose of monitoring environmental conditions on the planet. It uses both visible and infrared regions of the spectrum.

Chapter 1: IntroductionChapter 1: Introduction

1.20The Potomac river is clearly seen in all bands

9/2/2010

11

Chapter 1: IntroductionChapter 1: Introduction

1.21

More hurricane pictures from Plymouth State University Weather Center

Chapter 1: IntroductionHuman settlements in the AmericasChapter 1: IntroductionHuman settlements in the Americas

1.22

9/2/2010

12

Chapter 1: IntroductionChapter 1: Introduction

1.23

Chapter 1: IntroductionChapter 1: Introduction

1.24

9/2/2010

13

Chapter 1: IntroductionChapter 1: Introduction

1.25

Chapter 1: IntroductionChapter 1: Introduction

1.26

9/2/2010

14

Chapter 1: IntroductionChapter 1: Introduction

1.27

Chapter 1: IntroductionChapter 1: Introduction

1.28

9/2/2010

15

Chapter 1: IntroductionChapter 1: Introduction

Examples of Scanning Electron Microscope (SEM) images

1.29

Chapter 1: IntroductionChapter 1: Introduction

Examples of computer generated images

1.30

9/2/2010

16

Photographs from Tampere168 m high

1.31

Early panorama with mobile phone camera

• 25 frames, 320x240 resolution. Final image 705x262

9/2/2010

17

34 © 2005 400% of original size

9/2/2010

18

Chapter 1: IntroductionChapter 1: Introduction

1.35

Chapter 1: IntroductionChapter 1: Introduction

1.36

9/2/2010

19

On an area array CCD, amatrix of hundreds of

With digital photography,the detector is a solid state

How are pictures made?

A basic image capture system contains a lens matrix of hundreds of

thousands of microscopicphotocells creates pixelsby sensing the lightintensity of smallportions of the filmimage.

the detector is a solid stateimage sensor called acharge coupled device,(CCD) for short.

system contains a lensand a detector. Film detects far more visual information than is possible with a digital system.

1.37Ref.: www.kodak.com/US/en/digital/dlc/book3/chapter1/digFundCapture1.shtml

Types of Image Degradations (1/2)

lack of contrast

motion blur

image enhancement

1.38image

restoration

9/2/2010

20

Types of Image Degradations (2/2)

BLURRINGBLURRING

image enhancement

1.39

NOISE

imagerestoration

Chapter 1: IntroductionChapter 1: Introduction

A l di i l i iAnalog versus digital image processing

Analog image Digital image+ imitates light intensity - records only samples of the

information rather than all of it+ compactness + copy quality

1.40

+ scalability + freedom from noise

+ seamlessness + computer compatibility

http://www.videomaker.com/article/3250/

9/2/2010

21

Chapter 1: IntroductionChapter 1: Introduction

Recall that an analog signal copies by imitating:

Light from the camcorder lens slams into a sensor on the imaging chip, creating an electrical charge.

The stronger the light, the stronger the charge, which is to say that the electrical signal is imitating the intensity of the light that produced it.

1.41

Multiply this stimulus/response by several hundred thousand sensors covering all three primary colors and you have the entire optical image imitated by an electrical signal of rapidly and continuously varying voltage.

back

Chapter 1: IntroductionChapter 1: Introduction

In a digital system, by contrast, the first thing that happens to the original continuous signal is that it's fed through an analog/digital converter chip.

That chip looks at the signal hundreds of thousands of separate times per second and assigns each discrete sampling a numerical value that corresponds to the strength of the signal at that precise moment in time.

These numbers, rather than the signal itself, represent the digital image.

This means that digital recording differs from analog in two crucial ways:

1.42

This means that digital recording differs from analog in two crucial ways:

It numerically encodes the information rather than electrically mimicking itIt records only samples of the information rather than all of it.

back

9/2/2010

22

Chapter 1: IntroductionChapter 1: Introduction

CompactnessInformation in analog image or video can be stored very efficiently and cheaply (up to two and a half hours of video on one $1 VHS tape at SP speed).

High-quality digital video demands a huge amount of storage space. For example, DVDs (Digital Versatile Disks), must squeeze 4.7 gigabytes of data onto a single side of the disk just to fit a feature-length movie and that's with a hefty dose of compression.

1.43

back

Chapter 1: IntroductionChapter 1: Introduction

ScalabilityAll videos, analog and digital, tend to look sharper and clearer on a smaller screen; it's the natural result of squeezing the same amount of visual information into a smaller space. All but the highest quality digital video, however, suffers greatly from enlargement. When you blow up your digitized image onto a huge home-theater TV screen, for example, all of those invisible digital compression artifacts become quite noticeable--straight lines become jaggy, curves look blocky, etc. Analog video, on the other hand, is much better at filling larger screens with sharp-looking images.

1.44

back

9/2/2010

23

Chapter 1: IntroductionChapter 1: Introduction

SeamlessnessIn the audio world, some purists have returned to analog (vinyl LP) recordings because they hear the fact that digital recordings only sample the signal at intervals instead of copying the whole thing. To them, CDs sound hollow and brittle as a consequence.

back

1.45

Chapter 1: IntroductionChapter 1: Introduction

Copy Quality

We talk about "copying" a digital image or a digital video file, but we are not actually making a copy at all. Instead, we're making a transcription: rewriting the information rather than duplicating it.

Instead of copying the video signal, digital duplication transcribes the numerical code that describes that signal. If you transcribe it accurately, you can decode the result into a daughter signal that is essentially indistinguishable from the parent.

1.46

back

9/2/2010

24

Chapter 1: IntroductionChapter 1: Introduction

Freedom from NoiseNoise is any disturbance in an electrical current that is not part of the signal, and every current carries a certain amount of this electrical garbage.

Since an analog dupe is an imitation, it happily copies the noise along with the parent signal, while adding new noise in the process. That means that in each generation, the noise level relative to the signal (signal-to-noise ratio) increases and the quality decreases proportionately.

In digital recording, noise is not a problem because the signal consists entirely of current l i i f ti M d 1 ff 0 If th lt

1.47

pulses carrying information e.g. Morse code: power on = 1; power off = 0. If the voltage level of the "power on" part of the signal is well above the noise level, then the transcribing system can be set to respond only to current at that level and ignore the noise entirely. So even if the process adds a small amount of its own noise, it never copies the parental noise--nor does it pass on its own noise to the “copy”.

The result is that digital video can be copied through many generations without appreciable quality loss. This is a massive improvement over analog video.

back

Chapter 1: IntroductionChapter 1: Introduction

Computer Compatibility

By far the biggest advantage of digital video is that a computer can process and store it.

For many years, professionals have digitized video, not only to take advantage of loss-free duplicating, but also to perform image editing. Image editing means superimposing titles, compositing multiple images, and adding effects like dissolves and wipes.

But as hard drives got bigger and faster, and as image compression techniques improved, it became possible to digitize the signal and then keep it in that form indefinitely by storing it in the computer

1.48

it in the computer.

Digital storage also saw the birth of nonlinear editing, with almost instant access to any footage anywhere in the computer. This advantage is so great that digital video would probably prevail over analog due to random (nonlinear) access alone.

back

9/2/2010

25

Chapter 1: IntroductionHUMAN VISUAL SYSTEM IS THE ULTIMATE JUDGE

OF QUALITY – understanding HVS

Chapter 1: IntroductionHUMAN VISUAL SYSTEM IS THE ULTIMATE JUDGE

OF QUALITY – understanding HVS

1.49

Original Camera Rendering Post-processing with our algorithm