UNIT-1 Introduction To Image Processing PDF

Summary

This document provides an introduction to image processing, covering topics such as components of an image processing system, image sensing, image formation, and image types. The document also discusses applications like gamma ray imaging and X-ray imaging. The unit also details concepts and components of image processing systems, including image sensors, specialized hardware, and software.

Full Transcript

# UNIT-1 ## Introduction To Image Processing - Components of an image processing system - Image sensing and acquisition - Simple image formation model - Representation of a digital image - Sampling and quantization - Aliasing - Zooming and Shrinking - Basic relations between pixels - Image ty...

# UNIT-1 ## Introduction To Image Processing - Components of an image processing system - Image sensing and acquisition - Simple image formation model - Representation of a digital image - Sampling and quantization - Aliasing - Zooming and Shrinking - Basic relations between pixels - Image types - Image file formats - Applications of 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. ## 1.1.1 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. ## 1.1.2 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.1.3 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. ### ii) Specialize image processing hardware It consists of the digitizer just mentioned, plus hardware that performs other primitive operations such as an arithmetic logic unit, which performs arithmetic such addition and subtraction and logical operations in parallel on images ### iii) Computer It is a general purpose computer and can range from a PC to a supercomputer depending on the application. In dedicated applications, sometimes specially designed computer are used to achieve a required level of performance ### iv) Software It consist of specialized modules that perform specific tasks a well designed package also includes capability for the user to write code, as a minimum, utilizes the specialized module. More sophisticated software packages allow the integration of these modules. ### v) Mass storage – This capability is a must in image processing applications. An image of size 1024 x1024 pixels,in which the intensity of each pixel is an 8- bit quantity requires one megabytes of storage space if the image is not compressed .Image processing applications falls into three principal categories of storage - Short term storage for use during processing - On line storage for relatively fast retrieval - Archival storage such as magnetic tapes and disks ### vi) Image displays- Image displays in use today are mainly color TV monitors. These monitors are driven by the outputs of image and graphics displays cards that are an integral part of computer system ### vii) Hardcopy devices The devices for recording image includes laser printers, film cameras, heat sensitive devices inkjet units and digital units such as optical and CD ROM disk. Films provide the highest possible resolution, but paper is the obvious medium of choice for written applications. ### 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.1.4 Elements of Visual Perception ### 1.1.4.1 Structure of the human Eye The eye is nearly a sphere with average approximately 20 mm diameter. The eye is enclosed with three membranes - **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 - **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 - **Iris Diaphragms-** it contracts or expands to control the amount of light that enters the eyes - **Ciliary body** - **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 - **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 photopic or bright light vision - **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 scotopic or dim light vision. - The absent of reciprocators is called **blind spot** ### 1.1.4.2 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 strongly 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. ### 1.1.4.3 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 1010 from scotopic threshold to the glare limit. Experimental evidences indicate that subjective brightness is a logarithmic function of the light intensity incident on the eye. - The curve represents the range of intensities to which the visual system can adopt. But the visual system cannot operate over such a dynamic range simultaneously. Rather, it is accomplished by change in its overcall sensitivity called brightness adaptation. - For any given set of conditions, the current sensitivity level to which of the visual system is called brightness adoption level, Ba in the curve. The small intersecting curve represents the range of subjective brightness that the eye can perceive when adapted to this level. It is restricted at level B♭, at and below which all stimuli are perceived as indistinguishable blacks. The upper portion of the curve is not actually restricted. whole simply raise the adaptation level higher than Ba. - The ability of the eye to discriminate between change in light intensity at any specific adaptation level is also of considerable interest. - Take a flat, uniformly illuminated area large enough to occupy the entire field of view of the subject. It may be a diffuser such as an opaque glass, that is illuminated from behind by a light source whose intensity, I can be varied. To this field is added an increment of illumination AI in the form of a short duration flash that appears as circle in the center of the uniformly illuminated field. - If AI is not bright enough, the subject cannot see any perceivable changes. - As AI gets stronger the subject may indicate of a perceived change. AI is the increment of illumination discernible 50% of the time with background illumination I. Now, AI /I is 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”. ### 1.1.4.4 Optical illusion In this the eye fills the non existing information or wrongly pervious geometrical properties of objects. ## 1.1.5 Fundamental Steps in Digital Image Processing There are two categories of the steps involved in the image processing - Methods whose outputs are input are images. - 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 - Lossless Compression - Lossy Compression ### vii) Morphological processing – It deals with tools for extracting image components that are useful in the representation and description of shape and boundary of objects. It is majorly used in automated inspection applications. ### viii) Representation and Description- It always follows the output of segmentation step that is, raw pixel data, constituting either the boundary of an image or points in the region itself. In either case converting the data to a form suitable for computer processing is necessary. ### ix) Recognition – It is the process that assigns label to an object based on its descriptors. It is the last step of image processing which use artificial intelligence of softwares. ### Knowledge base Knowledge about a problem domain is coded into an image processing system in the form of a knowledge base. This knowledge may be as simple as detailing regions of an image where the information of the interest in known to be located. Thus limiting search that has to be conducted in seeking the information. The knowledge base also can be quite complex such interrelated list of all major possible defects in a materials inspection problems or an image database containing high resolution satellite images of a region in connection with change detection application ## 1.1.6 A Simple Image Model An image is denoted by a two-dimensional function of the form f{x, y}. The value or amplitude of f at spatial coordinates {x,y} is a positive scalar quantity whose physical meaning is determined by the source of the image. - When an image is generated by a physical process, its values are proportional to energy radiated by a physical source. - As a consequence, f(x,y) must be nonzero and finite; that is o<f(x,y) <co The function f(x,y) may be characterized by two components- - The amount of the source illumination incident on the scene being viewed. - The amount of the source illumination reflected back by the objects in the scene These are called illumination and reflectance components and are denoted by i (x,y) an r (x,y) respectively. - 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 (1) of the image at that point - 1= f (x, y.) - Lmin ≤ 1 ≤ Lmax - Lmin = imin rmin - Lamx = imax rmax - The interval [Lmin, Lmax] is called gray scale. Common practice is to shift this interval numerically to the interval [0, L-1] where 1=0 is considered black and 1= L-1 is considered white on the gray scale. All intermediate values are shades of gray of gray varying from black to white. ## 1.1.7 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 block to white. The vertical tick mark assign the specific value assigned to each of the 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.1.8 Digital Image Definition A digital image described in a 2D discrete space is derived from an analog image 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 1. - The 2D continuous image هات 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 [] with {m _ [11.2. M-1) and (1.1.2, N_1) is [mm]. In fact, in most cases f(x), is actually a function of many variables including depth (and time (1) (2),color - Thus the right side of the matrix represents a digital element, pixel or pel. The matrix can be represented in the following form as well. - The sampling process may be viewed as partitioning the xy plane into a grid with the coordinates of the center of each grid being a pair of elements from the Cartesian products Z2 which is the set of all ordered pair of elements (Zi, Zj) with Zi and Zj being integers from Z. - Hence f(x,y) is a digital image if gray level (that is, a real number from the set of real number R) to each distinct pair of coordinates (x,y). This functional assignment is the quantization process. - If the gray levels are also integers, Z replaces R, the and a digital image become a 2D function whose coordinates and she amplitude value are integers. - Due to processing storage and hardware consideration, the number gray levels typically is an integer power of 2. - L=2K - Then, the number, b, of bites required to store a digital image - When M=N - The equation become b=N2*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=28) ## 1.1.10 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.1.11 Iso Preference Curves To see the effect of varying N and R simultaneously. There picture are taken having littlie, mid level and high level of details. - Different image were generated by varying N and k and observers were then asked to rank the results according to their subjective quality. - Results were summarized in the form of iso preference curve in the N-k plane. - The iospreference curve tends to shift right and upward but their shapes in each of the three image categories are shown in the figure. - A shift up and right in the curve simply means large values for N and k which implies better picture quality - The result shows that iosreference curve tends to become more vertical as the detail in the image increases. - The result suggests that for image with a large amount of details only a few gray levels may be needed. - For a fixed value of N, the perceived quality for this type of image is nearly independent of the number of gray levels used. ## 1.1.12 Zooming and Shrinking of Digital Images Zooming may be said oversampling and shirking may be called as under sampling these techniques are applied to a digital image. These are two steps of zooming- - Creation of new pixel locations - Assignment of gray level to those new locations. - In order to perform gray –level assignment for any point in the overly, we look for the closet pixel in the original image and assign its gray level to the new pixel in the grid. This method rowan as nearest neighbor interpolation - Pixel replication - Is a special case of nearest neighbor interpolation, It is applicable if we want to increase the size of an image an integer number of times. - For eg.- to increase the size of image as double. We can duplicate each column. This doubles the size of the image horizontal direction. To increase assignment of each of each vertical direction we can duplicate each row. The gray level assignment of each pixel is determined by the fact that new location are exact duplicates of old locations. - Drawbacks - Although nearest neighbor interpolation is fast,it has the undesirable feature that it produces a check board that Is not desirable - Bilinear interpolation- - Using the four nearest neighbor of a point .let (x,y) denote the coordinate of a point in the zoomed image and let v(x1,y1) denote the gray levels assigned to it .for bilinear interpolation .the assigned gray levels is given by - V(x1,y1)-ax1+by1+cx1y1+d - Where the four coefficient are determined from the four equation in four unknowns that can be writing using the four nearest neighbor of point (x1,y1) - Shrinking is done in the similar manner .the equivalent process of the pixel replication is row -column deletion .shrinking leads to the problem of aliasing. ## 1.1.13 Pixel Relationships ### 1.1.13.1 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 n4(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) ### 1.1.13.2 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 n4(P) - 8- Adjacency – two pixel P and Q with value from V are 8 –adjacency if A is in the set n8(P) - M-adjacency-two pixel P and Q with value from V are m adjacency if - Q is in n4 (p) or - Q is in nd (q) and the set N4(p) U N4(q) has no pixel whose values are from V ### 1.1.13.3 Distance measures For pixel p,q and z with coordinate (x.y) ,(s,t) and (v,w) respectably 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 D4 Education Distance between p and is defined as De (p,q) = Iy – t I ## 1.2 IMAGE ENHANCEMENT IN FREQUENCY DOMAIN ### 1.2.1 Fourier Transform and the Frequency Domain Any function that periodically reports itself can be expressed as a sum of sines and cosines of different frequencies each multiplied by a different coefficient, this sum is called Fourier series. Even the functions which are non periodic but whose area under the curve if finite can also be represented in such form; this is now called Fourier transform. A function represented in either of these forms and can be completely reconstructed via an inverse process with no loss of information. ### 1.2.1.1 1-D Fourier Transformation and its Inverse If there is a single variable, continuous function f(x), then Fourier transformation F (u) may be given as $F{f(x)} = F(u) = \int_{0}^{\infty}$ $f(x)exp(-j2nux)dx$ $j=\sqrt{-1}$ And the reverse process to recover f(x) from F(u) is ## Image Types Image can be broadly classified under four categories: 1. Black and white or binary images. 2. Grayscale Images 3. Color Images 4. Multispectral images. ### A binary image A binary image is a digital image that has only two possible values for each pixel. Typically, the two colors used for a binary image are black and white. Binary images are also called bi-level or two-level. This means that each pixel is stored as a single bit -i.e., a 0 or 1. The names black-and-white, B&W, monochrome or monochromatic are often used for this concept, but may also designate any images that have only one sample per pixel. ### Grayscale Images A grayscale or greyscale digital image is an image in which the value of each pixel is a single sample, that is, it carries only intensity information. Images of this sort, also known as black-and-white, are composed exclusively of shades of gray, varying from black at the weakest intensity to white at the strongest. Grayscale images are distinct from one-bit bi-tonal black-and-white images, which in the context of computer imaging are images with only the two colors, black, and white (also called bilevel or binary images). Grayscale images have many shades of gray in between. ### Colour Images A color image has three values per pixel and they measure the intensity and chrominance of light. Each pixel is a vector of colour components. ### 16 bit color format It is a color image format. It has 65,536 different colors in it. It is also known as High color format. - It has been used by Microsoft in their systems that support more then 8 bit color format. - Now in this 16 bit format and the next format we are going to discuss which is a 24 bit format are both color format. - The distribution of color in a color image is not as simple as it was in grayscale image. - A 16 bit format is actually divided into three further formats which are Red, Green and Blue. The famous (RGB) format. - It is pictorially represented in the image below. - R - 16 - G - B - Now the question arises, that how would you distribute 16 into three. If you do it like this, 5 bits for R, 5 bits for G, 5 bits for B - Then there is one bit remains in the end. - So the distribution of 16 bit has been done like this. - 5 bits for R, 6 bits for G, 5 bits for B. - The additional bit that was left behind is added into the green bit. Because green is the color which is most soothing to eyes in all of these three colors. - Note this is distribution is not followed by all the systems. Some have introduced an alpha channel in the 16 bit. - Another distribution of 16 bit format is like this: - 4 bits for R, 4 bits for G, 4 bits for B, 4 bits for alpha channel. - Or some distribute it like this - 5 bits for R, 5 bits for G, 5 bits for B, 1 bits for alpha channel. ### 24 bit color format 24 bit color format also known as true color format. Like 16 bit color format, in a 24 bit color format, the 24 bits are again distributed in three different formats of Red, Green and Blue. - R - 24 - G - B - Since 24 is equally divided on 8, so it has been distributed equally between three different color channels. - Their distribution is like this. - 8 bits for R, 8 bits for G, 8 bits for B. ### Behind a 24 bit image. Unlike a 8 bit gray scale image, which has one matrix behind it, a 24 bit image has three different matrices of R, G, B. ## Format It is the most common used format. Its format is PPM ( Portable pixMap) which is supported by Linux operating system. The famous windows has its own format for it which is BMP (Bitmap).

Use Quizgecko on...
Browser
Browser