Digital Image Processing Tutorial, Study Guides, Projects, Research of Digital Image Processing

Covers the basic concepts of Digital Image Processing.

Typology: Study Guides, Projects, Research

2017/2018

Uploaded on 10/22/2018

chakshu-diwan
chakshu-diwan 🇬🇧

4.5

(2)

1 document

1 / 95

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
S.ALI ASGAR LECTURE NOTES DIGITAL IMAGE PROCESSING
CREC Dept. of ECE Page | 1
LECTURE NOTES
ON
DIGITAL IMAGE PROCESSING
IV B.TECH I SEMESTER ECE
(JNTUA-R13)
Mr. S. ALI ASGAR, M.Tech
Assistant Professor, Dept. of ECE
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING
CHADALAWADA RAMANAMMA ENGINEERING COLLEGE
CHADALAWADA NAGAR, RENIGUNTA ROAD, TIRUPATI (A.P) 517506
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f

Partial preview of the text

Download Digital Image Processing Tutorial and more Study Guides, Projects, Research Digital Image Processing in PDF only on Docsity!

LECTURE NOTES

ON

DIGITAL IMAGE PROCESSING

IV B.TECH I SEMESTER ECE

(JNTUA-R13)

Mr. S. ALI ASGAR, M.Tech

Assistant Professor, Dept. of ECE

DEPARTMENT OF ELECTRONICS & COMMUNICATION

ENGINEERING

CHADALAWADA RAMANAMMA ENGINEERING COLLEGE

CHADALAWADA NAGAR, RENIGUNTA ROAD, TIRUPATI (A.P) – 517506

UNIT-I

INTRODUCTION TO IMAGE PROCESSING

1.1 Introduction: The digital image processing deals with developing a digital system that performs operations on a digital image. An image is nothing more than a two dimensional signal. It is defined by the mathematical function f(x,y) where x and y are the two co-ordinates horizontally and vertically and the amplitude of f at any pair of coordinate (x, y) is called the intensity or gray level of the image at that point. When x, y and the amplitude values of f are all finite discrete quantities, we call the image a digital image. The field of image digital image processing refers to the processing of digital image by means of a digital computer. A digital image is composed of a finite number of elements, each of which has a particular location and values of these elements are referred to as picture elements, image elements, pels and pixels. Motivation and Perspective: Digital image processing deals with manipulation of digital images through a digital computer. It is a subfield of signals and systems but focus particularly on images. DIP focuses on developing a computer system that is able to perform processing on an image. The input of that system is a digital image and the system process that image using efficient algorithms, and gives an image as an output. The most common example is Adobe Photoshop. It is one of the widely used application for processing digital images. Applications:

Some of the major fields in which digital image processing is widely used are mentioned below (1) Gamma Ray Imaging- Nuclear medicine and astronomical observations. (2) X-Ray imaging – X-rays of body. (3) Ultraviolet Band – Lithography, industrial inspection, microscopy, lasers. (4) Visual And Infrared Band – Remote sensing. (5) Microwave Band – Radar imaging.

1.2 Components of Image processing System:

i) Image Sensors: With reference to sensing, two elements are required to acquire digital image. The first is a physical device that is sensitive to the energy radiated by the object we wish to image and second is specialized image processing hardware.

viii) Networking: It is almost a default function in any computer system in use today because of the large amount of data inherent in image processing applications. The key consideration in image transmission bandwidth. 1.3 Elements of Visual Spectrum: (i) Structure of Human eye: The eye is nearly a sphere with average approximately 20 mm diameter. The eye is enclosed with three membranes a) The cornea and sclera - it is a tough, transparent tissue that covers the anterior surface of the eye. Rest of the optic globe is covered by the sclera b) The choroid – It contains a network of blood vessels that serve as the major source of nutrition to the eyes. It helps to reduce extraneous light entering in the eye It has two parts (1) Iris Diaphragms- it contracts or expands to control the amount of light that enters the eyes (2) Ciliary body

(c) Retina – it is innermost membrane of the eye. When the eye is properly focused, light from an object outside the eye is imaged on the retina. There are various light receptors over the surface of the retina The two major classes of the receptors are-

  1. cones- it is in the number about 6 to 7 million. These are located in the central portion of the retina called the fovea. These are highly sensitive to color. Human can resolve fine details with these cones because each one is connected to its own nerve end. Cone vision is called photonic or bright light vision.
  2. Rods – these are very much in number from 75 to 150 million and are distributed over the entire retinal surface. The large area of distribution and the fact that several roads are connected to a single nerve give a general overall picture of the field of view. They are not

involved in the color vision and are sensitive to low level of illumination. Rod vision is called is isotopic or dim light vision. The absent of reciprocators is called blind spot.

(ii) Image formation in the eye: The major difference between the lens of the eye and an ordinary optical lens in that the former is flexible. The shape of the lens of the eye is controlled by tension in the fiber of the ciliary body. To focus on the distant object the controlling muscles allow the lens to become thicker in order to focus on object near the eye it becomes relatively flattened. The distance between the center of the lens and the retina is called the focal length and it varies from 17mm to 14mm as the refractive power of the lens increases from its minimum to its maximum. When the eye focuses on an object farther away than about 3m.the lens exhibits its lowest refractive power. When the eye focuses on a nearly object. The lens is most srongly refractive. The retinal image is reflected primarily in the area of the fovea. Perception then takes place by the relative excitation of light receptors, which transform radiant energy into electrical impulses that are ultimately decoded by the brain.

(iii) Brightness adaption and discrimination: Digital image are displayed as a discrete set of intensities. The range of light intensity levels to which the human visual system can adopt is enormous- on the order of 10^10 - from isotopic threshold to the glare limit. Experimental evidences indicate that subjective brightness is a logarithmic function of the light intensity incident on the eye.

called the Weber ratio. Small value means that small percentage change in intensity is discernible representing “good” brightness discrimination. Large value of Weber ratio means large percentage change in intensity is required representing “poor brightness discrimination”. (iv) Optical Illusion: In this the eye fills the non existing information or wrongly pervious geometrical properties of objects.

1.4 Fundamental steps involved in Image processing: There are two categories of the steps involved in the image processing – (1) Methods whose outputs are input are images. (2) Methods whose outputs are attributes extracted from those images. i) Image acquisition: It could be as simple as being given an image that is already in digital form. Generally the image acquisition stage involves processing such scaling. ii) Image Enhancement: It is among the simplest and most appealing areas of digital image processing. The idea behind this is to bring out details that are obscured or simply to highlight certain features of interest in image. Image enhancement is a very subjective area of image processing.

iii) Image Restoration: It deals with improving the appearance of an image. It is an objective approach, in the sense that restoration techniques tend to be based on mathematical or probabilistic models of image processing. Enhancement, on the other hand is based on human subjective preferences regarding what constitutes a “good” enhancement result.

iv) Color image processing: It is an area that is been gaining importance because of the use of digital images over the internet. Color image processing deals with basically color models and their implementation in image processing applications.

v) Wavelets and Multiresolution Processing: These are the foundation for representing image in various degrees of resolution.

vi) Compression: It deals with techniques reducing the storage required to save an image, or the bandwidth required to transmit it over the network. It has to major approaches a) Lossless Compression b) Lossy Compression

The functions combine as a product to form f(x,y). We call the intensity of a monochrome image at any coordinates (x,y) the gray level (l) of the image at that point l= f (x, y.) L (^) min ≤ l ≤ Lmax Lmin is to be positive and Lmax must be finite Lmin = imin rmin Lmax = imax rmax The interval [Lmin, Lmax] is called gray scale. Common practice is to shift this interval numerically to the interval [0, L-l] where l=0 is considered black and l= L-1 is considered white on the gray scale. All intermediate values are shades of gray of gray varying from black to white. 1.6 Image Sampling And Quantization: To create a digital image, we need to convert the continuous sensed data into digital from. This involves two processes – sampling and quantization. An image may be continuous with respect to the x and y coordinates and also in amplitude. To convert it into digital form we have to sample the function in both coordinates and in amplitudes. Digitalizing the coordinate values is called sampling. Digitalizing the amplitude values is called quantization. There is a continuous the image along the line segment AB. To simple this function, we take equally spaced samples along line AB. The location of each samples is given by a vertical tick back (mark) in the bottom part. The samples are shown as block squares superimposed on function the set of these discrete locations gives the sampled function.

In order to form a digital, the gray level values must also be converted (quantized) into discrete quantities. So we divide the gray level scale into eight discrete levels ranging from

eight level values. The continuous gray levels are quantized simply by assigning one of the eight discrete gray levels to each sample. The assignment it made depending on the vertical proximity of a simple to a vertical tick mark.

Starting at the top of the image and covering out this procedure line by line produces a two dimensional digital image. 1.7 Digital Image definition: A digital image f(m,n) described in a 2D discrete space is derived from an analog image f(x,y) in a 2D continuous space through a sampling process that is frequently referred to as digitization. The mathematics of that sampling process will be described in subsequent Chapters. For now we will look at some basic definitions associated with the digital image. The effect of digitization is shown in figure.

The 2D continuous image f(x,y) is divided into N rows and M columns. The intersection of a row and a column is termed a pixel. The value assigned to the integer coordinates (m,n) with m=0,1,2..N-1 and n=0,1,2…N-1 is f(m,n). In fact, in most cases, is actually a function of many variables including depth, color and time (t).

Then, the number, b, of bites required to store a digital image is B=M N k When M=N, the equation become b=N^2 *k When an image can have 2k gray levels, it is referred to as “k- bit”. An image with 256 possible gray levels is called an “8- bit image” (256=2^8 ). 1.9 Spatial and Gray level resolution: Spatial resolution is the smallest discernible details are an image. Suppose a chart can be constructed with vertical lines of width w with the space between the also having width W, so a line pair consists of one such line and its adjacent space thus. The width of the line pair is 2w and there is 1/2w line pair per unit distance resolution is simply the smallest number of discernible line pair unit distance.

Gray levels resolution refers to smallest discernible change in gray levels. Measuring discernible change in gray levels is a highly subjective process reducing the number of bits R while repairing the spatial resolution constant creates the problem of false contouring.

It is caused by the use of an insufficient number of gray levels on the smooth areas of the digital image. It is called so because the rides resemble top graphics contours in a map. It is generally quite visible in image displayed using 16 or less uniformly spaced gray levels. 1.10 Relationship between pixels: (i) Neighbor of a pixel: A pixel p at coordinate (x,y) has four horizontal and vertical neighbor whose coordinate can be given by (x+1, y) (X-1,y) (X ,y + 1) (X, y-1) This set of pixel called the 4-neighbours of p is denoted by n 4 (p) ,Each pixel is a unit distance from (x,y) and some of the neighbors of P lie outside the digital image of (x,y) is on the border if the image. The four diagonal neighbor of P have coordinated (x+1,y+1),(x+1,y+1),(x-1,y+1),(x-1,y-1) And are deported by nd (p) .these points, together with the 4-neighbours are called 8 – neighbors of P denoted by ns(p). (ii) Adjacency: Let v be the set of gray – level values used to define adjacency, in a binary image, v={1} if we are reference to adjacency of pixel with value. Three types of adjacency 4- Adjacency – two pixel P and Q with value from V are 4 – adjacency if A is in the set n 4 (P) 8- Adjacency – two pixel P and Q with value from V are 8 – adjacency if A is in the set n 8 (P) M-adjacency – two pixel P and Q with value from V are m – adjacency if (i) Q is in n 4 (p) or (ii)Q is in nd (q) and the set N 4 (p) U N 4 (q) has no pixel whose values are from V (iii) Distance measures: For pixel p,q and z with coordinate (x.y) ,(s,t) and (v,w) respectively D is a distance function or metric if D [p.q] ≥ O {D[p.q] = O iff p=q} D [p.q] = D [p.q] and D [p.q] ≥ O {D[p.q]+D(q,z) The Education Distance between p and is defined as De (p,q) = Iy – t I The D 4 Education Distance between p and is defined as De (p,q) = Iy – t I 1.11 Image sensing and Acquisition: The types of images in which we are interested are generated by the combination of an

formations, or a human brain. We could even image a source, such as acquiring images of the sun. Depending on the nature of the source, illumination energy is reflected from, or transmitted through, objects. An example in the first category is light reflected from a planar surface. An example in the second category is when X-rays pass through a patient’s body for thepurpose of generating a diagnostic X-ray film. In some applications, the reflected or transmitted energy is focused onto a photo converter (e.g., a phosphor screen), which converts the energy into visible light. Electron microscopy and some applications of gamma imaging use this approach. The idea is simple: Incoming energy is transformed into a voltage by the combination of input electrical power and sensor material that is responsive to the particular type of energy being detected. The output voltage waveform is the response of the sensor(s), and a digital quantity is obtained from each sensor by digitizing its response. In this section, we look at the principal modalities for image sensing and generation. (i)Image Acquisition using a Single sensor: The components of a single sensor. Perhaps the most familiar sensor of this type is the photodiode, which is constructed of silicon materials and whose output voltage waveform is proportional to light. The use of a filter in front of a sensor improves selectivity. For example, a green (pass) filter in front of a light sensor favors light in the green band of the color spectrum. As a consequence, the sensor output will be stronger for green light than for other components in the visible spectrum.

In order to generate a 2-D image using a single sensor, there has to be relative displacements in both the x- and y-directions between the sensor and the area to be imaged. Figure shows an arrangement used in high-precision scanning, where a film negative is mounted onto a drum whose mechanical rotation provides displacement in one dimension. The single sensor is mounted on a lead screw that provides motion in the perpendicular direction. Since mechanical motion can be controlled with high precision, this method is an inexpensive (but

slow) way to obtain high-resolution images. Other similar mechanical arrangements use a flat bed, with the sensor moving in two linear directions. These types of mechanical digitizers sometimes are referred to as microdensitometers. (ii)Image Acquisition using a Sensor strips: A geometry that is used much more frequently than single sensors consists of an in-line arrangement of sensors in the form of a sensor strip, shows. The strip provides imaging elements in one direction. Motion perpendicular to the strip provides imaging in the other direction. This is the type of arrangement used in most flat bed scanners. Sensing devices with 4000 or more in-line sensors are possible. In-line sensors are used routinely in airborne imaging applications, in which the imaging system is mounted on an aircraft that flies at a constant altitude and speed over the geographical area to be imaged. One dimensional imaging sensor strips that respond to various bands of the electromagnetic spectrum are mounted perpendicular to the direction of flight. The imaging strip gives one line of an image at a time, and the motion of the strip completes the other dimension of a two-dimensional image. Lenses or other focusing schemes are used to project area to be scanned onto the sensors. Sensor strips mounted in a ring configuration are used in medical and industrial imaging to obtain cross-sectional (“slice”) images of 3-D objects.

(iii)Image Acquisition using a Sensor Arrays: The individual sensors arranged in the form of a 2-D array. Numerous electromagnetic and some ultrasonic sensing devices frequently are arranged in an array format. This is also the predominant arrangement found in digital cameras. A typical sensor for these cameras is a

coordinates, and also in amplitude. To convert it to digital form, we have to sample the function in both coordinates and in amplitude. Digitizing the coordinate values is called sampling. Digitizing the amplitude values is called quantization.

1.13 Digital Image representation: Digital image is a finite collection of discrete samples ( pixels ) of any observable object. The pixels represent a two- or higher dimensional “view” of the object, each pixel having its own discrete value in a finite range. The pixel values may represent the amount of visible light, infra red light, absortation of x-rays, electrons, or any other measurable value such as ultrasound wave impulses. The image does not need to have any visual sense; it is sufficient that the samples form a two-dimensional spatial structure that may be illustrated as an image. The images may be obtained by a digital camera, scanner, electron microscope, ultrasound stethoscope, or any other optical or non-optical sensor. Examples of digital image are:  digital photographs  satellite images  radiological images (x-rays, mammograms)  binary images, fax images, engineering drawings Computer graphics, CAD drawings, and vector graphics in general are not considered in this course even though their reproduction is a possible source of an image. In fact, one goal of intermediate level image processing may be to reconstruct a model (e.g. vector representation) for a given digital image.

1.14 Digitization: Digital image consists of N M pixels, each represented by k bits. A pixel can thus have 2 k different values typically illustrated using a different shades of gray, see Figure. In practical applications, the pixel values are considered as integers varying from 0 (black pixel) to 2 k - (white pixel).

Fig: Example of a digital Image The images are obtained through a digitization process, in which the object is covered by a two-dimensional sampling grid. The main parameters of the digitization are:  Image resolution : the number of samples in the grid.  pixel accuracy : how many bits are used per sample.

These two parameters have a direct effect on the image quality but also to the storage size of the image (Table 1.1). In general, the quality of the images increases as the resolution and the bits per pixel increase. There are a few exceptions when reducing the number of bits increases the image quality because of increasing the contrast. Moreover, in an image with a very high resolution only very few gray-levels are needed. In some applications it is more important to have a high resolution for detecting details in the image whereas in other applications the number of different levels (or colors) is more important for better outlook of the image. To sum up, if we have a certain amount of bits to allocate for an image, it makes difference how to choose the digitization parameters.