67
CS589-04 Digital Image Processing CS589-04 Digital Image Processing Lecture 1 Lecture 1 Introduction & Introduction & Fundamentals Fundamentals Spring 2008 Spring 2008

CS589-04 Digital Image Processing Lecture 1 Introduction & Fundamentals

  • Upload
    ziarre

  • View
    68

  • Download
    0

Embed Size (px)

DESCRIPTION

CS589-04 Digital Image Processing Lecture 1 Introduction & Fundamentals. Spring 2008. Introduction to the course. Grading Article Reading and Presentation: 15% Homework: 20% Exam: 15% Project: 50% Total: 100% - PowerPoint PPT Presentation

Citation preview

Page 1: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

CS589-04 Digital Image ProcessingCS589-04 Digital Image Processing

Lecture 1 Lecture 1 Introduction & FundamentalsIntroduction & Fundamentals

Spring 2008Spring 2008

Page 2: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 2

Introduction to the courseIntroduction to the course

► Grading Article Reading and Presentation: 15% Homework: 20% Exam: 15% Project: 50% Total: 100% Extra Credits: 50%. If the method and

experimental results of your project achieve the state of the art, you will earn the extra 50% credits.

Page 3: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 3

Introduction to the courseIntroduction to the course

► Article Reading and Project Medical image analysis (MRI/PET/CT/X-ray tumor

detection/classification) Face, fingerprint, and other object recognition Image and/or video compression Image segmentation and/or denoising Digital image/video watermarking/steganography

and detection Whatever you’re interested …

Page 4: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 4

Journals & Conferences Journals & Conferences in Image Processingin Image Processing

► Journals: — IEEE T IMAGE PROCESSING — IEEE T MEDICAL IMAGING — INTL J COMP. VISION — IEEE T PATTERN ANALYSIS MACHINE INTELLIGENCE — PATTERN RECOGNITION — COMP. VISION AND IMAGE UNDERSTANDING — IMAGE AND VISION COMPUTING … …

► Conferences: — CVPR: Comp. Vision and Pattern Recognition — ICCV: Intl Conf on Computer Vision — ACM Multimedia — ICIP — SPIE — ECCV: European Conf on Computer Vision — CAIP: Intl Conf on Comp. Analysis of Images and Patterns … …

Page 5: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 5

IntroductionIntroduction

► What is Digital Image Processing?

Digital Image — a two-dimensional function x and y are spatial coordinates

The amplitude of f is called intensity or gray level at the point (x, y)

Digital Image Processing — process digital images by means of computer, it covers low-, mid-, and

high-level processes low-level: inputs and outputs are images mid-level: outputs are attributes extracted from input images high-level: an ensemble of recognition of individual objects

Pixel — the elements of a digital image

( , )f x y

Page 6: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 6

Origins of Digital Image Origins of Digital Image ProcessingProcessing

Sent by submarine cable between London and New York, the transportation time was reduced to less than three hours from more than a week

Page 7: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 7

Origins of Digital Image Origins of Digital Image ProcessingProcessing

Page 8: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 8

Sources for ImagesSources for Images

► Electromagnetic (EM) energy spectrumElectromagnetic (EM) energy spectrum► AcousticAcoustic► UltrasonicUltrasonic► ElectronicElectronic► Synthetic images produced by computerSynthetic images produced by computer

Page 9: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 9

Electromagnetic (EM) energy Electromagnetic (EM) energy spectrumspectrum

Major usesGamma-ray imaging: nuclear medicine and astronomical( عظیم- (نجومیobservations

X-rays: medical diagnostics, industry, and astronomy, etc.

Ultraviolet: lithography( سنگ روی ,industrial inspection, microscopy, lasers ,(چاپbiological imaging,and astronomical observations

Visible and infrared bands: light microscopy, astronomy, remote sensing, industry, and law enforcement

Microwave band: radar

Radio band: medicine (such as MRI) and astronomy

Page 10: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 10

Examples: Gama-Ray Imaging Examples: Gama-Ray Imaging

Page 11: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 11

Examples: X-Ray Imaging Examples: X-Ray Imaging

Page 12: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 12

Examples: Ultraviolet Imaging Examples: Ultraviolet Imaging

Page 13: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 13

Examples: Light Microscopy Imaging Examples: Light Microscopy Imaging

Page 14: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 14

Examples: Visual and Infrared Imaging Examples: Visual and Infrared Imaging

Page 15: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 15

Examples: Visual and Infrared Imaging Examples: Visual and Infrared Imaging

Page 16: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 16

Examples: Infrared Satellite Imaging Examples: Infrared Satellite Imaging

USA 1993USA 2003

Page 17: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 17

Examples: Infrared Satellite Imaging Examples: Infrared Satellite Imaging

Page 18: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 18

Examples: Automated Visual InspectionExamples: Automated Visual Inspection

Page 19: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 19

Examples: Automated Visual InspectionExamples: Automated Visual Inspection

The area in which the imaging system detected the plate

Results of automated reading of the plate content by the system

Page 20: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 20

Example of Radar ImageExample of Radar Image

Page 21: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 21

Examples: MRI (Radio Band)Examples: MRI (Radio Band)

Page 22: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 22

Examples: Ultrasound ImagingExamples: Ultrasound Imaging

Page 23: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 23

Fundamental Steps in DIPFundamental Steps in DIP

Result is more suitable than the original

Improving the appearance

Extracting image components

Partition an image into its constituent parts or objects

Represent image for computer processing

Page 24: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 24

Light and EM SpectrumLight and EM Spectrum

c , : Planck's constant.E h h

Page 25: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 25

Light and EM SpectrumLight and EM Spectrum

► The colors that humans perceive in an The colors that humans perceive in an object are determined by the nature of the object are determined by the nature of the light reflected from the object.light reflected from the object.

e.g. green objects reflect light with wavelengths primarily in the 500 to 570 nm range while absorbing most of the energy at other wavelength

Page 26: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 26

Light and EM SpectrumLight and EM Spectrum► Monochromatic light: void of color Intensity is the only attribute, from black to white Monochromatic images are referred to as gray-scale

images

► Chromatic light bands: 0.43 to 0.79 um The quality of a chromatic light source: Radiance(تابندگی): total amount of energy Luminance (lm)(تشعشع): the amount of energy an

observer perceives from a light source Brightness(روشنایی) : a subjective( عینی descriptor of (غیر

light perception that is impossible to measure. It embodies the achromatic notion of intensity and one of the key factors in describing color sensation.

Page 27: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 27

Image AcquisitionImage Acquisition

Transform illumination energy into

digital images

Page 28: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 28

Image Acquisition ProcessImage Acquisition Process

Page 29: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 29

A Simple Image Formation ModelA Simple Image Formation Model

( , ) ( , ) ( , )

( , ) : intensity at the point ( , )

( , ) : illumination at the point ( , )

(the amount of source illumination incident on the scene)

( , ) : reflectance/transmissivity

f x y i x y r x y

f x y x y

i x y x y

r x y

at the point ( , )

(the amount of illumination reflected/transmitted by the object)

where 0 < ( , ) < and 0 < ( , ) < 1

x y

i x y r x y

Page 30: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 30

Some Typical Ranges of illuminationSome Typical Ranges of illumination

► Illumination(Illumination( روشنایی روشنایی شدت ((شدتLumen — A unit of light flow or luminous flux Lumen per square meter (lm/m2) — The metric unit of

measure for illuminance of a surface

On a clear day, the sun may produce in excess of 90,000 lm/m2 of illumination on the surface of the Earth

On a cloudy day, the sun may produce less than 10,000 lm/m2 of illumination on the surface of the Earth

On a clear evening, the moon yields about 0.1 lm/m2 of illumination

The typical illumination level in a commercial office is about 1000 lm/m2

Page 31: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 31

Some Typical Ranges of ReflectanceSome Typical Ranges of Reflectance

► ReflectanceReflectance

0.01 for black velvet(مخملی)

0.65 for stainless steel( زنگ ضد (استیل

0.80 for flat-white wall paint

0.90 for silver-plated metal

0.93 for snow

Page 32: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 32

Image Sampling and QuantizationImage Sampling and Quantization

Digitizing the coordinate values

Digitizing the amplitude values

Page 33: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 33

Image Sampling and QuantizationImage Sampling and Quantization

Page 34: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 34

Representing Digital ImagesRepresenting Digital Images

Page 35: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 35

Representing Digital ImagesRepresenting Digital Images

►The representation of an M×N numerical array as

(0,0) (0,1) ... (0, 1)

(1,0) (1,1) ... (1, 1)( , )

... ... ... ...

( 1,0) ( 1,1) ... ( 1, 1)

f f f N

f f f Nf x y

f M f M f M N

Page 36: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 36

Representing Digital ImagesRepresenting Digital Images

►The representation of an M×N numerical array as

0,0 0,1 0, 1

1,0 1,1 1, 1

1,0 1,1 1, 1

...

...

... ... ... ...

...

N

N

M M M N

a a a

a a aA

a a a

Page 37: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 37

Representing Digital ImagesRepresenting Digital Images

►The representation of an M×N numerical array in MATLAB

(1,1) (1,2) ... (1, )

(2,1) (2,2) ... (2, )( , )

... ... ... ...

( ,1) ( , 2) ... ( , )

f f f N

f f f Nf x y

f M f M f M N

Page 38: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 38

Representing Digital ImagesRepresenting Digital Images

► Discrete intensity interval [0, L-1], L=2k

► The number b of bits required to store a M × N digitized image

b = M × N × k

Page 39: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 39

Representing Digital ImagesRepresenting Digital Images

Page 40: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 40

Spatial and Intensity ResolutionSpatial and Intensity Resolution

►Spatial resolution — A measure of the smallest discernible(قابل تشخیص)

detail in an image — stated with line pairs per unit distance, dots

(pixels) per unit distance, dots per inch (dpi)

►Intensity resolution — The smallest discernible change in intensity level — stated with 8 bits, 12 bits, 16 bits, etc.

Page 41: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 41

Spatial and Intensity ResolutionSpatial and Intensity Resolution

Page 42: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 42

Spatial and Intensity ResolutionSpatial and Intensity Resolution

Page 43: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 43

Spatial and Intensity ResolutionSpatial and Intensity Resolution

Page 44: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 44

Image InterpolationImage Interpolation

► Interpolation( یابی Process of using — (میانknown data to estimate unknown values

e.g., zooming, shrinking, rotating, and geometric correction

► Interpolation (sometimes called resampling) — an imaging method to increase (or decrease) the number of pixels in a digital image.

Some digital cameras use interpolation to produce a larger image than the sensor captured or to create digital zoom

http://www.dpreview.com/learn/?/key=interpolation

Page 45: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 45

Image Interpolation: Image Interpolation:

Nearest Neighbor InterpolationNearest Neighbor Interpolation

f1(x2,y2) = f(round(x2), round(y2))

=f(x1,y1)

f(x1,y1)

f1(x3,y3) = f(round(x3), round(y3))

=f(x1,y1)

Page 46: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 46

Image Interpolation: Image Interpolation:

Bilinear InterpolationBilinear Interpolation

2 ( , )

(1 ) (1 ) ( , ) (1 ) ( 1, )

(1 ) ( , 1) ( 1, 1)

( ), ( ), , .

f x y

a b f l k a b f l k

a b f l k a b f l k

l floor x k floor y a x l b y k

(x,y)

Page 47: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 47

Image Interpolation: Image Interpolation:

Bicubic InterpolationBicubic Interpolation

3 3

30 0

( , ) i jij

i j

f x y a x y

► The intensity value assigned to point (x,y) is

obtained by the following equation

► The sixteen coefficients are determined by using the sixteen nearest neighbors.

http://en.wikipedia.org/wiki/Bicubic_interpolation

Page 48: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 48

Examples: InterpolationExamples: Interpolation

Page 49: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 49

Examples: InterpolationExamples: Interpolation

Page 50: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 50

Examples: InterpolationExamples: Interpolation

Page 51: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 51

Examples: InterpolationExamples: Interpolation

Page 52: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 52

Examples: InterpolationExamples: Interpolation

Page 53: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 53

Examples: InterpolationExamples: Interpolation

Page 54: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 54

Examples: InterpolationExamples: Interpolation

Page 55: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 55

Examples: InterpolationExamples: Interpolation

Page 56: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 56

Basic Relationships Between Pixels

► Neighborhood(همسایگی)

► Adjacency(مجاورت)

► Connectivity

► Paths

► Regions and boundaries

Page 57: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 57

Basic Relationships Between Pixels

► Neighbors of a pixel p at coordinates (x,y)

4-neighbors of p, denoted by N4(p): (x-1, y), (x+1, y), (x,y-1), and (x, y+1).

4 diagonal neighbors of p, denoted by ND(p): (x-1, y-1), (x+1, y+1), (x+1,y-1), and (x-1, y+1).

8 neighbors of p, denoted N8(p) N8(p) = N4(p) U ND(p)

Page 58: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 58

Basic Relationships Between Pixels

► Adjacency Let V be the set of intensity values

4-adjacency: Two pixels p and q with values from V are 4-adjacent if q is in the set N4(p).

8-adjacency: Two pixels p and q with values from V are 8-adjacent if q is in the set N8(p).

Page 59: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 59

Basic Relationships Between Pixels

► Adjacency Let V be the set of intensity values

m-adjacency: Two pixels p and q with values from V are m-adjacent if

(i) q is in the set N4(p), or

(ii) q is in the set ND(p) and the set N4(p) ∩ N4(p) has no pixels whose values are from V.

Page 60: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 60

Basic Relationships Between Pixels

► Path A (digital) path (or curve) from pixel p with coordinates (x0, y0)

to pixel q with coordinates (xn, yn) is a sequence of distinct pixels with coordinates

(x0, y0), (x1, y1), …, (xn, yn)

Where (xi, yi) and (xi-1, yi-1) are adjacent for 1 ≤ i ≤ n.

Here n is the length of the path.

If (x0, y0) = (xn, yn), the path is closed path.

We can define 4-, 8-, and m-paths based on the type of adjacency used.

Page 61: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 61

Examples: Adjacency and Path

0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 11

0 2 0 0 2 0 0 2 0 2 0 0 2 0 0 2 00

0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 11

V = {1, 2}

Page 62: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 62

Examples: Adjacency and Path

0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 11

0 2 0 0 2 0 0 2 0 2 0 0 2 0 0 2 00

0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 11

V = {1, 2}

8-adjacent

Page 63: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 63

Examples: Adjacency and Path

0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 11

0 2 0 0 2 0 0 2 0 2 0 0 2 0 0 2 00

0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 11

V = {1, 2}

8-adjacent m-adjacent

Page 64: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 64

Examples: Adjacency and Path

001,11,1 1 11,21,2 1 11,31,3 0 1 1 0 1 0 1 1 0 1 11

002,12,1 2 22,22,2 0 02,32,3 0 2 0 0 2 0 2 0 0 2 00

003,13,1 0 03,23,2 1 13,33,3 0 0 1 0 0 0 0 1 0 0 11

V = {1, 2}

8-adjacent m-adjacent

The 8-path from (1,3) to (3,3):(i) (1,3), (1,2), (2,2), (3,3)(ii) (1,3), (2,2), (3,3)

The m-path from (1,3) to (3,3):(1,3), (1,2), (2,2), (3,3)

Page 65: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 65

Basic Relationships Between Pixels

► Connected in S Let S represent a subset of pixels in an image. Two

pixels p with coordinates (x0, y0) and q with coordinates (xn, yn) are said to be connected in S if there exists a path

(x0, y0), (x1, y1), …, (xn, yn)

Where

,0 , ( , )i ii i n x y S

Page 66: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 66

Basic Relationships Between Pixels

Let S represent a subset of pixels in an image

► For every pixel p in S, the set of pixels in S that are connected to p is called a connected component of S.

► If S has only one connected component, then S is called Connected Set.

► We call R a region of the image if R is a connected set

► Two regions, Ri and Rj are said to be adjacent if their union forms a connected set.

► Regions that are not to be adjacent are said to be disjoint.

Page 67: CS589-04 Digital Image Processing Lecture 1  Introduction & Fundamentals

Weeks 1 & 2 67

Basic Relationships Between Pixels

► Boundary (or border)

The boundary of the region R is the set of pixels in the region that have one or more neighbors that are not in R.

If R happens to be an entire image, then its boundary is defined as the set of pixels in the first and last rows and columns of the image.

► Foreground and background

An image contains K disjoint regions, Rk, k = 1, 2, …, K. Let Ru denote the union of all the K regions, and let (Ru)c denote its complement.

All the points in Ru is called foreground;

All the points in (Ru)c is called background.