Fundamentals Of Image Processing

2y ago
26 Views
2 Downloads
1.35 MB
112 Pages
Last View : 4d ago
Last Download : 2m ago
Upload by : Albert Barnett
Transcription

Fundamentals of Image ProcessingIan T. YoungJan J. GerbrandsLucas J. van VlietDelft University of n .1Digital Image Definitions.2Tools.6Perception.22Image Sampling.28Noise.32Cameras .35Displays.44Algorithms.44Techniques .86Acknowledgments .109References .109IntroductionModern digital technology has made it possible to manipulate multi-dimensionalsignals with systems that range from simple digital circuits to advanced parallelcomputers. The goal of this manipulation can be divided into three categories: Image Processing Image Analysis Image Understandingimage in image outimage in measurements outimage in high-level description outWe will focus on the fundamental concepts of image processing. Space does notpermit us to make more than a few introductory remarks about image analysis.Image understanding requires an approach that differs fundamentally from thetheme of this book. Further, we will restrict ourselves to two–dimensional (2D)image processing although most of the concepts and techniques that are to bedescribed can be extended easily to three or more dimensions. Readers interestedin either greater detail than presented here or in other aspects of image processingare referred to [1-10]Version 2.3 1995-2007 I.T. Young, J.J. Gerbrands and L.J. van Vliet1

Image Processing FundamentalsWe begin with certain basic definitions. An image defined in the “real world” isconsidered to be a function of two real variables, for example, a(x,y) with a as theamplitude (e.g. brightness) of the image at the real coordinate position (x,y). Animage may be considered to contain sub-images sometimes referred to as regions–of–interest, ROIs, or simply regions. This concept reflects the fact that imagesfrequently contain collections of objects each of which can be the basis for aregion. In a sophisticated image processing system it should be possible to applyspecific image processing operations to selected regions. Thus one part of animage (region) might be processed to suppress motion blur while another partmight be processed to improve color rendition.The amplitudes of a given image will almost always be either real numbers orinteger numbers. The latter is usually a result of a quantization process thatconverts a continuous range (say, between 0 and 100%) to a discrete number oflevels. In certain image-forming processes, however, the signal may involvephoton counting which implies that the amplitude would be inherently quantized.In other image forming procedures, such as magnetic resonance imaging, thedirect physical measurement yields a complex number in the form of a realmagnitude and a real phase. For the remainder of this book we will consideramplitudes as reals or integers unless otherwise indicated.2.Digital Image DefinitionsA digital image a[m,n] described in a 2D discrete space is derived from an analogimage a(x,y) in a 2D continuous space through a sampling process that isfrequently referred to as digitization. The mathematics of that sampling processwill be described in Section 5. For now we will look at some basic definitionsassociated with the digital image. The effect of digitization is shown in Figure 1.The 2D continuous image a(x,y) is divided into N rows and M columns. Theintersection of a row and a column is termed a pixel. The value assigned to theinteger coordinates [m,n] with {m 0,1,2, ,M–1} and {n 0,1,2, ,N–1} isa[m,n]. In fact, in most cases a(x,y) – which we might consider to be the physicalsignal that impinges on the face of a 2D sensor – is actually a function of manyvariables including depth (z), color (λ), and time (t). Unless otherwise stated, wewill consider the case of 2D, monochromatic, static images in this chapter.2

Image Processing FundamentalsRowsColumnsValue a(x, y, z, λ, t)Figure 1: Digitization of a continuous image. The pixel at coordinates[m 10, n 3] has the integer brightness value 110.The image shown in Figure 1 has been divided into N 16 rows and M 16columns. The value assigned to every pixel is the average brightness in the pixelrounded to the nearest integer value. The process of representing the amplitude ofthe 2D signal at a given coordinate as an integer value with L different gray levelsis usually referred to as amplitude quantization or simply quantization.2.1 COMMON VALUESThere are standard values for the various parameters encountered in digital imageprocessing. These values can be caused by video standards, by algorithmicrequirements, or by the desire to keep digital circuitry simple. Table 1 gives somecommonly encountered values.ParameterRowsColumnsGray LevelsSymbolNMLTypical 202,64,256,1024,4096,16384Table 1: Common values of digital image parametersQuite frequently we see cases of M N 2K where {K 8,9,10,11,12}. This can bemotivated by digital circuitry or by the use of certain algorithms such as the (fast)Fourier transform (see Section 3.3).3

Image Processing FundamentalsThe number of distinct gray levels is usually a power of 2, that is, L 2B where Bis the number of bits in the binary representation of the brightness levels. WhenB 1 we speak of a gray-level image; when B 1 we speak of a binary image. In abinary image there are just two gray levels which can be referred to, for example,as “black” and “white” or “0” and “1”.2.2 CHARACTERISTICS OF IMAGE OPERATIONSThere is a variety of ways to classify and characterize image operations. Thereason for doing so is to understand what type of results we might expect toachieve with a given type of operation or what might be the computational burdenassociated with a given operation.2.2.1 Types of operationsThe types of operations that can be applied to digital images to transform an inputimage a[m,n] into an output image b[m,n] (or another representation) can beclassified into three categories as shown in Table 2.OperationCharacterizationGenericComplexity/Pixel Point– the output value at a specific coordinate is dependent onlyconstanton the input value at that same coordinate. Local– the output value at a specific coordinate is dependent on theP2input values in the neighborhood of that same coordinate. Global– the output value at a specific coordinate is dependent on allN2the values in the input image.Table 2: Types of image operations. Image size N N; neighborhood size P P. Note that the complexity is specified in operations per pixel.This is shown graphically in Figure 2.aabPointbLocalaGlobalb [m mo , n no ]Figure 2: Illustration of various types of image operations4

Image Processing Fundamentals2.2.2 Types of neighborhoodsNeighborhood operations play a key role in modern digital image processing. It istherefore important to understand how images can be sampled and how thatrelates to the various neighborhoods that can be used to process an image. Rectangular sampling – In most cases, images are sampled by laying arectangular grid over an image as illustrated in Figure 1. This results in the type ofsampling shown in Figure 3ab. Hexagonal sampling – An alternative sampling scheme is shown in Figure 3cand is termed hexagonal sampling.Both sampling schemes have been studied extensively [1] and both represent apossible periodic tiling of the continuous image space. We will restrict ourattention, however, to only rectangular sampling as it remains, due to hardwareand software considerations, the method of choice.Local operations produce an output pixel value b[m mo,n no] based upon thepixel values in the neighborhood of a[m mo,n no]. Some of the most commonneighborhoods are the 4-connected neighborhood and the 8-connectedneighborhood in the case of rectangular sampling and the 6-connectedneighborhood in the case of hexagonal sampling illustrated in Figure 3.Figure 3aRectangular sampling4-connectedFigure 3bRectangular sampling8-connectedFigure 3cHexagonal sampling6-connected2.3 VIDEO PARAMETERSWe do not propose to describe the processing of dynamically changing images inthis introduction. It is appropriate—given that many static images are derivedfrom video cameras and frame grabbers— to mention the standards that areassociated with the three standard video schemes that are currently in worldwideuse – NTSC, PAL, and SECAM. This information is summarized in Table 3.5

Image Processing FundamentalsStandardNTSCPALSECAMPropertyimages / secondms / imagelines / image(horiz./vert.) aspect ratiointerlaceµs / 40.06254:32:164.00Table 3: Standard video parametersIn an interlaced image the odd numbered lines (1,3,5, ) are scanned in half of theallotted time (e.g. 20 ms in PAL) and the even numbered lines (2,4,6, ) arescanned in the remaining half. The image display must be coordinated with thisscanning format. (See Section 8.2.) The reason for interlacing the scan lines of avideo image is to reduce the perception of flicker in a displayed image. If one isplanning to use images that have been scanned from an interlaced video source, itis important to know if the two half-images have been appropriately “shuffled” bythe digitization hardware or if that should be implemented in software. Further,the analysis of moving objects requires special care with interlaced video to avoid“zigzag” edges.The number of rows (N) from a video source generally corresponds one–to–onewith lines in the video image. The number of columns, however, depends on thenature of the electronics that is used to digitize the image. Different framegrabbers for the same video camera might produce M 384, 512, or 768 columns(pixels) per line.3.ToolsCertain tools are central to the processing of digital images. These includemathematical tools such as convolution, Fourier analysis, and statisticaldescriptions, and manipulative tools such as chain codes and run codes. We willpresent these tools without any specific motivation. The motivation will follow inlater sections.3.1 CONVOLUTIONThere are several possible notations to indicate the convolution of two (multidimensional) signals to produce an output signal. The most common are: 6

Image Processing Fundamentalsc a b a b(1)We shall use the first form, c a b , with the following formal definitions.In 2D continuous space: c ( x, y ) a ( x, y ) b ( x, y ) a( χ , ζ )b( x χ , y ζ )d χ dζ(2) In 2D discrete space:c[m, n] a[m, n] b[m, n] a[ j , k ]b[m j , n k ](3)j k 3.2 PROPERTIES OF CONVOLUTIONThere are a number of important mathematical properties associated withconvolution. Convolution is commutative.c a b b a(4)c a (b d ) (a b) d a b d(5) Convolution is associative. Convolution is distributive.c a (b d ) (a b) (a d )(6)where a, b, c, and d are all images, either continuous or discrete.3.3 FOURIER TRANSFORMSThe Fourier transform produces another representation of a signal, specifically arepresentation as a weighted sum of complex exponentials. Because of Euler’sformula:e jq cos(q) j sin(q)(7)where j 2 1 , we can say that the Fourier transform produces a representation ofa (2D) signal as a weighted sum of sines and cosines. The defining formulas for7

Image Processing Fundamentalsthe forward Fourier and the inverse Fourier transforms are as follows. Given animage a and its Fourier transform A, then the forward transform goes from thespatial domain (either continuous or discrete) to the frequency domain which isalways continuous.ForwardA F {a}–(8)The inverse Fourier transform goes from the frequency domain back to the spatialdomain.a F 1 { A}Inverse –(9)The Fourier transform is a unique and invertible operation so that:a F 1{F {a}}andA F{F 1{ A}}(10)The specific formulas for transforming back and forth between the spatial domainand the frequency domain are given below.In 2D continuous space: Forward a ( x, y )eA(u, v) – j (ux vy )dxdy(11) a ( x, y ) Inverse – 14π2 A(u, v)e j (ux vy ) dudv(12) In 2D discrete space:Forward –A(Ω, Ψ ) a[m, n]e j (Ωm Ψn )(13)A(Ω, Ψ )e j (Ωm Ψn ) d Ωd Ψ(14)m n Inverse –a[m, n] π π14π2 π π3.4 PROPERTIES OF FOURIER TRANSFORMSThere are a variety of properties associated with the Fourier transform and theinverse Fourier transform. The following are some of the most relevant for digitalimage processing.8

Image Processing Fundamentals The Fourier transform is, in general, a complex function of the real frequencyvariables. As such the transform can be written in terms of its magnitude andphase.A(u, v) A(u, v) e jϕ (u ,v )A(Ω, Ψ ) A(Ω, Ψ ) e jϕ ( Ω,Ψ )(15) A 2D signal can also be complex and thus written in terms of its magnitude andphase.a ( x, y ) a( x, y ) e jϑ ( x , y )a[m, n] a[m, n] e jϑ [ m,n ](16) If a 2D signal is real, then the Fourier transform has certain symmetries.A(u, v) A* ( u, v)A(Ω, Ψ ) A* ( Ω, Ψ )(17)The symbol (*) indicates complex conjugation. For real signals eq. (17) leadsdirectly to:A(u, v) A( u, v)ϕ (u, v) ϕ ( u, v)A(Ω, Ψ ) A( Ω, Ψ )ϕ (Ω, Ψ ) ϕ ( Ω, Ψ )(18) If a 2D signal is real and even, then the Fourier transform is real and even.A(u, v) A( u , v)A(Ω, Ψ ) A( Ω, Ψ )(19) The Fourier and the inverse Fourier transforms are linear operations.F {w1a w2b} F {w1a} F {w2b} w1 A w2 BF 1 {w1 A w2 B} F 1 {w1 A} F 1 {w2 B} w1a w2b(20)where a and b are 2D signals (images) and w1 and w2 are arbitrary, complexconstants. The Fourier transform in discrete space, A(Ω,Ψ), is periodic in both Ω and Ψ.Both periods are 2π.A(Ω 2π j , Ψ 2π k ) A(Ω, Ψ )j , k integers(21) The energy, E, in a signal can be measured either in the spatial domain or thefrequency domain. For a signal with finite energy:9

Image Processing FundamentalsParseval’s theorem (2D continuous space): E a( x, y ) dxdy 124π2 2A(u, v) dudv(22)2(23) Parseval’s theorem (2D discrete space):E a[m, n] m n π π124π2 A(Ω, Ψ ) d Ωd Ψ π πThis “signal energy” is not to be confused with the physical energy in thephenomenon that produced the signal. If, for example, the value a[m,n] representsa photon count, then the physical energy is proportional to the amplitude, a, andnot the square of the amplitude. This is generally the case in video imaging. Given three, multi-dimensional signals a, b, and c and their Fourier transformsA, B, and C:Fc a b C A B(24)andF1 C 2 A Bc a b4πIn words, convolution in the spatial domain is equivalent to multiplication in theFourier (frequency) domain and vice-versa. This is a central result which providesnot only a methodology for the implementation of a convolution but also insightinto how two signals interact with each other—under convolution—to produce athird signal. We shall make extensive use of this result later. If a two-dimensional signal a(x,y) is scaled in its spatial coordinates then:()Ifa ( x, y ) a M x x, M y yThenA(u , v) A u, v Mx MyMMxy (25)10

Image Processing Fundamentals If a two-dimensional signal a(x,y) has Fourier spectrum A(u,v) then: A(u 0, v 0) a( x, y)dxdy a ( x 0, y 0) 14π 2 (26)A(u , v)dxdy If a two-dimensional signal a(x,y) has Fourier spectrum A(u,v) then: a ( x, y ) F juA(u, v) x 2 a ( x, y ) F2 x2 u A(u , v) a ( x, y ) F jvA(u, v) y 2 a ( x, y ) F2 y2(27) v A(u, v)3.4.1 Importance of phase and magnitudeEquation (15) indicates that the Fourier transform of an image can be complex.This is illustrated below in Figures 4a-c. Figure 4a shows the original imagea[m,n], Figure 4b the magnitude in a scaled form as log( A(Ω,Ψ) ), and Figure 4cthe phase ϕ(Ω,Ψ).Figure 4aFigure 4bFigure 4cOriginallog( A(Ω,Ψ) )ϕ(Ω,Ψ)Both the magnitude and the phase functions are necessary for the completereconstruction of an image from its Fourier transform. Figure 5a shows whathappens when Figure 4a is restored solely on the basis of the magnitudeinformation and Figure 5b shows what happens when Figure 4a is restored solelyon the basis of the phase information.11

Image Processing FundamentalsFigure 5aFigure 5bϕ(Ω,Ψ) 0 A(Ω,Ψ) constantNeither the magnitude information nor the phase information is sufficient torestore the image. The magnitude–only image (Figure 5a) is unrecognizable andhas severe dynamic range problems. The phase-only image (Figure 5b) is barelyrecognizable, that is, severely degraded in quality.3.4.2 Circularly symmetric signalsAn arbitrary 2D signal a(x,y) can always be written in a polar coordinate systemas a(r,θ). When the 2D signal exhibits a circular symmetry this means that:a ( x, y ) a ( r , θ ) a ( r )(28)where r2 x2 y2 and tanθ y/x. As a number of physical systems such as lensesexhibit circular symmetry, it is useful to be able to compute an appropriateFourier representation.The Fourier transform A(u,v) can be written in polar coordinates A(q,ξ) and then,for a circularly symmetric signal, rewritten as a Hankel transform: A(u, v) F {a( x, y )} 2π a (r ) J o( r q ) r dr A(q)(29)0where q 2 u 2 v 2 and tan ξ v u and Jo( ) is a Bessel function of the first kindof order zero.The inverse Hankel transform is given by:1a (r ) 2π A(q) J o( rq ) q dq(30)012

Image Processing FundamentalsThe Fourier transform of a circularly symmetric 2D signal is a function of onlythe radial frequency, q. The dependence on the angular frequency, ξ, hasvanished. Further, if a(x,y) a(r) is real, then it is automatically even due to thecircular symmetry. According to equation (19), A(q) will then be real and even.3.4.3 Examples of 2D signals and transformsTable 4 shows some basic and useful signals and their 2D Fourier transforms. Inusing the table entries in the remainder of this chapter we will refer to a spatialdomain term as the point spread function (PSF) or the 2D impulse response andits Fourier transforms as the optical transfer function (OTF) or simply transferfunction. Two standard signals used in this table are u( ), the unit step function,and J1( ), the Bessel function of the first kind. Circularly symmetric signals aretreated as functions of r as in eq. (28).3.5 STATISTICSIn image processing it is quite common to use simple statistical descriptions ofimages and sub–images. The notion of a statistic is intimately connected to theconcept of a probability distribution, generally the distribution of signalamplitudes. For a given region—which could conceivably be an entire image—wecan define the probability distribution function of the brightnesses in that regionand the probability density function of the brightnesses in that region. We willassume in the discussion that follows that we are dealing with a digitized imagea[m,n].3.5.1 Probability distribution function of the brightnessesThe probability distribution function, P(a), is the probability that a brightnesschosen from the region is less than or equal to a given brightness value a. As aincreases from – to , P(a) increases from 0 to 1. P(a) is monotonic, nondecreasing in a and thus dP/da 0.3.5.2 Probability density function of the brightnessesThe probability that a brightness in a region falls between a and a Δa, given theprobability distribution function P(a), can be expressed as p(a)Δa where p(a) isthe probability density function: dP(a) p(a )Δa Δa da (31)13

Image Processing FundamentalsT.1 RectangleRa ,b ( x, y ) 1u (a 2 x

Image Processing Fundamentals 3 Rows Columns Value a(x, y, z, λ, t) Figure 1: Digitization of a continuous image. The pixel at coordinates [m 10, n 3] has the integer brightness value 110.The image shown in Figure 1 has been divided into N 16 rows and M 16 columns.

Related Documents:

The input for image processing is an image, such as a photograph or frame of video. The output can be an image or a set of characteristics or parameters related to the image. Most of the image processing techniques treat the image as a two-dimensional signal and applies the standard signal processing techniques to it. Image processing usually .

L2: x 0, image of L3: y 2, image of L4: y 3, image of L5: y x, image of L6: y x 1 b. image of L1: x 0, image of L2: x 0, image of L3: (0, 2), image of L4: (0, 3), image of L5: x 0, image of L6: x 0 c. image of L1– 6: y x 4. a. Q1 3, 1R b. ( 10, 0) c. (8, 6) 5. a x y b] a 21 50 ba x b a 2 1 b 4 2 O 46 2 4 2 2 4 y x A 1X2 A 1X1 A 1X 3 X1 X2 X3

Digital image processing is the use of computer algorithms to perform image processing on digital images. As a . Digital cameras generally include dedicated digital image processing chips to convert the raw data from the image sensor into a color-corrected image in a standard image file format. I

What is Digital Image Processing? Digital image processing focuses on two major tasks -Improvement of pictorial information for human interpretation -Processing of image data for storage, transmission and representation for autonomous machine perception Some argument about where image processing ends and fields such as image

Digital image processing is the use of computer algorithms to perform image processing on digital images. As a subfield of digital signal processing, digital image processing has many advantages over analog image processing; it allows a much wider range of algorithms to be applied to the in

Digital Image Fundamentals Titipong Keawlek Department of Radiological Technology Naresuan University Digital Image Structure and Characteristics Image Types Analog Images Digital Images Digital Image Structure Pixels Pixel Bit Depth Digital Image Detail Pixel Size Matrix size Image size (Field of view) The imaging modalities Image Compression .

Digital Image Fundamentals Human and Computer Vision We can’t think of image processing without considering the human vision system. We observe and evaluate the images that we process with our visual system. Digital Image Processing

Corrections, Image Restoration, etc. the image processing world to restore images [25]. Fig 1. Image Processing Technique II. TECHNIQUES AND METHODS A. Image Restoration Image Restoration is the process of obtaining the original image from the degraded image given the knowledge of the degrading factors. Digital image restoration is a field of