Digital image processing using matlab
-
Upload
amr-rashed -
Category
Engineering
-
view
902 -
download
16
Transcript of Digital image processing using matlab
![Page 1: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/1.jpg)
Digital Image Processing using Matlab
Introduction
Eng.Amr Ez El_Din Rashed
Assistant Lecturer
Taif university.
Tel:0554404723 e-mail:[email protected]
![Page 2: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/2.jpg)
2
of
38 Introduction
“One picture is worth more than ten thousand words”
Anonymous
![Page 3: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/3.jpg)
3
of
38 References
“Digital Image Processing using Matlab”, Rafael
C. Gonzalez & Richard E. Woods,
Addison-Wesley, 2004
or
“Computer Vision and image processing
processing A practical approach using cvip tools
Scott E umbaugh
Prentice hall 1998
![Page 4: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/4.jpg)
4
of
38
An Introduction to Digital Image Processing with
Matlab,2004
School of Computer Science And Mathematics
Victoria University of Technology
Biosignal and Biomedical Image Processing
Matlab-Based Application,
JOHN L. SEMMLOW
![Page 5: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/5.jpg)
5
of
38 Course
• This course will cover:
Introduction to Image Processing And Computer
Vision.
Image Fundamentals.
Intensity Transformation and Spatial Filtering
Frequency Domain Processing
Image Restoration
Wavelets
Morphological Image Processing
Image Segmentation
![Page 6: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/6.jpg)
6
of
38 Contents
This lecture will cover:
– What is a digital image?
– What is digital image processing?
– History of digital image processing
– State of the art examples of digital image
processing
– Key stages in digital image processing
![Page 7: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/7.jpg)
7
of
38 Images
an image is a single picture which represents
something. It may be a picture of a person, of people
or animals, or of an outdoor scene, or a
microphotograph of an electronic component, or the
result of medical imaging.
Even if the picture is not immediately recognizable, it
will not be just a random blur.
![Page 8: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/8.jpg)
8
of
38 Computer imaging
• It’s defined as the acquisition and processing
of visual information by computer.
• The ultimate receiver of information is:
– Computer
– Human visual system
• So we have two categories:-
– Computer vision
– Image processing
![Page 9: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/9.jpg)
9
of
38
Computer vision and image
processing
• In computer vision:
–The processed output images
are for use by computer.
• In Image processing:
–The output images are for
human consumption
![Page 10: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/10.jpg)
10
of
38 Computer vision
• One of the computer vision fields is image
analysis.
• It involves the examination of image data
to facilitate solving a vision problem.
• Image analysis has 2 topics:
– Feature extraction: acquiring higher level
image information
– Pattern classification taking these higher level
of information and identifying objects within
the image
![Page 11: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/11.jpg)
11
of
38 What is a Digital Image?
A digital image is a representation of a two-
dimensional image as a finite set of digital
values, called picture elements or pixels
![Page 12: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/12.jpg)
12
of
38 What is a Digital Image? (cont…)
Pixel values typically represent gray levels,
colours, heights, opacities etc
Remember digitization implies that a digital
image is an approximation of a real scene
1 pixel
![Page 13: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/13.jpg)
13
of
38 What is a Digital Image? (cont…)
Common image formats include:
– 1 sample per point (B&W or Grayscale)
– 3 samples per point (Red, Green, and Blue)
For most of this course we will focus on grey-scale
images
![Page 14: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/14.jpg)
14
of
38 What is Digital Image Processing?
Digital image processing involves changing
the nature of an image in order to either
– Improve it’s pictorial information for human
interpretation(image ehancement)
– Processing of image data for storage,
transmission and representation for
autonomous machine perception(ادراك)
Some argument about where image
processing ends and fields such as image
analysis and computer vision start
![Page 15: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/15.jpg)
15
of
38 DIP(cont…)
• It is necessary to realize that these two aspects
represent two separate but equally important
aspects of image processing. A procedure
which satisfies condition.
• (1)a procedure which makes an image look
better may be the very worst procedure for
satisfying condition
• (2). Humans like their images to be sharp, clear
and detailed; machines prefer their images to
be simple and uncluttered.
![Page 16: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/16.jpg)
16
of
38 Example of (1)
Enhancing the edges of an image to make it appear sharper
![Page 17: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/17.jpg)
17
of
38 Example of (1)
![Page 18: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/18.jpg)
18
of
38 Example of (1)
![Page 19: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/19.jpg)
19
of
38 Example of (2)
![Page 20: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/20.jpg)
20
of
38 Example of (2)
![Page 21: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/21.jpg)
21
of
38 What is DIP? (cont…)
The continuum ( متسلسل -متصل )from image
processing to computer vision can be
broken up into low-, mid- and high-level
processes Low Level Process
Input: Image
Output: Image
Examples: Noise
removal, image
sharpening
Mid Level Process
Input: Image
Output: Attributes
Examples: Object
recognition,
segmentation
High Level Process
Input: Attributes
Output: Understanding
Examples: Scene
understanding,
autonomous navigation
In this course we will
stop here
![Page 22: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/22.jpg)
22
of
38 History of Digital Image Processing
Early 1920s: One of the first applications of
digital imaging was in the news-
paper industry
– The Bartlane cable picture
transmission service (5 tones)
– Images were transferred by submarine cable
between London and New York
– Pictures were coded for cable transfer and
reconstructed at the receiving end on a
telegraph printer
Early digital image
![Page 23: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/23.jpg)
23
of
38 History of DIP (cont…)
Mid to late 1920s: Improvements to the
Bartlane system resulted in higher quality
images
– New reproduction
processes based
on photographic
techniques
– Increased number
of tones in
reproduced images
Improved
digital image Early 15 tone digital
image
![Page 24: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/24.jpg)
24
of
38 History of DIP (cont…)
1960s: Improvements in computing
technology and the onset of the space race
led to a surge of work in digital image
processing
– 1964: Computers used to
improve the quality of
images of the moon taken
by the Ranger 7 probe
– Such techniques were used
in other space missions
including the Apollo landings
A picture of the moon taken
by the Ranger 7 probe
minutes before landing
![Page 25: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/25.jpg)
25
of
38 History of DIP (cont…)
1970s: Digital image processing begins to
be used in medical applications
– 1979: Sir Godfrey N.
Hounsfield & Prof. Allan M.
Cormack share the Nobel
Prize in medicine for the
invention of tomography,
the technology behind
Computerised Axial
Tomography (CAT) scans Typical head slice CAT
image
![Page 26: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/26.jpg)
26
of
38 History of DIP (cont…)
1980s - Today: The use of digital image
processing techniques has exploded and
they are now used for all kinds of tasks in all
kinds of areas
– Image enhancement/restoration
– Artistic effects
– Medical visualisation
– Industrial inspection
– Law enforcement
– Human computer interfaces
![Page 27: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/27.jpg)
27
of
38 Examples: Image Enhancement
One of the most common uses of DIP
techniques: improve quality, remove noise
etc
![Page 28: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/28.jpg)
28
of
38 Examples: The Hubble Telescope
Launched in 1990 the Hubble
telescope can take images of
very distant objects
However, an incorrect mirror
made many of Hubble’s
images useless
Image processing
techniques were
used to fix this
![Page 29: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/29.jpg)
29
of
38 Examples: Artistic Effects
Artistic effects are
used to make
images more
visually appealing,
to add special
effects and to make
composite images
![Page 30: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/30.jpg)
30
of
38 Examples: Medicine
Take slice from MRI scan of canine heart,
and find boundaries between types of tissue
– Image with gray levels representing tissue
density
– Use a suitable filter to highlight edges
Original MRI Image of a Dog Heart Edge Detection Image
![Page 31: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/31.jpg)
31
of
38 Examples: GIS
Geographic Information Systems
– Digital image processing techniques are used
extensively to manipulate satellite imagery
– Terrainتضاريس classification
– Meteorology األرصاد الجوية
![Page 32: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/32.jpg)
32
of
38 Examples: GIS (cont…)
Night-Time Lights of the World data set
– Global inventory of
human settlement
– Not hard to imagine
the kind of analysis
that might be done
using this data
![Page 33: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/33.jpg)
33
of
38 Examples: Industrial Inspection
Human operators are
expensive, slow and
unreliable
Make machines do the
job instead
Industrial vision systems
are used in all kinds of
industries
Can we trust them?
![Page 34: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/34.jpg)
34
of
38 Examples: PCB Inspection
Printed Circuit Board (PCB) inspection
– Machine inspection is used to determine that
all components are present and that all solder
joints are acceptable
– Both conventional imaging and x-ray imaging
are used
![Page 35: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/35.jpg)
35
of
38 Examples: Law Enforcement
Image processing
techniques are used
extensively by law
enforcers
– Number plate
recognition for speed
cameras/automated
toll systems
– Fingerprint recognition
– Enhancement of
CCTV images
![Page 36: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/36.jpg)
36
of
38 Examples: HCI
Try to make human computer
interfaces more natural
– Face recognition
– Gesture ايماءةrecognition
Does anyone remember the
user interface from “Minority
Report”?
These tasks can be
extremely difficult
![Page 37: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/37.jpg)
37
of
38 Key Stages in Digital Image Processing
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 38: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/38.jpg)
38
of
38
Key Stages in Digital Image Processing:
Image Aquisition
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 39: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/39.jpg)
39
of
38
Image Enhancement:
taking an image and improving it visually
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 40: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/40.jpg)
40
of
38
Image Restoration : taking an image with some known or estimated degradation and restoring
it to its original appearing
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 41: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/41.jpg)
41
of
38
Key Stages in Digital Image Processing:
Morphological Processing
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 42: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/42.jpg)
42
of
38
Key Stages in Digital Image Processing:
Segmentation
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 43: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/43.jpg)
43
of
38
Key Stages in Digital Image Processing:
Object Recognition
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 44: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/44.jpg)
44
of
38
Key Stages in Digital Image Processing:
Representation & Description
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 45: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/45.jpg)
45
of
38
Image compression: reducing the massive amount of data needed to represent an image
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 46: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/46.jpg)
46
of
38
Key Stages in Digital Image Processing:
Colour Image Processing
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
![Page 47: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/47.jpg)
47
of
38 Sampling
• Sampling refers to the process of digitizing a continuous function. For
example, suppose we take the function
• and sample it at ten evenly spaced values of x only. The resulting sample
points are shown in figure 1.6. This shows an example of under sampling,
where the number of points is not sufficient to reconstruct the function.
Suppose we sample the function at 100 points, as shown in figure 1.7. We
can clearly now reconstruct the function; all its properties can be determined
from this sampling. In order to ensure that we have enough sample points,
we require that the sampling period is not greater than one-half the finest
detail in our function. This is known as the Nyquist criterion, and can be
formulated more precisely in terms of “frequencies”. The Nyquist criterion
can be stated as the sampling theorem, which says, in effect, that a
continuous function can be reconstructed from its samples provided
that the sampling frequency is at least twice the maximum frequency in
the function. A formal account of this theorem is provided by
Castleman
![Page 48: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/48.jpg)
48
of
38 Image Acquisition and Sampling
![Page 49: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/49.jpg)
49
of
38 Effect of Sampling
Sampling an image requires that we consider the Nyquist criterion, when we consider an
image as a continuous function of two variables, and we wish to sample it to produce a
digital image. An example is shown ,where an image is shown, and then with an under
sampled version. The jagged edges in the under sampled image are examples of
aliasing. The sampling rate will of course affect the final resolution of the image. In order
to obtain a sampled (digital) image, we may start with a continuous representation of a
scene. To view the scene, we record the energy reflected from it; we may use visible
light, or some other energy source.
![Page 50: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/50.jpg)
50
of
38 Data Classes
![Page 51: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/51.jpg)
51
of
38 Types of digital images
The toolbox supports four types of images:
1-intensity images.
2-binary images.
3-Indexed images.
4-RGB images.
![Page 52: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/52.jpg)
52
of
38 Intensity images(grayscale images)
• An intensity image is a data matrix whose values have
been scaled to represent intensities.
• Class uint8 :range [0,255]
• Class uint16:range[0,65535]
• Double: floating point[0,1]
![Page 53: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/53.jpg)
53
of
38 Binary image
Binary. Each pixel is just black or white. Since there are only two possible
values for each pixel,
we only need one bit per pixel. Such images can therefore be very efficient in
terms of storage. Images for which a binary representation may be suitable
include text (printed or handwriting), fingerprints, or architectural plans.
![Page 54: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/54.jpg)
54
of
38 True color, or RGB image
Here each pixel has a particular color; that color being described by the amount of red,
green and blue in it. If each of these components has a range 0-255 this gives a total
of different possible colors in the image 255^3=16,777,216. This is enough colors for
any image. Since the total number of bits required for each pixel is 24, such images
are also called 24 bit color images. Such an image may be considered as consisting of
a “stack” of three matrices; representing the red, green and blue values for each pixel.
This means that for every pixel there correspond three values.
![Page 55: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/55.jpg)
55
of
38 Indexed image
Most color images only have a small subset of the more than sixteen million
possible colors. For convenience of storage and file handling, the image has
an associated color map, or color palette, which is simply a list of all the
colors used in that image. Each pixel has a value which does not give its
color (as for an RGB image), but an index to the color in the map.
![Page 56: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/56.jpg)
56
of
38 Converting between Image Classes andTypes
![Page 57: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/57.jpg)
57
of
38 Cont.
![Page 58: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/58.jpg)
58
of
38 Cont.
![Page 59: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/59.jpg)
59
of
38 Reading Images
![Page 60: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/60.jpg)
60
of
38 Displaying Images
![Page 61: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/61.jpg)
61
of
38 Cont.
![Page 62: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/62.jpg)
62
of
38 Cont.
![Page 63: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/63.jpg)
63
of
38 Writing Images
![Page 64: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/64.jpg)
64
of
38 Image Information
![Page 65: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/65.jpg)
65
of
38 Image File Sizes
• Image files tend to be large. We shall investigate the amount of information
used in different image type of varying sizes. For example, suppose we
consider a binary image. The number of bits used in this image (assuming
no compression, and neglecting, for the sake of discussion, any Header
information) is
512×512×1=262,144
=32768 bytes
• If we now turn our attention to color images, each pixel is associated with 3
bytes of color Information. A 512×512×3 image thus requires
512×512×3=786,432Byte
• =786.43Kb
• =0.786 Mb.
![Page 66: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/66.jpg)
66
of
38 Import pixel information
![Page 67: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/67.jpg)
67
of
38 Indexed and RGB images
![Page 68: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/68.jpg)
68
of
38 ind2gray
![Page 69: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/69.jpg)
69
of
38 gray2ind
![Page 70: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/70.jpg)
70
of
38 Image perception
• Much of image processing is concerned with making an image
appear better to human beings. We should therefore be aware
of the limitations of the human visual system. Image perception
consists of two basic steps:
• 1. Observed intensities vary as to the background. A single
block of grey will appear darker if placed on a white background
than if it were placed on a black background.
![Page 71: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/71.jpg)
71
of
38 Cont.
• 2.We may observe non-existent intensities as bars in
continuously varying grey levels. This image varies
continuously from light to dark as we travel from left to
right. However, it is impossible for our eyes not to see a
few horizontal edges in this image.
![Page 72: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/72.jpg)
72
of
38 Cont.
3. Our visual system tends to undershoot or overshoot
around the boundary of regions of different intensities.
For example, suppose we had a light grey blob on a
dark grey background. As our eye travels from the
dark background to the light region, the boundary of
the region appears lighter than the rest of it.
Conversely, going in the other direction, the boundary
of the background appears darker than the rest of it.
![Page 73: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/73.jpg)
73
of
38 image
50 100 150 200 250
50
100
150
200
250
![Page 74: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/74.jpg)
74
of
38 Cont.
• will certainly display the cameraman, but possibly in an odd
mixture of colors, and with some stretching. The strange
colors come from the fact that the image command uses the
current color map to assign colours to the matrix elements.
The default color map is called jet, and consists of 64 very
bright colours, which is inappropriate for the display of a
grayscale image.
• To display the image properly, we need to add several extra
commands to the image line.
• 1.truesize.
• 2.axis off
• 3. colormap(gray(247)), which adjusts the image colour map
to use shades of grey only. We can find the number of grey
levels used by the cameraman image with
![Page 75: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/75.jpg)
75
of
38 Cont.
![Page 76: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/76.jpg)
76
of
38
image(x),truesize,axis off,
colormap(gray(512))
will produce a dark image. This happens because only
the first 247 elements of the color map will be used by the
image for display, and these will all be in the first half of
the color map; thus all dark greys.
![Page 77: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/77.jpg)
77
of
38
image(x),truesize,axis off,
colormap(gray(128))
• will produce a very light image, because any
pixel with grey level higher than 128 will simply
pick that highest grey value (which is white) from
the color map.
![Page 78: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/78.jpg)
78
of
38 Indexed color images
![Page 79: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/79.jpg)
79
of
38 RGB images
![Page 80: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/80.jpg)
80
of
38 imshow
![Page 81: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/81.jpg)
81
of
38 Cont.
To display the matrix cd, we need to scale it to the range
[0,1]. This is easily done simply by dividing all values by 255:
![Page 82: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/82.jpg)
82
of
38 im2double
We can convert the original image to double more properly
using the function im2double. This applies correct scaling so
that the output values are between 0 and 1.
![Page 83: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/83.jpg)
83
of
38 Bit planes
• Grayscale images can be transformed into a sequence of
binary images by breaking them up into their bit-planes. If we
consider the grey value of each pixel of an 8-bit image as an 8-
bit binary word,
• then the 0th bit plane consists of the last bit of each grey
value.Since this 0th bit plane has the least effect in terms of the
magnitude of the value, it is called the least significant bit, and
the plane consisting of those bits the least significant bit plane.
• Similarly the 7th bit plane consists of the first bit in each value.
This bit has the greatest effect in terms of the magnitude of the
value, so it is called the most significant bit, and the plane
consisting of those bits the most significant bit plane.
![Page 84: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/84.jpg)
84
of
38 Cont.
![Page 85: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/85.jpg)
85
of
38 Spatial Resolution
• Spatial resolution is the density of pixels over
the image: the greater the spatial resolution, the
more pixels are used to display the image. We
can experiment with spatial resolution with
Matlab's
![Page 86: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/86.jpg)
86
of
38 Cont.
![Page 87: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/87.jpg)
87
of
38 Another solution
![Page 88: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/88.jpg)
88
of
38 imdemos
![Page 89: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/89.jpg)
89
of
38 Point Processing
• Any image processing operation transforms the grey
values of the pixels. However, image processing
operations may be divided into three classes based on
the information required to perform the transformation.
From the most complex to the simplest, they are:
• 1.Transforms.
• 2. Neighborhood processing.
• 3.Point operations : They are especially useful in
image pre-processing, where an image is required to
be modified before the main job is attempted.
![Page 90: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/90.jpg)
90
of
38 Arithmetic operations
![Page 91: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/91.jpg)
91
of
38 Cont.
imadd output
![Page 92: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/92.jpg)
92
of
38 Cont.
![Page 93: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/93.jpg)
93
of
38 Cont.
y=x/2 y=x*2 y=x/2+128
![Page 94: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/94.jpg)
94
of
38 Complements
The complement of a grayscale image is its
photographic negative. If an image matrix m is of type
double and so its grey values are in the range [0,1].
If the image is binary, we can use
• If the image is of type uint8, the best approach is the
imcomplement function he complement function y=255-x
![Page 95: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/95.jpg)
95
of
38 Cont.
![Page 96: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/96.jpg)
96
of
38 Part Complementation(Solarization)
![Page 97: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/97.jpg)
97
of
38 Cont.
![Page 98: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/98.jpg)
98
of
38 Histograms
Given a grayscale image, its histogram consists of
the histogram of its grey levels; that is, a graph
indicating the number of times each grey level
occurs in the image.
1-In a dark image, the grey levels (and hence the
histogram) would be clustered at the lower end.
2-In a uniformly bright image, the grey levels would
be clustered at the upper end.
3-In a well contrasted image, the grey levels would
be well spread out over much of the range.
![Page 99: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/99.jpg)
99
of
38 Cont.
0
200
400
600
800
1000
1200
1400
1600
0 50 100 150 200 250
![Page 100: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/100.jpg)
100
of
38
Histogram Stretching (Contrast stretching)
• Given a poorly contrasted image, we would like
to enhance its contrast, by spreading out its
histogram. There are two ways of doing this.
1.Histogram stretching (contrast stretching).
2.Histogram equalization
2Histogram Stretching (Contrast stretching)
Histogram Stretching (Contrast stretching)
![Page 101: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/101.jpg)
101
of
38 Cont.
Suppose we have an image with the histogram shown , associated
with a table of the numbers ni of gray values
![Page 102: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/102.jpg)
102
of
38 Cont.
We can stretch the grey levels in the centre of the range out by
applying the piecewise linear function shown at the right in figure.
This function has the effect of stretching the grey levels 5-9 to
gray levels 2-14 according to the equation
Where I is the original gray level and j its result after the
transformation .This yields
![Page 103: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/103.jpg)
103
of
38 Cont.
which indicates an image with greater contrast than the original.
![Page 104: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/104.jpg)
104
of
38 Use of imadjust
![Page 105: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/105.jpg)
105
of
38 Cont.
![Page 106: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/106.jpg)
106
of
38 Cont.
![Page 107: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/107.jpg)
107
of
38 Cont.
![Page 108: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/108.jpg)
108
of
38 Cont.
![Page 109: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/109.jpg)
109
of
38 Cont.
50 100 150 200 250
50
100
150
200
250
![Page 110: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/110.jpg)
110
of
38
A piecewise linear stretching function
The heart of our function will be the lines
![Page 111: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/111.jpg)
111
of
38 2.Histogram equalization
• The trouble with any of the above methods of
histogram stretching is that they require user input.
Sometimes a better approach is provided by
histogram equalization, which is an entirely automatic
procedure. The idea is to change the histogram to one
which is uniform; that is that every bar on the
histogram is of the same height, or in other words that
each grey level in the image occurs with the same
frequency. In practice this is generally not possible,
although as we shall see the result of histogram
equalization provides very good results.
![Page 112: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/112.jpg)
112
of
38 Cont.
Suppose a 4-bit gray scale image has the histogram shown in figure associated
with a table of the numbers
![Page 113: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/113.jpg)
113
of
38 Cont.
![Page 114: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/114.jpg)
114
of
38 Cont.
We now have the following transformation of grey values, obtained by reading o
the first and last columns in the above table:
This is far more spread out than the original histogram, and so the resulting image
should exhibit greater contrast.
![Page 115: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/115.jpg)
115
of
38 Cont.
0
500
1000
1500
2000
2500
3000
3500
0 50 100 150 200 250
0
200
400
600
800
1000
1200
1400
1600
0 50 100 150 200 250
![Page 116: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/116.jpg)
116
of
38 Cont.
We give one more example, that of a very dark image. We can obtain a dark image by
taking an image and using imdivide.
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
0 50 100 150 200 250
![Page 117: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/117.jpg)
117
of
38 Cont.
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
0 50 100 150 200 250
![Page 118: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/118.jpg)
118
of
38 Lookup tables
![Page 119: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/119.jpg)
119
of
38 Cont.
![Page 120: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/120.jpg)
120
of
38 Example
![Page 121: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/121.jpg)
121
of
38 Neighborhood Processing
![Page 122: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/122.jpg)
122
of
38 Spatial domain filtering
![Page 123: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/123.jpg)
123
of
38 Linear filter
A diagram illustrating the process for performing spatial filtering is
given in figure.
Spatial filtering thus requires three steps:
1. position the mask over the current pixel.
2. form all products of filter elements with the corresponding
elements of the neighborhood.
3. add up all the products. This must be repeated for every pixel in
the image.
![Page 124: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/124.jpg)
124
of
38 Convolution
![Page 125: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/125.jpg)
125
of
38 Mean filter
![Page 126: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/126.jpg)
126
of
38 Cont.
![Page 127: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/127.jpg)
127
of
38 Cont.
If we continue in this manner, the following output is obtained:
![Page 128: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/128.jpg)
128
of
38 Cont.
![Page 129: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/129.jpg)
129
of
38 Cont.
mean filter output
50 100 150 200 250
50
100
150
200
250
original image
![Page 130: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/130.jpg)
130
of
38 Another solution
![Page 131: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/131.jpg)
131
of
38 Another solution
![Page 132: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/132.jpg)
132
of
38 Edge of the image
![Page 133: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/133.jpg)
133
of
38 Filtering in Matlab
![Page 134: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/134.jpg)
134
of
38 Cont.
• filter2(filter,image,'valid') applies the mask only to
inside pixels. The result will always be smaller than
the original:
![Page 135: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/135.jpg)
135
of
38 Cont.
• The result of 'same' above may also be obtained by
padding with zeros and using 'valid':
![Page 136: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/136.jpg)
136
of
38 Cont.
filter2(filter,image,'full') returns a result larger than the original;
it does this by padding with zero, and applying the filter at all
places on and around the image where the mask intersects
the image matrix.
![Page 137: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/137.jpg)
137
of
38 Cont.
• The shape parameter, being optional, can be omitted; in which
case the default value is 'same'. There is no single best
approach; the method must be dictated by the problem at hand;
by the filter being used, and by the result required.
We can create our filters by hand, or by using the fspecial
function; this has many options which makes for easy creation
of many different filters. We shall use the average option, which
produces averaging filters of given size; thus
![Page 138: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/138.jpg)
138
of
38 Cont.
![Page 139: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/139.jpg)
139
of
38 Note.
![Page 140: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/140.jpg)
140
of
38 Cont.
![Page 141: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/141.jpg)
141
of
38 Notes.
• The resulting image after these filters may appear to
be much worse than the original. However, applying
a blurring filter to reduce detail in an image may the
perfect operation for autonomous machine
recognition, or if we are only concentrating on the
gross aspects of the image: numbers of objects;
amount of dark and light areas. In such cases, too
much detail may obscure the outcome.
![Page 142: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/142.jpg)
142
of
38 Separable filters
![Page 143: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/143.jpg)
143
of
38 Frequencies; low and high pass filters
![Page 144: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/144.jpg)
144
of
38 Cont.
![Page 145: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/145.jpg)
145
of
38 Cont.
![Page 146: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/146.jpg)
146
of
38 Cont.
laplacian log
In each case, the sum of all the filter elements is zero.
High pass filtering
![Page 147: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/147.jpg)
147
of
38 Cont.
![Page 148: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/148.jpg)
148
of
38 Cont.
![Page 149: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/149.jpg)
149
of
38 Cont.
![Page 150: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/150.jpg)
150
of
38 Cont.
![Page 151: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/151.jpg)
151
of
38 imfilter
![Page 152: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/152.jpg)
152
of
38 Edge sharpening
![Page 153: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/153.jpg)
153
of
38 Cont.
![Page 154: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/154.jpg)
154
of
38 Cont.
![Page 155: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/155.jpg)
155
of
38 Cont.
![Page 156: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/156.jpg)
156
of
38 Cont.
![Page 157: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/157.jpg)
157
of
38 Cont.
![Page 158: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/158.jpg)
158
of
38 High boost filtering
![Page 159: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/159.jpg)
159
of
38 Non-linear filters
![Page 160: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/160.jpg)
160
of
38 Cont.
![Page 161: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/161.jpg)
161
of
38 colfilt
![Page 162: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/162.jpg)
162
of
38 Rank order filter
![Page 163: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/163.jpg)
163
of
38
geometric mean filter, alpha-trimmed
mean filter
![Page 164: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/164.jpg)
164
of
38 The Fourier Transform
![Page 165: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/165.jpg)
165
of
38 Background
![Page 166: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/166.jpg)
166
of
38 Cont.
![Page 167: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/167.jpg)
167
of
38 1D-DFT
![Page 168: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/168.jpg)
168
of
38 FFT
![Page 169: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/169.jpg)
169
of
38 2D –DFT,Properties
![Page 170: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/170.jpg)
170
of
38 Cont.
![Page 171: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/171.jpg)
171
of
38 Convolution
![Page 172: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/172.jpg)
172
of
38 DC Coefficient
![Page 173: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/173.jpg)
173
of
38 shifting
![Page 174: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/174.jpg)
174
of
38
![Page 175: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/175.jpg)
175
of
38 trouble
![Page 176: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/176.jpg)
176
of
38 Fourier transforms in Matlab
![Page 177: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/177.jpg)
177
of
38 Example
![Page 178: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/178.jpg)
178
of
38 Example 2.
Now we'll take a matrix consisting of a single corrugation:
![Page 179: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/179.jpg)
179
of
38 Example 3
• We will take here a single step edge:
![Page 180: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/180.jpg)
180
of
38 Fourier transforms of images(spectrum)
![Page 181: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/181.jpg)
181
of
38 FFTshow function
![Page 182: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/182.jpg)
182
of
38 Example 1
![Page 183: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/183.jpg)
183
of
38 Example 2(box)
![Page 184: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/184.jpg)
184
of
38 Example 3(box rotated 45)
![Page 185: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/185.jpg)
185
of
38 Example 4.(circle)
![Page 186: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/186.jpg)
186
of
38 Notes
• Note the ringing in the Fourier transform. This is an
artifact associated with the sharp cut off of the circle.
As we have seen from both the edge and box images
in the previous examples, an edge appears in the
transform as a line of values at right angles to the
edge. We may consider the values on the line as
being the coefficients of the appropriate corrugation
functions which sum to the edge. With the circle, we
have lines of values radiating out from the circle;
these values appear as circles in the transform.
![Page 187: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/187.jpg)
187
of
38 Example 5
![Page 188: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/188.jpg)
188
of
38 Filtering in the frequency domain
• Ideal filtering(low pass filter)
![Page 189: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/189.jpg)
189
of
38 Cont.
![Page 190: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/190.jpg)
190
of
38 Cont.
![Page 191: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/191.jpg)
191
of
38 Notes
• Note that even though cfli is supposedly a matrix of real
numbers, we are still using fftshow to display it. This is because
the fft2 and fft2 functions, being numeric, will not produce
mathematically perfect results, but rather very close numeric
approximations . So using fftshow with the 'abs' option rounds
out any errors obtained during the transform and its inverse.
Note the ringing about the edges in this image. This is a direct
result of the sharp cutoff of the circle. The ringing as shown in
figure is transferred to the image.
• We would expect that the smaller the circle, the more blurred
the image, and the larger the circle; the less blurred.
![Page 192: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/192.jpg)
192
of
38 Cont.
![Page 193: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/193.jpg)
193
of
38 High pass filtering
![Page 194: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/194.jpg)
194
of
38 Example
![Page 195: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/195.jpg)
195
of
38 Image Restoration
• Image restoration concerns the removal or reduction of
degradations which have occurred during the acquisition
of the image. Such degradations may include noise,
which are errors in the pixel values, or optical effects
such as out of focus blurring, or blurring due to camera
motion. We shall see that some restoration techniques
can be performed very successfully using neighborhood
operations, while others require the use of frequency
domain processes. Image restoration remains one of the
most important areas of image processing, but in this
chapter the emphasis will be on the techniques for
dealing with restoration, rather than with the
degradations themselves, or the properties of electronic
equipment which give rise to image degradation.
![Page 196: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/196.jpg)
196
of
38 Noise
• We may define noise to be any degradation in the image signal,
caused by external disturbance. If an image is being sent
electronically from one place to another, via satellite or wireless
transmission, or through networked cable, we may expect
errors to occur in the image signal. These errors will appear on
the image output in different ways depending on the type of
disturbance in the signal.
• Usually we know what type of errors to expect, and hence the
type of noise on the image; hence we can choose the most
appropriate method for reducing the effects. Cleaning an image
corrupted by noise is thus an important area of image
restoration.
![Page 197: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/197.jpg)
197
of
38 Salt and pepper noise
• Also called impulse noise, shot noise, or
binary noise. This degradation can be
caused by sharp, sudden disturbances in
the image signal; its appearance is
randomly scattered white or black (or both)
pixels over the image.
![Page 198: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/198.jpg)
198
of
38 Cont.
![Page 199: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/199.jpg)
199
of
38 Gaussian noise
![Page 200: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/200.jpg)
200
of
38 Speckle noise
![Page 201: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/201.jpg)
201
of
38 Periodic noise
• If the image signal is subject to a periodic, rather than a random
disturbance, we might obtain an image corrupted by periodic
noise. The effect is of bars over the image. The function
imnoise does not have a periodic option, but it is quite easy to
create our own, by adding a periodic matrix(using a
trigonometric function).
• Salt and pepper noise, Gaussian noise and speckle noise can
all be cleaned by using spatial filtering techniques. Periodic
noise, however, requires the use of frequency domain filtering.
This is because whereas the other forms of noise can be
modelled as local degradations, periodic noise is a global
effect.
![Page 202: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/202.jpg)
202
of
38 Cleaning salt and pepper noise
![Page 203: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/203.jpg)
203
of
38 Cont.
![Page 204: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/204.jpg)
204
of
38 Removal of periodic noise
![Page 205: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/205.jpg)
205
of
38 Segmentation
![Page 206: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/206.jpg)
206
of
38 label2rgb
![Page 207: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/207.jpg)
207
of
38 bwconncomp
![Page 208: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/208.jpg)
208
of
38 Cont.
![Page 209: Digital image processing using matlab](https://reader034.fdocuments.in/reader034/viewer/2022052205/55a635711a28ab61488b48e9/html5/thumbnails/209.jpg)
209
of
38 labelmatrix