Digital Image Processing, 2nd ed. Mohammed Dwikat – CIS 133381 Multimedia II Digital Image...

Post on 11-Jan-2016

230 views 0 download

Transcript of Digital Image Processing, 2nd ed. Mohammed Dwikat – CIS 133381 Multimedia II Digital Image...

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Digital Image Fundamentals Digital Image Fundamentals

• 2.1.3 Bright adaptation and Discrimination

– The range of light intensity level to the human system: from the scotopic threshold to glare limit

– Brightness adaptation-the total range of distinct intensity level it can discriminate is small when compared with the total adaptation range

– Subjective brightness: is a logarithmic function of the light intensity incident on the eye

– Brightness adaptation level: the current sensitivity level of the visual system (Ba)

– The range of subjective brightness that the eye can perceive when adapted to this level (Bb)

– A level at and below (Bb)-indistinguishable black

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

• Experiment of Weber Ratio– Good brightness discrimination

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

• Mach band: a brightness pattern that is strongly scalloped, especially near the boundary (Fig. 2.7(b))

• Simultaneous contrast: a region’s perceived brightness does not simply depend on its intensity (Fig. 2.8)

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

• Optical illusion—eye fills in nonexisting information or wrongly perceive geometrical properties of objects

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

• 2.3 Image sensing and acquisition– Acquisition using a single sensor

• Microdensitometer• A laser source coincident with the sensor

– Acquisition using a sensor strips• Imaging acquisition using in-line sensors• Computerized axial tomography

– Imaging acquisition using array sensors• Electromagnetic and ultrasonic sensing devices

• CCD sensors - charge-coupled device – A simple image formation model

• 2-D Image function : f(x,y)– May be characterized by : amount of source illumination

incident on the scene and amount of illumination reflected by the objects: f(x,y)= I(x,y) r(x,y)

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

2.4 Image sampling and quantization2.4 Image sampling and quantization

• Convert the continuous sensed data to digital form– Sampling

• Spatial transform: spatial coordinates(discrete locations)

– Quantization• Amplitude transform: gray levels are converted to discrete values

• The quality of a digital image

is determined to a large degree

by the number of samples and

discrete gray levels

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

2.4.2 Representing digital images2.4.2 Representing digital images

• The complete MN digital image in the matrix form: f(x,y)– Pixel, picture element

• A digital image use a traditional matrix A

– The number of gray levels L= 2k

– The dynamic range of an image : the range of values spanned by the gray scale

• High contrast image : an image whose gray levels span a significant portion of the gray scale as having a high dynamic range

– The number, b, of bits required to store a digitized image is

b=M N K

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

2.4.3 Spatial and gray-level resolution

• Sampling is the principal factor determining the spatial resolution• Gray-level resolution: the smallest لإلدراك discernible range in gray قابل

level– is the power of 2 due to hardware considerations– The most common number: 8 bits

• Spatial resolution– Sub-sampling– Resampling

• Keep the number of samples constant and reduce the number of gray levels– Reduce the number of bits while keeping the spatial constant

• Vary N and k simultaneously– ISO reference curves

• If the number of bit are fixed, how to adjust the trade-off between spatial and gray-level resolution?

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

• frequency spectrum in terms of sines /cosines of various frequencies

• Band-limited functions – the highest frequency is finite and that the function is of unlimited

duration • The Shannon sampling theorem

– if the function is sampled at a rate equal to or greater than twice its samples

– Under-sampled• aliasing corrupts the sampled image• Additional frequency component are introduced into the sampled

function (aliased frequencies)– Sampling rate is the number of samples taken per unit distance– It is impossible to satisfy the sampling theorem

• Sol: work with sampled data that are finite in duration– Gating function: convert a function of unlimited duration into a

function of finite duration by multiplying a “ gating function”

2.4.4 Aliasing and Moire patterns2.4.4 Aliasing and Moire patterns

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

– Reducing the aliasing effect : reduce its high frequency by blurring the image

• Moirie patterns: a function of finite duration can be sampled over a finite interval without violating the sampling theorem – Moirie patterns caused by a break up of the periodicity

caused by interference between two sets of fine pattern grids, the scanner samples and the halftone screen in the original image

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

• http://knight.fcu.edu.tw/~physics/MOVE/moire.html

• http://knight.fcu.edu.tw/~physics/MOVE/moire1.html

• http://knight.fcu.edu.tw/~physics/MOVE/moire2.html

Moire.swf

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

• Two steps for zooming– (1) the creation of new pixel locations– (2) the assignment of gray levels to those new locations

• neighbor interpolation الزيادة : nearest neighborhood interpolation

• Pixel replication اإلستنساخ – Increase the size of an image an integer number of times – a special case of nearest neighbor interpolation (Figs. 2.20(b)

• Defect: produces a checkerboard effect– Bilinear interpolation

• Image shrinking– Equivalent process of pixel location is row-column deletion:shrink

by a non-integer factor• Expand the grid to fit over the original image• Do gray-level nearest neighbor or bilinear interpolation• Shrink the grid to its original specified size

– Defect: Aliasing effect • Sol: blur an image slightly

2.4.5 zooming and shrinking digital images2.4.5 zooming and shrinking digital images

dycxbyaxyxv '''''' ),(

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Chapter 2: Digital Image FundamentalsChapter 2: Digital Image Fundamentals

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

2.5 Some basic relationship between pixels2.5 Some basic relationship between pixels• 2.5.1 Neighbor of a pixel

– Horizontal and vertical neighbors– 4-neighbors of p – 8-neighbors of p– Four diagonal neighbors

2.5.2 Adjacency, connectivity, regions, and boundaries• Connectivity of two pixels: if two pixels are connected, it

must be determined – If they are neighbors– If their gray levels satisfy a specified criterion of similarity

• Three types of adjacency: 4-adjacency N4(V), 8-adjacency N8(V), m-adjacency(mixed adjacency)

• Digital path or curve – Closed path– 4-, 8-, or m-paths

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

• Two pixels are said to be connected in S– Connected component of S– Connected set

• Boundary – A region of the image R: R is a connected set– The boundary of a region R: the set of pixels in the region that

have one or more neighbors• Edge2.5.3 Distant measures • Distant function or metric• The Eulidean distance between p and q

– D4 (city block) distance :– D8 (chessboard block) distance – Dm distance: the shortest m-path between the points

2.5.4 Image operation on a pixel basis• Operation is carried out between corresponding pixels

2.6 linear and nonlinear operations H(af+bg)= aH(f) + b H(g)

),max(),(8 tysxqpD )),(4 tysxqpD

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Euclidean distance

De(p, q) = [(x - s)2 + (y - t)2 ]1/2

TheD4 distance (also called city-block distance) between p and q is defined as

D4(p, q) = |x – s| + |y – t|

TheD8 distance (also called chessboard distance) between p and q is defined as

D8(p, q) = max (|x – s|, |y – t|)

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II

(a) When V = {0, 1}, 4 path does not exist between p and q because it is impossible to get from p to q by traveling along points that are both 4adjacent and also have values from V . Figure P2.15(a) shows this condition it is not possible to get to q.

The shortest 8path is shown in Fig. P2.15(b) its length is 4. In this case the length of shortest m- and 8paths is the same. Both of these shortest paths are unique in this case.

(b) One possibility for the shortest 4path when V = (1, 2) is shown in Fig. P2.15(c) its length is 6. It is easily verified that another 4path of the same length exists between p and q.One possibility for the shortest 8path (it is not unique) is shown in Fig. P2.15(d) its length is 4. The length of a shortest mpathsimilarly is 4.

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

Mohammed Dwikat – CIS 133381 Multimedia II