23
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 grey level brightness increments should be less than half the smallest tonal

Image processing LECTURE 2-B

Embed Size (px)

DESCRIPTION

DIGITAL IMAGE PROCESSING, DIP, IMAGE, EE, ELECTRONICS ENGINEERING

Citation preview

Page 1: Image processing LECTURE 2-B

The Digital ImageThe 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

grey level brightness

increments should be less

than half the smallest tonal

variation in the original

image.

Page 2: Image processing LECTURE 2-B

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.

Page 3: Image processing LECTURE 2-B

The Digital ImageUndersampling results in

spatial aliasing. The example

shows this effect as Moire

patterns.

Page 4: Image processing LECTURE 2-B

Digital ImageSpatial resolution refers to the number of pixels in the digital image.

(a) 1024x1024 pixels

(b) 512x512 pixels

(c) 256x256 pixels

(d) 128x128 pixels

(e) 64x64 pixels

(f) 32x32 pixels

Typically, 256x256 is the minimum acceptable spatial resolution.

Page 5: Image processing LECTURE 2-B

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.

Page 6: Image processing LECTURE 2-B

The Digital Image

Brightness resolution refers to the number of grey levels available in the digital image.

(a) 256 grey levels

(b) 128 grey levels

(c) 64 grey levels

(d) 32 grey levels

Page 7: Image processing LECTURE 2-B

The Digital ImageFor 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.

Page 8: Image processing LECTURE 2-B

The Digital Image

Typically, the minimum

number of acceptable

grey levels is 16.

Note the introduction of

false contouring when

the brightness

resolution is too low.

Page 9: Image processing LECTURE 2-B

The Digital Image

1 Bit : max value = 1 = 21 – 1

1 Byte = 8 bits : max value = 255 = 28 – 1

1 Word = 2 bytes = 16 bits : max value = 65535 = 216 - 1

27 = 128

26 = 64

25 = 32

24 = 16

23

= 822

= 421

= 220 = 1

Bit 7 (MSB)

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0 (LSB)

Page 10: Image processing LECTURE 2-B

The Digital Image

A bit-plane is the binary image associated with a selected bit’s contribution to overall pixel brightness. Most of the image structure is conveyed in the higher order bit planes.

Page 11: Image processing LECTURE 2-B

The Digital Image

The lower order bit

planes carry the

important but more

subtle shading and

detail of the digital

image.

Page 12: Image processing LECTURE 2-B

The Digital Image

N : 2N = number of pixels, square digital image.

m: 2m = 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.

Page 13: Image processing LECTURE 2-B

Basic relationships between pixelsNeighbours 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.

Page 14: Image processing LECTURE 2-B

Neighbours of a pixel – 8-neighborsThe 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.

Page 15: Image processing LECTURE 2-B

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.

Page 16: Image processing LECTURE 2-B

Basic relationships between pixels

Arrangement of pixels: 0 1 10 1 00 0 1

4 neighbours N4(p): 1 0 1 0 0

Diagonal neighbours ND(p): 0 1 1 0 1

8 neighbours N8 (p) = ND(p) U N4(p) : 0 1 1 0 1 0 0 0 1

Page 17: Image processing LECTURE 2-B

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

Page 18: Image processing LECTURE 2-B

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

Page 19: Image processing LECTURE 2-B

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:

22 )()(),( tysxqpDe

tysxqpD ),(4

|)||,max(|),(8 tysxqpD

Page 20: Image processing LECTURE 2-B

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.

Page 21: Image processing LECTURE 2-B

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.

Page 22: Image processing LECTURE 2-B

Reading Assignment

• Chapter 2 (2.3-2.6) of “Digital Image Processing” by Gonzalez.

Page 23: Image processing LECTURE 2-B

Lab Assignment

• Develop an algorithm for converting a one-pixel-thick 8-path to a 4-path.

• Develop an algorithm for converting a one-pixel-thick m-path to a 4-path.