chapter 3- gonzalez

Post on 10-Apr-2016

55 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Intensity Transformationsand Spatial Filtering using matlab software

TRANSCRIPT

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

( , ) [ ( , )]g x y T f x y• 3.1 Background

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering• 3.2 Intensity transformation functions

– Simplest: voxel-wise operator (1x1 mask)

( , ) [ ( , )] ( )g x y T f x y s T r

g=imadjust(f,[low_in, high_in], [low_out, high_out, gamma])

Digital Image Processing Using MATLAB®Some Intensity Transformation Functions

Digital Image Processing Using MATLAB®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).

Digital Image Processing Using MATLAB®Power –Law (Gamma) transformation

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering• 3.2 Intensity transformation functions (cont)

– Logarithmic transformation of intensities– Contrast stretching 1( )

1Es T r

mr

g = 1 ./ (1 + (m ./ (double(f) + eps )) .^ E);

Digital Image Processing Using MATLAB®

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

Digital Image Processing Using MATLAB®

Thresholding function

Digital Image Processing Using MATLAB®

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

image

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

Digital Image Processing Using MATLAB®

Histogram processingThe 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.

Digital Image Processing Using MATLAB®

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

Digital Image Processing Using MATLAB®

Digital Image Processing Using MATLAB®

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

LknMNL

rpLrTs

0

0

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

)()1()(

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

g=histeq (f, nlev)

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

g=imfilter (f, w, filtering_mode, boundary_opts, size_opts)

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformationsand Spatial Filtering

w=fspecial (type , [params])

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

Digital Image Processing Using MATLAB®

Chapter 3Intensity Transformations

and Spatial Filtering

top related