Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Image Processing Lecture 2

Similar presentations


Presentation on theme: "Digital Image Processing Lecture 2"— Presentation transcript:

1 Digital Image Processing Lecture 2
Tariq Mahmood Khan

2 Image Processing (Computer Vision) - Recap
“Inverse Photography”

3 Stages in Computer Vision
Physics: Image Formation (Light, Reflectance) Physics: Cameras: Optics (Lens), Sensors (CCD, CMOS) Image Processing: Coding (Transmission, Compression) Image Processing: Enhancement (Noise Cleaning, Colors) IP-CV: Feature Detection (Objects, Actions, Motion) Computer Vision: Scene recovery (3D, Reflectance) Computer Vision: Object Recognition Human and Machine Vision: Visual Perception Robotics: Control Action (autonomous driving)

4 DIP Systems All digital image processing systems consist of some means to (1) digitise / acquire the images, (2) process the images (computing capability), (3) save the images (4) produce human readable hardcopy, and (5) communicate the images to other systems.

5 Image Acquisition Light is emitted by light source
Light is reflected from objects Reflected light is sensed (captured) by eye or by camera In general, any sensor which can produce spatially-distributed intensity values of electromagnetic radiation is suited to image capturing.

6 Types of Image capturing system
In everyday life a number of image capturing systems are used, depending on the application field. They differ in the acquisition principle acquisition speed spatial resolution sensor system

7 Classification of Sensors
Sensors can be categorized into the following classes according to their sensitivity ranges: Electromagnetic sensors - sensitive to a certain range of electromagnetic radiation gamma radiation X-ray radiation the visual spectrum the infrared spectrum the radio wave range Non- Electromagnetic sensors ultrasonic sensors

8 Image Acquisition 4/22/2017

9 Image description f (x,y): intensity/brightness of the image at spatial coordinates (x,y) 0< f (x,y)<∞ and determined by 2 factors: Illumination component i(x,y): amount of source light incident Reflectance component r(x,y): amount of light reflected by objects f (x,y) = i(x,y) r(x,y) where 0< i(x,y)<∞: determined by the light source 0< r(x,y)<1: determined by the characteristics of objects In case of X-rays, we would deal with a transmissivity instead of a reflectivity 4/22/2017

10 The Digital Image Formation
The digital image is a numerical computer representation of the physical image. The physical image is divided into small regions called picture elements, or pixels. The number stored in each pixel represents the brightness of the scene in the designated region.

11 The Digital Image The conversion process from physical to digital image is called digitisation. At each pixel location, the brightness of the physical image is quantized and converted into an integer number, called the grey level.

12 Sampling and Quantization
Digital line scan 4/22/2017

13 The Digital Image The image displayed is stored as an array of numbers in the computer memory. Colour images are sampled 3 times, giving 3 digital images, 1 each for a primary colour variable (RGB, CMY or HSI).

14 Digital Image Each pixel has an address in the digital image, i.e. row or line number and column or sample number. Typically, the origin (x,y)=(0,0) is at the top-left corner of the image. A digital image of 640 horizontal pixels and 400 vertical pixels will have address values of x=0-639 and y=0-399.

15 The Digital Image The digital image should adequately resolve all spatial and intensity details of the original continuous tone image. The Nyquist (sampling) theorem requires that the pixel size should less than half the size of the finest detail in the original image. Likewise, the gray level brightness increments should be less than half the smallest tonal variation in the original image.

16 The Digital Image Undersampling occurs when the number of pixels in a digital image is too low to accurately represent the fine details present in the original image.

17 The Digital Image Undersampling results in spatial aliasing. The example shows this effect as Moire patterns.

18 Digital Image: Spatial and Intensity Resolution
Spatial resolution refers to the number of pixels in the digital image. Typically, 256x256 is the minimum acceptable spatial resolution. Intensity resolution refers to the number of grey levels available in the digital image. Number of pixels is typically 2^N for computing convenience.

19 Spatial Resolution

20 Spatial Resolution

21 The Digital Image - Zooming
Although a digital image may appear smooth to the human eye, when zoomed up enough the individual pixels always become visible.

22 Intensity Resolution / Grey level Resolution
Intensity resolution refers to the number of grey levels available in the digital image. 256 grey levels (b) 128 grey levels (c) 64 grey levels (d) 32 grey levels

23 Intensity Resolution / Grey level Resolution
For convenient computer storage, the number of grey levels is almost always 2N, N = number of bits. (e) 16 grey levels (f) 8 grey levels (g) 4 grey levels (h) 2 grey levels Image (h) is a binary image.

24 Intensity Resolution / Grey level Resolution
Typically, the minimum number of acceptable grey levels is 16. Note the introduction of false contouring when the brightness resolution is too low.

25 The Digital Image N : N2 = number of pixels, square digital image.
k: 2k = number of grey levels. The memory requirements to store digital images is large. One typical high-resolution image requires 1 Megabyte of memory. Colour images require 3X the memory of monochrome images.

26 Image Interpolation It is a basic tool used extensively in tasks such as zooming, shrinking, rotating, and geometric corrections. Fundamentally, Interpolation is a process of using known data to estimate values at unknown locations. Original resampling shrinking zooming

27 Image Interpolation

28 Image Interpolation Many methods exist in literature for interpolation such as: Pixel Replication / Nearest Neighbor Bilinear Interpolation Bicubic Interpolation

29 Image Interpolation: Nearest Neighbor
Unknown pixel is assigned a value of its nearest neighbor

30 Image Interpolation: Nearest Neighbor
Unknown pixel is assigned a value of its nearest neighbor

31 Image Interpolation: Bilinear Interpolation
Unknown pixel is estimated using values of four neighbors. f(x, y) = ax + by + cxy + d coefficients that need to be estimated Known pixels Unknown pixels

32 Image Interpolation: Bilinear Interpolation
Unknown pixel is estimated using values of four neighbors. f(x, y) = ax + by + cxy + d coefficients that need to be estimated ? Known pixels Unknown pixels

33 Image Interpolation: Bilinear Interpolation
Unknown pixel is estimated using values of four neighbors. f(x, y) = ax + by + cxy + d coefficients that need to be estimated ? Known pixels Unknown pixels Nearest Neighbor pixels

34 Image Interpolation: Bilinear Interpolation
Unknown pixel is estimated using values of four neighbors. f(x, y) = ax + by + cxy + d coefficients that need to be estimated 1 2 ax1 + by1 + cx1y1 + d = f(x1, y1) ax2 + by2 + cx2y2 + d = f(x2, y2) ax3 + by3 + cx3y3 + d = f(x3, y3) ax4 + by4 + cx4y4 + d = f(x4, y4) ? 3 4 a, b, c, d

35 Image Interpolation: Bilinear Interpolation
Unknown pixel is estimated using values of sixteen neighbors.

36 Image Interpolation

37 Basic relationships between pixels
Neighbours of a pixel – 4-neighbors A pixel p at coordinates (x, y) has four horizontal and vertical neighbors whose coordinates are given by (x+1,y), (x-1,y), (x,y+1), (x,y-1) This set of pixels, called the 4-neighbors 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 if (x, y) is on the border of the image.

38 Neighbours of a pixel – 8-neighbors
The four diagonal neighbors of p have coordinates (x+1,y+1),(x+1,y-1),(x-1,y+1),(x-1,y-1) and are denoted by ND(p). These points, together with the 4-neighbors, are called the 8-neighbors of p, denoted by N8(p). As before, some of the points in ND(p) and N8(p) fall outside the image if (x, y) is on the border of the image.

39 Some Definitions Two pixels are said to connected if they are neighbors and if their gray levels satisfy a specified criterion of similarity (say, if their gray levels are equal) 4-adjacency. Two pixels p and q with values from V are 4-adjacent if q is in the set N4(p). 8-adjacency. Two pixels p and q with values from V are 8-adjacent if q is in the set N8(p). m-adjacency (mixed adjacency). Two pixels p and q with values from V are m-adjacent if q is in N4(p), or q is in ND(p) and the set N4(p)  N4(q) has no pixels whose values are from V.

40 Basic relationships between pixels
Arrangement of pixels: 4 neighbors N4(p): Diagonal neighbors ND(p): 8 neighbors N8 (p) = ND(p) U N4(p) :

41 Basic relationships between pixels
Mixed Connectivity: Note: Mixed connectivity can eliminate the multiple path connections that often occurs in 8-connectivity Pixel arrangement 8-adjacent to the center pixel m-adjacency

42 Basic relationships between pixels
Path Let coordinates of pixel p: (x, y), and of pixel q: (s, t) A path from p to q is a sequence of distinct pixels with coordinates: (x0, y0), (x1, y1), , (xn, yn) where (x0, y0) = (x, y) & (xn, yn) = (s, t), and (xi, yi) is adjacent to (xi-1, yi-1) 1 i  n Regions A set of pixels in an image where all component pixels are connected Boundary of a region A set of pixels of a region R that have one of more neighbors that are not in R

43 Distance Measures Given coordinates of pixels p, q, and z: (x,y), (s,t), and (u,v) Euclidean distance between p and q: City-block distance between p and q: Chessboard distance between p and q:

44 Image Operation on a Pixel Basis
when we refer to an operation like “dividing one image by another,” we mean specifically that the division is carried out between corresponding pixels in the two images Other arithmetic and logic operations are similarly defined between corresponding pixels in the images involved.

45 Liner and Nonlinear Operations
Let H be an operator whose input and output are images. H is said to be a linear operator if, for any two images f and g and any two scalars a and b, H(af + bg) = aH(f) + bH(g). An operator that fails the test of above equation by definition is nonlinear.

46 Reading Assignment Chapter 2 ( ) of “Digital Image Processing” by Gonzalez.

47 Assignment Interpolate the following image of size 4x4 to size 8x8 by using: Nearest Neighbor Interpolation Bilinear Interpolation Prob # 2.11 and 2.15 of textbook Due Date 17/09/2012


Download ppt "Digital Image Processing Lecture 2"

Similar presentations


Ads by Google