59
Lin ZHANG, SSE, 2013 Lecture 2 Digital Image Fundamentals Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2013

Digital Photo Processing

Embed Size (px)

DESCRIPTION

this will tell latest process technologies in image processing.

Citation preview

Lin ZHANG, SSE, 2013

Lecture 2Digital Image Fundamentals

Lin ZHANG, PhDSchool of Software Engineering 

Tongji UniversitySpring 2013

Lin ZHANG, SSE, 2013

Contents

• Elements of visual perception• Light and the electromagnetic spectrum• Image sensing and acquisition• Image sampling and quantization• Some basic relationships between pixels

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye

sclera

choroid

blind spot

visual axis

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye• Three membranes enclose the eye: the cornea and sclera, choroid, and retina• At its anterior extreme, the choroid is divided into the ciliary body and the iris; the later contracts or expands to control the amount of light that enters the eye

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye• When the eye is properly focused, light from an object outside the eye is imaged on the retina• Two kinds of light receptors distribute on the retina, cones and rods• Cones are primarily located in the central portion of the retina, called fovea and are sensitive to color; they function best in relatively bright light; so, cone vision is called bright‐light vision

• Rods are distributed over the retinal surface; rods serve to give a general overall picture of the field of view; they are not involved in color vision and are sensitive to low levels of illumination; rod vision is called dim‐light vision

• Around the region of the emergence of the optic nerve, there is no receptors and results in the so‐called blind spot

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye (more on cone cell)• Humans usually have three kinds of cones with different photopsins, which have different spectral response curves; thus, we have trichromatic vision. 

• Interestingly, some people have four or more types of cones, giving them tetrachromatic vision

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye (more on cone cell)

Three types of color‐sensitive cones in the retina of the human eye, corresponding roughly to red, green, and blue sensitive detectors.

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye (more on cone cell)

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye (more on rod cell)

Rod cell

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye (more on rod cell)

Wavelength responsiveness of rods compared to that of three types of cones. The dashed gray curve is for rods.

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Structure of the human eye

Distribution of rods and cones in the retina

Lin ZHANG, SSE, 2013

Elements of Visual Perception

Draw an image similar to that below on a piece of paper (the dot and cross are about 6 inches apart)

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

• Blind‐spot experiment

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Image formation in the eye• Muscles within the eye can be used to change the shape of the lens allowing us focus on objects that are near or far away

• An image is focused onto the retina causing rods and cones to become excited which ultimately send signals to the brain

C is the optical center of the lens

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Human eye VS camera

VS

LensIrisRetina

Related components?

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Perceived brightness is not a simple function of intensity• Visual system tends to undershoot or overshoot around the boundary of regions of different intensities, called as “Mach” bands

• A region’s perceived brightness does not only depend simply on its intensity, but on its surrounding regions; such a phenomenon is called “simultaneous contrast”

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Perceived brightness is not a simple function of intensity

An example of Mach bands

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Perceived brightness is not a simple function of intensity

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Perceived brightness is not a simple function of intensity

An example of simultaneous contrast

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Perceived brightness is not a simple function of intensity

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Perceived brightness is not a simple function of intensity

Lin ZHANG, SSE, 2013

Elements of Visual Perception

• Optical illusions: our visual systems play lots of interesting tricks on us• It is stilly not fully understood yet

Lin ZHANG, SSE, 2013

Elements of Visual Perception

Lin ZHANG, SSE, 2013

Contents

• Elements of visual perception• Light and the electromagnetic spectrum• Image sensing and acquisition• Image sampling and quantization• Some basic relationships between pixels

Lin ZHANG, SSE, 2013

Light and the Electromagnetic Spectrum

• Light is just a particular part of the electromagnetic spectrum that can be sensed by the human eye

• The electromagnetic spectrum is split up according to the wavelengths of different forms of energy

Lin ZHANG, SSE, 2013

Light and the Electromagnetic Spectrum

• The colours that we perceive are determined by the nature of the light reflected from an object

• In addition to frequency, three basic quantities are used to describe the quality of a chromatic light source• Radiance. It is the total amount of energy that flows from the light source, measured in Watts

• Luminance. Gives a measure of the amount of energy an observer perceives, measured in lumens

• Brightness. It is a subjective descriptor of light perception that is practically impossible to measure

Lin ZHANG, SSE, 2013

Light and the Electromagnetic Spectrum

electromagnetic wave

spectral power distribution

spectral power distribution

reflectance spectrum

Red

Lin ZHANG, SSE, 2013

Contents

• Elements of visual perception• Light and the electromagnetic spectrum• Image sensing and acquisition• Image sampling and quantization• Some basic relationships between pixels

Lin ZHANG, SSE, 2013

Image Sensing and Acquisition

• Image creation based on two factors• Illumination source• Reflection or absorption of energy from that source by the elements of the “scene” being imaged

Any examples for these two kinds?

Lin ZHANG, SSE, 2013

Image Sensing and Acquisition

• Imaging sensors• Single imaging sensor• Line sensor• Array sensor

Single imaging sensor

Lin ZHANG, SSE, 2013

Image Sensing and Acquisition

• Imaging sensors• Single imaging sensor• Line sensor• Array sensor

Line sensor

Application scenario?

Lin ZHANG, SSE, 2013

Image Sensing and Acquisition

• Imaging sensors• Single imaging sensor• Line sensor• Array sensor

Array sensor, used in ordinary digital camera

Lin ZHANG, SSE, 2013

Image acquisiton using a linear sensor strip and a circular sensor strip

Image Sensing and Acquisition

• Imaging sensing using sensor strips

Lin ZHANG, SSE, 2013

An example of the digital image acquisition process

Image Sensing and Acquisition

• Imaging sensing using sensor arrays

Lin ZHANG, SSE, 2013

Contents

• Elements of visual perception• Light and the electromagnetic spectrum• Image sensing and acquisition• Image sampling and quantization• Some basic relationships between pixels

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Sampling and quantization will convert a continuous image signal f to a discrete digital form• Digitizing the coordinate values is called sampling• Digitizing the amplitude is called quantization

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Sampling and quantization will convert a continuous image signal f to a discrete digital form

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Sampling and quantization will convert a continuous image signal f to a discrete digital form

Result of image sampling and quantization

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Representing images

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Spatial resolution• The spatial resolution of an image is determined by how sampling was carried out

• DPI (dots per inch) is used to measure the spatial resolution

Note: to say that an image has a resolution 1024*1024is not a meaningful statement without stating the spatial dimensions encompassed by the image

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Spatial resolution—an example

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Spatial resolution—an example

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Spatial resolution—an example

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Spatial resolution—an example

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Spatial resolution—an example

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Spatial resolution—an example

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Intensity resolution• Intensity resolution refers to the smallest discernible change in intensity level

• The more intensity levels used, the finer the level of detail discernable in an image

• The number of bits used to quantize intensity is often referred as the intensity resolution

Number of Bits Number of Intensity Levels Examples

1 2 0, 12 4 00, 01, 10, 114 16 0000, 0101, 11118 256 00110011, 0101010116 65,536 1010101010101010

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Intensity resolution

7 bpp 6 bpp 5 bpp

4 bpp 3 bpp 2 bpp 1 bpp

8 bits per pixel

Lin ZHANG, SSE, 2013

Image Sampling and Quantization

• Image interpolation• It is a basic tool used in tasks such as zooming, shrinking, rotating, and geometric corrections

• Traditional methods include nearest neighbor, bilinear, and bicubic

neares

t neigh

bour

bilinear

Lin ZHANG, SSE, 2013

Contents

• Elements of visual perception• Light and the electromagnetic spectrum• Image sensing and acquisition• Image sampling and quantization• Some basic relationships between pixels

Lin ZHANG, SSE, 2013

Some Basic Relationships between Pixels

• Neighbors of a pixelp(x, y) is a pixel

p

N4(p): 4‐neighbours of p

p

ND(p): diagonal neighbours of p

p

N8(p): 8‐neighbours of p

Lin ZHANG, SSE, 2013

• AdjacencyLet V: Set of gray level values used to define connectivity; e.g., V={1}.

4‐adjacency: two pixels p and q with values in V are 4‐adjacent if q is in the set N4(p)

8‐adjacency: two pixels p and q with values in V are 8‐adjacent if q is in the set N8(p)

m‐adjacency (mixed adjacency): (modification of 8‐a to eliminate multiple connections) two pixels p and q with values in V are m‐adjacent if (i) q is in N4(p) or(ii) q in ND(p) and N4(p) ∩ N4(q) has no pixels whose values are from V

Some Basic Relationships between Pixels

Lin ZHANG, SSE, 2013

• Adjacency—examples 

0       1        1

0       1        0

0       0        1An arrangement of pixels          8‐adjacency            m‐adjacency

0       1        1

0       1        0

0       0        1

0       1        1

0       1        0

0       0        1

Some Basic Relationships between Pixels

Lin ZHANG, SSE, 2013

• Connectivity and regions• Let S represent a subset of pixels in an image• For            , the set of pixels that are connect to it in S is called a connected component of S; if S has only one connected component, S is called a connected set and it is also a region

• Two regions Ri and Rj are said to be adjacent if their union forms a connected set; otherwise, they are disjoint

p S

1       1        0        1         1        1

1       0        1        0         1        1

1       1        0        0         1        1

Ri Rj

Note: when talking about regions adjacency, the adjacency type should be mentioned

Some Basic Relationships between Pixels

Lin ZHANG, SSE, 2013

• Boundary• Boundary of a region R is the set of points that are adjacent to points in the complement of R (inner border)

• Outer border is the border of in the background (to guarantee the border‐following algorithms will form a closed path)

• Usually, adjacency between points in a region and its background is defined in terms of 8‐connectivity

0    0   00    1   00    1   00    1   00    1   00    0   0

The inner border of the 1‐valued region does not form a closed path, but its outer boundary does

Some Basic Relationships between Pixels

Lin ZHANG, SSE, 2013

• Distance measures

Some Basic Relationships between Pixels

For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w), Dis a distance function or metric if(a) (b) , and(c)

( , ) 0 ( , ) 0,D p q D p q iff p q ( , ) ( , )D p q D q p( , ) ( , ) ( , )D p z D p q D q z

Euclidean distance

1/22 2( , ) ( ) ( )eD p q x s y t

Lin ZHANG, SSE, 2013

• Distance measures

Some Basic Relationships between Pixels

For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w), Dis a distance function or metric if(a) (b) , and(c)

( , ) 0 ( , ) 0,D p q D p q iff p q ( , ) ( , )D p q D q p( , ) ( , ) ( , )D p z D p q D q z

D4 distance (city‐block distance, or Manhattan distance)

4 ( , )D p q x s y t

p1

11

1

2

22

22

22

2

Lin ZHANG, SSE, 2013

• Distance measures

Some Basic Relationships between Pixels

For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w), Dis a distance function or metric if(a) (b) , and(c)

( , ) 0 ( , ) 0,D p q D p q iff p q ( , ) ( , )D p q D q p( , ) ( , ) ( , )D p z D p q D q z

D8 distance (Chessboard distance) 8 ( , ) max ,D p q x s y t

p1

11

1

2

21

12

12

12

2222

22 2 2

2

22

Lin ZHANG, SSE, 2013

SummaryWe have looked at:

• Elements of visual perception• Light and the electromagnetic spectrum• Image sensing and acquisition• Image sampling and quantization• Some basic relationships between pixels

Next time we start to look at techniques for image enhancement

Lin ZHANG, SSE, 2013

Thanks for your attention