chapter 3- gonzalez
DESCRIPTION
Intensity Transformationsand Spatial Filtering using matlab softwareTRANSCRIPT
![Page 1: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/1.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
( , ) [ ( , )]g x y T f x y• 3.1 Background
![Page 2: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/2.jpg)
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])
![Page 3: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/3.jpg)
Digital Image Processing Using MATLAB®Some Intensity Transformation Functions
![Page 4: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/4.jpg)
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).
![Page 5: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/5.jpg)
Digital Image Processing Using MATLAB®Power –Law (Gamma) transformation
![Page 6: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/6.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
![Page 7: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/7.jpg)
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);
![Page 8: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/8.jpg)
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
![Page 9: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/9.jpg)
Digital Image Processing Using MATLAB®
Thresholding function
![Page 10: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/10.jpg)
Digital Image Processing Using MATLAB®
Intensity-level slicingHighlighting a specific range of gray levels in an
image
![Page 11: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/11.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
![Page 12: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/12.jpg)
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.
![Page 13: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/13.jpg)
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
![Page 14: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/14.jpg)
Digital Image Processing Using MATLAB®
![Page 15: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/15.jpg)
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()(
![Page 16: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/16.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
g=histeq (f, nlev)
![Page 17: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/17.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
![Page 18: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/18.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
![Page 19: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/19.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
![Page 20: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/20.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
![Page 21: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/21.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
g=imfilter (f, w, filtering_mode, boundary_opts, size_opts)
![Page 22: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/22.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
![Page 23: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/23.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformationsand Spatial Filtering
w=fspecial (type , [params])
![Page 24: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/24.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering
![Page 25: Chapter 3- Gonzalez](https://reader036.vdocuments.net/reader036/viewer/2022081512/5695cfe21a28ab9b028ff405/html5/thumbnails/25.jpg)
Digital Image Processing Using MATLAB®
Chapter 3Intensity Transformations
and Spatial Filtering