25
Sections 3.1-3.3 Digital Image Processing Gonzales and Woods Irina Rabaev Intensity Transformations

Intensity Transformations

Embed Size (px)

DESCRIPTION

Intensity Transformations. Sections 3.1-3.3 Digital Image Processing Gonzales and Woods Irina Rabaev. Representing digital image. value f(x,y) at each x, y is called intensity level or gray level. Intensity Transformations and Filters. g(x,y)=T[f(x,y)] f(x,y) – input image, - PowerPoint PPT Presentation

Citation preview

Page 1: Intensity Transformations

Sections 3.1-3.3Digital Image Processing

Gonzales and Woods

Irina Rabaev

Intensity Transformations

Page 2: Intensity Transformations

Representing digital image

value f(x,y) at each x, y is called intensity level or gray level

Page 3: Intensity Transformations
Page 4: Intensity Transformations

Intensity Transformations and Filters

g(x,y)=T[f(x,y)]

f(x,y) – input image,g(x,y) – output imageT is an operator on f defined over a neighborhood of point (x,y)

Page 5: Intensity Transformations

Intensity Transformation1 x 1 is the smallest possible neighborhood.In this case g depends only on value of f at

a single point (x,y) and we call T an intensity (gray-level mapping) transformation and write

s = T(r) where r and s denotes respectively the

intensity of g and f at any point (x, y).

Page 6: Intensity Transformations

Some Intensity Transformation Functions

Page 7: Intensity Transformations

Image NegativesDenote [0, L-1] intensity levels of the image.

Image negative is obtained by s= L-1-r

Page 8: Intensity Transformations

Log Transformations

s = clog(1+r), c – const, r ≥ 0Maps a narrow range of low intensity values in the input into a

wider range of

output levels. The opposite is true for higher values of input levels.

Page 9: Intensity Transformations

Power–Law (Gamma) transformation

s = crγ, c,γ –positive constantscurve the grayscale components either to brighten the intensity

(when γ< 1) or darken the intensity (when γ > 1).

Page 10: Intensity Transformations

Power –Law (Gamma) transformation

Page 11: Intensity Transformations

Power –Law (Gamma) transformation

Page 12: Intensity Transformations

Contrast stretchingContrast stretching is a process that expands the range of intensity levels in a image so that it spans the full intensity range of the recording medium or display device.Contrast-stretching transformations increase the contrast between the darks and the lights

Page 13: Intensity Transformations

Thresholding function

Page 14: Intensity Transformations

Intensity-level slicingHighlighting a specific range of gray levels in an image

Page 15: Intensity Transformations

Histogram processing

The histogram of a digital image with gray levels in the range [0, L-1] is a

discretefunction h(rk)=nk , where rk is the kth

gray level and nk is the number of pixels in

the image having gray level rk. It is common practice to normalize a histogram by dividing each of its values

by the total number of pixels in the image, denoted by the product MN.

Thus, a normalized histogram is given by h(rk)=nk/MN

The sum of all components of anormalized histogram is equal to 1.

Page 16: Intensity Transformations

Histogram Equalization

Histogram equalization can be used to improve the visual appearance of an image.

Histogram equalization automatically determines a transformation function that produce and output image that has a near uniform histogram

Page 17: Intensity Transformations
Page 18: Intensity Transformations

Histogram EqualizationLet rk, k[0..L-1] be intensity levels and let

p(rk) be its normalized histogram function.The intensity transformation function for

histogram equalization is

k

jj

k

jjrkk

LknMN

L

rpLrTs

0

0

1,...,2,1,0,1

)()1()(

Page 19: Intensity Transformations

Histogram Equalization - Example

Let f be an image with size 64x64 pixels and L=8 and let f has the intensity distribution as shown in the table

rknkp r(rk

)=nk/MN

07900.19

210230.25

18500.21

36560.16

43290.08

52450.06

61220.03

7810.02

.00.7,86.6,65.6,23.6,67.5,55.4

08.3))()((7)(7)(

33.1)(7)(7)(

765432

10

1

011

0

0

000

ssssss

rprprprTs

rprprTs

rrj

jr

rj

jr

round the values to the nearest integer

Page 20: Intensity Transformations

Local histogram Processing

Define a neighborhood and move its center from pixel to pixel. At each location, the histogram of the points in the neighborhood is computed and histogram equalization transformation is obtained.

Page 21: Intensity Transformations

Using Histogram Statistics for Image Enhancement

The intensity variance:

Denote: ri – intencity value in the range [0, L-1],p(i) - histogram component corresponding to value ri .

Page 22: Intensity Transformations

Using Histogram Statistics for Image EnhancementLet (x, y) be the coordinates of a pixel in an image, and let Sxy

denote a

neighborhood (subimage) of specified size, centered at (x, y).

The mean value of the pixels in this neighborhood is given by

where is the histogram of the pixels in region Sxy.

The variance of the pixels in the neighborhood is given by

)(1

0i

L

iSiS rprmxyxy

xySp

)()(1

0

22i

L

iSSiS rpmrxyxyxy

Page 23: Intensity Transformations

Using Histogram Statistics for Image Enhancement

Tungsten filament

Page 24: Intensity Transformations

Using Histogram Statistics for Image Enhancement

Page 25: Intensity Transformations

Using Histogram Statistics for Image Enhancement