(Ebook) MATLAB Image Processing Toolbox™ User's Guide by The MathWorks, Inc. 2024 scribd download
(Ebook) MATLAB Image Processing Toolbox™ User's Guide by The MathWorks, Inc. 2024 scribd download
com
https://ebooknice.com/product/matlab-image-processing-
toolboxtm-user-s-guide-11236248
DOWLOAD EBOOK
https://ebooknice.com/product/matlab-signal-processing-toolboxtm-user-
s-guide-11236258
ebooknice.com
https://ebooknice.com/product/matlab-econometrics-toolboxtm-user-s-
guide-11236174
ebooknice.com
https://ebooknice.com/product/matlab-bioinformatics-toolboxtm-user-s-
guide-11236232
ebooknice.com
https://ebooknice.com/product/matlab-mapping-toolboxtm-user-s-
guide-11236250
ebooknice.com
(Ebook) MATLAB Optimization Toolbox™ User's Guide by The
MathWorks, Inc.
https://ebooknice.com/product/matlab-optimization-toolboxtm-user-s-
guide-11236252
ebooknice.com
https://ebooknice.com/product/deep-learning-toolbox-getting-started-
guide-matlab-43710832
ebooknice.com
https://ebooknice.com/product/matlab-computer-vision-toolboxtm-user-s-
guide-11236240
ebooknice.com
https://ebooknice.com/product/matlab-curve-fitting-toolboxtm-user-s-
guide-11236242
ebooknice.com
https://ebooknice.com/product/matlab-fuzzy-logic-toolboxtm-user-s-
guide-11236244
ebooknice.com
Image Processing Toolbox™
User's Guide
R2020a
How to Contact MathWorks
Phone: 508-647-7000
Getting Started
1
Image Processing Toolbox Product Description . . . . . . . . . . . . . . . . . . . . . 1-2
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Compilability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Introduction
2
Images in MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
v
Display Separated Color Channels of RGB Image . . . . . . . . . . . . . . . . . . . 2-17
vi Contents
Read Image Data from DICOM Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
View DICOM Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
vii
Explore Images with Image Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24
Explore Images Using the Overview Tool . . . . . . . . . . . . . . . . . . . . . . . . 4-24
Pan Images Displayed in Image Viewer App . . . . . . . . . . . . . . . . . . . . . . 4-25
Zoom Images in the Image Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26
Specify Image Magnification in Image Viewer . . . . . . . . . . . . . . . . . . . . . 4-26
Explore 3-D Labeled Volumetric Data with Volume Viewer App . . . . . . . 4-63
Load Labeled Volume and Intensity Volume into Volume Viewer . . . . . . . 4-63
View Labeled Volume in Volume Viewer . . . . . . . . . . . . . . . . . . . . . . . . . 4-65
Embed Labeled Volume with Intensity Volume . . . . . . . . . . . . . . . . . . . . 4-66
viii Contents
Add Color Bar to Displayed Grayscale Image . . . . . . . . . . . . . . . . . . . . . . 4-84
Geometric Transformations
6
Resize an Image with imresize Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
ix
Matrix Representation of Geometric Transformations . . . . . . . . . . . . . . . 6-17
2-D Affine Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17
2-D Projective Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
Create Composite 2-D Affine Transformations . . . . . . . . . . . . . . . . . . . . . 6-19
3-D Affine Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
Image Registration
7
Approaches to Registering Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Registration Estimator App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Intensity-Based Automatic Image Registration . . . . . . . . . . . . . . . . . . . . . 7-3
Control Point Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Automated Feature Detection and Matching . . . . . . . . . . . . . . . . . . . . . . . 7-5
x Contents
Nonrigid Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23
xi
Integral Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5
Filter Grayscale and Truecolor (RGB) Images using imfilter Function . . . 8-7
Transforms
9
Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Definition of Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
Applications of the Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
xii Contents
The Inverse Radon Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-32
Inverse Radon Transform Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-32
Reconstructing an Image from Parallel Projection Data . . . . . . . . . . . . . . 9-34
Morphological Operations
10
Types of Morphological Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Morphological Dilation and Erosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Operations Based on Dilation and Erosion . . . . . . . . . . . . . . . . . . . . . . . 10-4
xiii
Distance Transform of a Binary Image . . . . . . . . . . . . . . . . . . . . . . . . . . 10-50
xiv Contents
Create a Gray-Level Co-Occurrence Matrix . . . . . . . . . . . . . . . . . . . . . . . 11-68
xv
Anatomy of Imatest Extended eSFR Chart . . . . . . . . . . . . . . . . . . . . . . 11-139
Slanted Edge Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-139
Gray Patch Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-140
Color Patch Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-141
Registration Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-141
ROI-Based Processing
12
Create a Binary Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Create a Binary Mask from a Grayscale Image . . . . . . . . . . . . . . . . . . . . 12-2
Create Binary Mask Using an ROI Function . . . . . . . . . . . . . . . . . . . . . . 12-2
Create Binary Mask Based on Color Values . . . . . . . . . . . . . . . . . . . . . . . 12-4
Create Binary Mask Without an Associated Image . . . . . . . . . . . . . . . . . 12-4
xvi Contents
Measure Distances in an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-64
Image Segmentation
13
Texture Segmentation Using Gabor Filters . . . . . . . . . . . . . . . . . . . . . . . . 13-2
Segment Image and Create Mask Using Color Thresholder App . . . . . 13-42
xvii
Segment Image Using Auto Cluster in Image Segmenter . . . . . . . . . . 13-117
Image Deblurring
14
Image Deblurring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2
Deblurring Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Color
15
Display Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2
xviii Contents
Write ICC Profile Information to a File . . . . . . . . . . . . . . . . . . . . . . . . . 15-10
Convert RGB to CMYK Using ICC Profiles . . . . . . . . . . . . . . . . . . . . . . . 15-11
What is Rendering Intent in Profile-Based Conversions? . . . . . . . . . . . . 15-12
xix
Distinct Block Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-6
Implement Block Processing Using the blockproc Function . . . . . . . . . . . 17-6
Apply Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-7
Deep Learning
18
Train and Apply Denoising Neural Networks . . . . . . . . . . . . . . . . . . . . . . 18-2
Remove Gaussian Noise Using Pretrained Network . . . . . . . . . . . . . . . . 18-2
Train a Denoising Network Using Built-In Layers . . . . . . . . . . . . . . . . . . 18-2
Train Fully Customized Denoising Neural Network . . . . . . . . . . . . . . . . . 18-3
Remove Noise from Color Image Using Pretrained Neural Network . . . 18-5
xx Contents
Neural Style Transfer Using Deep Learning . . . . . . . . . . . . . . . . . . . . . 18-103
xxi
1
Getting Started
This topic presents two examples to get you started doing image processing using MATLAB® and the
Image Processing Toolbox software. The examples contain cross-references to other sections in the
documentation that have in-depth discussions on the concepts presented in the examples.
Image Processing Toolbox apps let you automate common image processing workflows. You can
interactively segment image data, compare image registration techniques, and batch-process large
datasets. Visualization functions and apps let you explore images, 3D volumes, and videos; adjust
contrast; create histograms; and manipulate regions of interest (ROIs).
You can accelerate your algorithms by running them on multicore processors and GPUs. Many
toolbox functions support C/C++ code generation for desktop prototyping and embedded vision
system deployment.
Key Features
• Image analysis, including segmentation, morphology, statistics, and measurement
• Apps for image region analysis, image batch processing, and image registration
• 3D image processing workflows, including visualization and segmentation
• Image enhancement, filtering, geometric transformations, and deblurring algorithms
• Intensity-based and non-rigid image registration methods
• Support for CUDA enabled NVIDIA GPUs (with Parallel Computing Toolbox™)
• C-code generation support for desktop prototyping and embedded vision system deployment
1-2
Configuration Notes
Configuration Notes
To determine if the Image Processing Toolbox software is installed on your system, type this
command at the MATLAB prompt.
ver
When you enter this command, MATLAB displays information about the version of MATLAB you are
running, including a list of all toolboxes installed on your system and their version numbers. For a list
of the new features in this version of the toolbox, see the Release Notes documentation.
Many of the toolbox functions are MATLAB files with a series of MATLAB statements that implement
specialized image processing algorithms. You can view the MATLAB code for these functions using
the statement
type function_name
You can extend the capabilities of the toolbox by writing your own files, or by using the toolbox in
combination with other toolboxes, such as the Signal Processing Toolbox™ software and the Wavelet
Toolbox™ software.
For information about installing the toolbox, see the installation guide.
For the most up-to-date information about system requirements, see the system requirements page,
available in the products area at the MathWorks Web site (www.mathworks.com).
1-3
1 Getting Started
Compilability
The Image Processing Toolbox software is compilable with the MATLAB Compiler™ except for the
following functions that launch GUIs:
• cpselect
• implay
• imtool
1-4
Basic Image Import, Processing, and Export
Read an image into the workspace, using the imread command. The example reads one of the
sample images included with the toolbox, an image of a young girl in a file named pout.tif , and
stores it in an array named I . imread infers from the file that the graphics file format is Tagged
Image File Format (TIFF).
I = imread('pout.tif');
Display the image, using the imshow function. You can also view an image in the Image Viewer app.
The imtool function opens the Image Viewer app which presents an integrated environment for
displaying images and performing some common image processing tasks. The Image Viewer app
provides all the image display capabilities of imshow but also provides access to several other tools
for navigating and exploring images, such as scroll bars, the Pixel Region tool, Image Information
tool, and the Contrast Adjustment tool.
imshow(I)
Check how the imread function stores the image data in the workspace, using the whos command.
You can also check the variable in the Workspace Browser. The imread function returns the image
data in the variable I , which is a 291-by-240 element array of uint8 data.
1-5
1 Getting Started
whos I
View the distribution of image pixel intensities. The image pout.tif is a somewhat low contrast
image. To see the distribution of intensities in the image, create a histogram by calling the imhist
function. (Precede the call to imhist with the figure command so that the histogram does not
overwrite the display of the image I in the current figure window.) Notice how the histogram
indicates that the intensity range of the image is rather narrow. The range does not cover the
potential range of [0, 255], and is missing the high and low values that would result in good contrast.
figure
imhist(I)
Improve the contrast in an image, using the histeq function. Histogram equalization spreads the
intensity values over the full range of the image. Display the image. (The toolbox includes several
other functions that perform contrast adjustment, including imadjust and adapthisteq, and
interactive tools such as the Adjust Contrast tool, available in the Image Viewer.)
I2 = histeq(I);
figure
imshow(I2)
1-6
Basic Image Import, Processing, and Export
Call the imhist function again to create a histogram of the equalized image I2 . If you compare the
two histograms, you can see that the histogram of I2 is more spread out over the entire range than
the histogram of I .
figure
imhist(I2)
1-7
Exploring the Variety of Random
Documents with Different Content
Jones drew first blood in profusion from Orme’s nose and
mouth, while Harry delivered his right with tremendous force
on Jones’s left ribs and left eye, badly marking the one and
almost entirely closing the other.
8.—Both slow in answering the call of time; more than a
minute elapsed before they appeared at the scratch, the
heavy hitting in the last round having told its tale. Orme,
instead of going in and taking advantage of his weight and
power of arm, stood out and retreated, by advice of his
friends. The round lasted 17 minutes, and at last was closed
by another desperate rally, Jones improving in his style, and
using both hands well, but the returns of Orme were heaviest
and most effective. Jones threw Orme cleverly in the close.
9.—Jones jobbed Orme on the nose, and then on the
cheek, but the blows, although well from the shoulder, left no
mark. Orme seemed remarkably slow in showing contusions,
while Jones was already much disfigured. Jones forced Orme
towards his corner; Orme rushed forward as Jones retreated
in turn; he let go both left and right viciously, but was short.
Jones lunged out desperately with his right, and nailing Orme
on the side of the head, knocked him clean down in the
middle of the ring. (Cheers for the Shrewsbury Youth. First
knock-down for Jones.)
10.—Orme came up smiling, and as Jones made himself up
for following his supposed advantage, surprised him by
dashing in and planting his left a smasher on the nose. A
pounding rally followed, in which some heavy counter-hitting
took place, each man standing well to his gun, until Jones fell
under the ropes.
For the next fifteen rounds the fighting grew quicker, the
sparring less tedious, and the rallies more frequent. Jones,
taking a leaf out of his opponent’s book, planted several
slashing hits with his right on the side of Orme’s head, but
being the taller man, he frequently hit too high, and his hand,
rather than Orme’s hard skull, suffered. The East-Ender took
his punishment patiently, and was with Jones in nearly all his
attempts, with heavy right-handers on the left ribs, which
gradually impaired the force of Jones’s hitting, and when they
got closer still, his ponderous right fell on his cheek-bone or
temple, till Jones was nearly blinded. The Shrewsbury man,
however, was yet as strong as Orme, and was the better
wrestler, for he threw his adversary in several of these
rounds. Towards the 25th round, however, the repeated right-
handers of Orme began to tell their tale, and Jones grew
slower and weaker. In the last-mentioned round Orme led off,
and hit Jones sharply in the head, repeating the dose without
a return. Jones attempted to force a rally, but Orme got down
more cleverly than heretofore. Jones fought with great
fairness, and was much applauded.
26.—Orme showed few marks of punishment, and was
sent up by his seconds very clean, while Jones grew more
disfigured each round. The men fought somewhat wildly, but
managed to exchange some stinging counters, which led to a
close; but Jones was now unable to throw his opponent, and
both were down.
27 to 35.—(Two hours and twenty-nine minutes had
elapsed, and no odds were obtainable; indeed, it was yet on
the cards for either to win.) Burn called to his man, Jones, to
come away from Orme’s corner, and let the East-Ender come
to him. Jones, who was evidently distressed, did so, and the
same style of fighting was pursued. Jones fell from weakness
in the 32nd round, which Orme noting, he forced the fighting
again, and, in the 35th round delivered several of his slogging
hits at close quarters with such staggering effect that Jones,
whose returns were slight, dropped in the rally.
36.—The last two or three rounds had told their tale, and it
was evident that Jones’s chance was fading. (3 to 1 offered
on Orme without takers.) Jones came up as game as a man
could be, and still tried to look cheerful; but his knees were
tottery, and he was plainly “going.” Orme went to him, forced
another rally, and, after one or two heavy hits, dropped him
with a right-hander. (“Take him away.”)
37 and 38.—In each of these rounds Jones came to the
scratch, and made one or two futile attempts to stop his
adversary’s rush, dropping on his knee on receiving a hit from
Orme.
39.—Orme paused, as if hesitating to strike his opponent,
who was quite at his mercy. Jones made a peck at him, and
received a touch on the old spot in the ribs. It was but a
push, yet it sent him to grass sideways.
40.—Loud cries of “Take him away!” Jones faced his
opponent for the fortieth time, but he was all abroad. Orme
gradually forced him back into his corner, and harmlessly sent
him down, when Hannan threw up the sponge in token of
Jones’s defeat.
The fight lasted two hours and forty-five minutes, including
several tedious rounds, and much useless breaking ground,
advancing, and retreating. It was, nevertheless, a truly hard
fight, and the two powerful boxers who made their début on
this occasion inflicted severe mutual punishment. It was
manifest, early in the battle, that Orme was the more lasting
of the two, and much the heavier hitter. It seemed, also, that
Jones had commenced his career too early.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com