MATLAB Computer Vision Toolbox User s Guide The Mathworks - Read the ebook now with the complete version and no limits
MATLAB Computer Vision Toolbox User s Guide The Mathworks - Read the ebook now with the complete version and no limits
com
https://textbookfull.com/product/matlab-computer-vision-
toolbox-user-s-guide-the-mathworks/
OR CLICK HERE
DOWLOAD EBOOK
https://textbookfull.com/product/matlab-econometrics-toolbox-user-s-
guide-the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-bioinformatics-toolbox-user-s-
guide-the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-mapping-toolbox-user-s-guide-
the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-optimization-toolbox-user-s-
guide-the-mathworks/
textbookfull.com
MATLAB Trading Toolbox User s Guide The Mathworks
https://textbookfull.com/product/matlab-trading-toolbox-user-s-guide-
the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-curve-fitting-toolbox-user-s-
guide-the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-fuzzy-logic-toolbox-user-s-
guide-the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-global-optimization-toolbox-
user-s-guide-the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-image-processing-toolbox-user-
s-guide-the-mathworks/
textbookfull.com
Computer Vision Toolbox™
User's Guide
R2020a
How to Contact MathWorks
Phone: 508-647-7000
Featured Examples
1
Localize and Read Multiple Barcodes in Image . . . . . . . . . . . . . . . . . . . . . 1-2
Track Vehicles Using Lidar: From Point Cloud to Track List . . . . . . . . . . 1-35
v
Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
Common Elements and Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Install and Use Computer Vision Toolbox OpenCV Interface for Simulink
......................................................... 3-10
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Import OpenCV Code into Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
vi Contents
Input, Output, and Conversions
4
Export to Video Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Setting Block Parameters for this Example . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
vii
Single Camera Calibrator App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Camera Calibrator Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Single Camera Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Open the Camera Calibrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
Prepare the Pattern, Camera, and Images . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
Add Images and Select Camera Model . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
Calibrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
Evaluate Calibration Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17
Improve Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20
Export Camera Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23
Object Detection
7
Getting Started with SSD Multibox Detection . . . . . . . . . . . . . . . . . . . . . . 7-2
Predict Objects in the Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Transfer Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Design an SSD Detection Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Train an Object Detector and Detect Objects with an SSD Model . . . . . . . 7-4
Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Label Training Data for Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
viii Contents
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10
Getting Started with R-CNN, Fast R-CNN, and Faster R-CNN . . . . . . . . . 7-23
Object Detection Using R-CNN Algorithms . . . . . . . . . . . . . . . . . . . . . . . 7-23
Comparison of R-CNN Object Detectors . . . . . . . . . . . . . . . . . . . . . . . . . 7-24
Transfer Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25
Design an R-CNN, Fast R-CNN, and a Faster R-CNN Model . . . . . . . . . . . 7-25
Label Training Data for Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27
ix
Get Started with the Video Labeler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-64
Load Unlabeled Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-64
Set Time Interval to Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-64
Create Label Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-65
Label Ground Truth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-72
Export Labeled Ground Truth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-74
Label Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-76
Save App Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-77
x Contents
Local Feature Detection and Extraction . . . . . . . . . . . . . . . . . . . . . . . . . 7-109
What Are Local Features? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-109
Benefits and Applications of Local Features . . . . . . . . . . . . . . . . . . . . . 7-109
What Makes a Good Local Feature? . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-110
Feature Detection and Feature Extraction . . . . . . . . . . . . . . . . . . . . . . 7-110
Choose a Feature Detector and Descriptor . . . . . . . . . . . . . . . . . . . . . . 7-111
Use Local Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-112
Image Registration Using Multiple Features . . . . . . . . . . . . . . . . . . . . . 7-114
xi
Pattern Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15
Geometric Transformations
9
Nearest Neighbor, Bilinear, and Bicubic Interpolation Methods . . . . . . . 9-2
Nearest Neighbor Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Bilinear Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Bicubic Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Fixed-Point Design
12
Fixed-Point Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Fixed-Point Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Benefits of Fixed-Point Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Benefits of Fixed-Point Design with System Toolboxes Software . . . . . . . 12-2
xii Contents
Arithmetic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
Modulo Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
Two's Complement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
Addition and Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-9
Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10
Casts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-12
Portable C Code Generation for Functions That Use OpenCV Library . . 13-4
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4
xiii
1
Featured Examples
I = imread("barcodeQR.jpg");
% Display image.
imshow(Imsg)
1-2
Localize and Read Multiple Barcodes in Image
I = imread("barcode1D.jpg");
1-3
1 Featured Examples
% Display image.
imshow(I)
For a successful detection, the barcode must be clearly visible. The barcode must also be as closely
aligned to a horizontal or vertical position as possible. The readBarcode function is inherently more
robust to rotations for 2-D or matrix codes than it is to 1-D or linear barcodes. For example, the
barcode cannot be detected in this image.
I = imread("rotated1DBarcode.jpg");
1-4
Localize and Read Multiple Barcodes in Image
ans =
""
Rotate the image using the imrotate so that the barcode is roughly horizontal. Use readBarcode
on the rotated image.
1-5
1 Featured Examples
ans =
"012345678905"
The readBarcode function detects only a single barcode in each image. In order to detect multiple
barcodes, you must specify a region-of-interest (ROI). To specify an ROI, you can use the
drawrectangle function to interactively determine the ROIs. You can also use image analysis
techniques to detect the ROI of multiple barcodes in the image.
1-6
Localize and Read Multiple Barcodes in Image
I = imread("multiple1DBarcodes.jpg");
1-7
1 Featured Examples
roi1 = drawrectangle;
pos = roi1.Position;
imSize = size(I);
for i = 1:size(roi,1)
[msg, format, locs] = readBarcode(I, roi(i,:));
disp("Decoded format and message: " + format + ", " + msg)
imshow(I)
1-8
Localize and Read Multiple Barcodes in Image
Use image analysis techniques to automate the detection of multiple barcodes. This requires
localizing multiple barcodes in an image, determining their orientation, and correcting for the
orientation. Without preprocessing, barcodes cannot be detected in the image containing multiple
rotated barcodes.
1-9
1 Featured Examples
I = imread("multiple1DBarcodesRotated.jpg");
Igray = rgb2gray(I);
ans =
""
Detect regions of interest in the image using the detectMSERFeatures function. Then, you can
eliminate regions of interest based on a specific criteria such as the aspect ratio. You can use the
binary image from the filtered results for further processing.
1-10
Localize and Read Multiple Barcodes in Image
1-11
1 Featured Examples
Detect prominent edges in the image using the edge function. Then use the hough transform to find
lines of interest. The lines represent possible candidates for the vertical bars in the barcode.
1-12
Localize and Read Multiple Barcodes in Image
1-13
1 Featured Examples
After extracting the line segments, two methods are presented for localizing the individual barcodes
in the image:
• Method 1: A clustering-based technique that uses functionalities from the Statistics and Machine
Learning Toolbox™ to identify individual barcodes. This technique is more robust to outliers that
were detected using the image analysis techniques above. It can also be extended to a wide range
of imaging conditions without having to tune parameters.
• Method 2: A segmentation-based workflow to separate the individual barcodes. This method uses
other image analysis techniques to localize and rotation correct the extracted barcodes. While this
works fairly well, it might require some parameter tuning to prevent detection of outliers.
1-14
Localize and Read Multiple Barcodes in Image
While it is common practice to directly use the lines (that were obtained using the Hough transform)
to localize the barcode, this method uses the lines to further detect the perpendicular bisectors for
each of the lines. The bisector lines are represented as points in cartesian space, which makes them
suitable for identifying individual barcodes. Using the bisectors make the detection of the individual
barcodes more robust, since it results in less misclassifications of lines that are similar but belonging
to different barcodes.
Since all of the bars in a barcode are approximately parallel to each other, the bisectors of each of
these bars should ideally be the same line, and their corresponding points should therefore cluster
around a single point. In practice, these bisectors will vary from segment to segment, but still remain
similar enough to allow the use of a density-based clustering algorithm. The result of performing this
clustering operation is a set of clusters, each of which points to a separate barcode. This example
uses the dbscan function, which does not require prior knowledge of the number of clusters. The
different clusters (barcodes) are visualized in this example.
The example checks for a Statistics and Machine Learning Toolbox™ license. If a license is found, the
example uses the clustering method. Otherwise, the example uses the segmentation method.
useClustering = license('test','statistics_toolbox');
if useClustering
[boundingBox, orientation, Iclusters] = clusteringLocalization(lines, size(I));
1-15
Another Random Document on
Scribd Without Any Related Topics
They can never see happiness in one part of the world but to reflect
on the misery which is experienced in another. Is our country at
peace, happy and prosperous, than rejoice not at it, for there are
millions of human beings suffering in China, Japan, Hindostan, and
Bengal. Thompson's writings are deeply imbued with this whining
philosophy, and so perhaps are Cowper's, as was to be expected
from the state of his mind.
Such a mind as the one I have just been describing, has rarely a
very accurate or exact memory. The imagination is too active for the
fidelity of the memory. Pope has well asserted, that
It is useless to say that men much oftener have minds of the third
class in our arrangement than women; not because there is any
natural difference between the sexes in this particular, but because
ours is placed in a situation requiring the cultivation of this species
of mind more than the other. Our professions and occupations exert,
if I may say so, a more effectual demand for the development of this
order of intellect, than those of woman. Men in their passage
through life, are obliged to examine into the necessary connection
between events; they must adapt means to ends; they must attain
their purposes by well arranged plans, according to the relation of
cause and effect. Woman, on the contrary, from the nature of the
sphere in which she moves, and the character of the occupations in
which she is engaged, is more conversant with objects than with
their necessary connections and relations. She is not obliged to
arrange so many concatenated plans; her mind is more alive to the
perception of the objects around her, and less to the causæ rerum.
Her feelings and sympathies are most exquisite, but she attends less
to their relations and dependences. She is in fine a creature of
emotion rather than of philosophy.
15 The character of Oliver Cromwell in this respect is well known. He did not, during
his whole parliamentary career, make one single lucid, perspicuous speech. In fact,
his speaking was almost unintelligible; and yet his course of conduct, although that of
an usurper and tyrant, marks most generally, clearness of judgment, and great
decision of character. Of course I am not here considering his moral character, which
was detestable.
Again, the social circle is the field in which woman wins her trophies,
displays her accomplishments, and achieves her conquests. The art
of pleasing by conversation is all and all to her. The power of
colloquial display is her greatest accomplishment—her most
irresistible weapon. Hence, while man in general aims to make
himself plain and perspicuous, woman endeavors not only to be
understood, but to delight and fascinate the hearer at the same time
by her style and manner. "Man in conversation," says Rousseau, "has
need of knowledge—woman of taste." We are instructed profoundly
in a few things by the conversation of an intelligent man. The
conversation of woman embraces many things, and though we may
not be profoundly instructed in any, yet we have a living and moving
panoramic view presented to the mind, which sooths and charms it
by the beauty, variety, and brilliancy of the parts. Rousseau was so
struck with the differences between the sexes in conversation, that
he seems (I think erroneously) to imagine a natural difference in this
respect between them. "Women," says he, "have a more flexible
tongue: they speak sooner, more easily, and more agreeably than
men. They are accused of speaking more. That is just as it should
be; this should be considered an ornament of the sex, and not a
reproach. Their mouth and eyes have the same activity, and for the
same reason."
The social circles of France are greatly improved by the free and
unrestrained intercourse of all ages together. There is no man in
Paris, it matters not what is his standing or intelligence, but has
social ambition; he aims at distinction in conversation, at reputation
in the social circle, no less than he does at winning trophies in the
field, or fame in the senate chamber. The consequence is, that,
frivolous as we consider that people as a nation, they far excel us in
the social circle, both in the dignity of the topics discussed, and the
ability displayed by both sexes, especially by the females, in
conversation. Women who enjoy the society and conversation of the
wittiest and greatest men of their country will themselves become
witty and clever. "I was talking," says Bulwer in his France, "one
evening with the master of the house where I had been dining, on
some subject of trade and politics, which I engaged in unwillingly in
the idea that it was not very likely to interest the lady. I was soon
rather astonished, I confess, to find her enter into conversation with
a knowledge of detail and a right perception of general principles
which I did not expect. 'How do you think,' said she, when I
afterward expressed my surprise, 'that I could meet my husband
every evening at dinner, if I were not able to talk on the topics on
which he has been employed in the morning.'" Let us then at least
imitate the French in this particular, certain that it will in the process
of time be productive of the most marked and happy result.
TO F——.
TO MARY.
Tune.—Gramachree.
SONG.
TO SARAH.
When melancholy and alone,
I sit on some moss-covered stone
Beside a murm'ring stream;
I think I hear thy voice's sound
In every tuneful thing around,
Oh! what a pleasant dream.
BY EDGAR A. POE.
To enter the little Café in the Cul de Sac Le Febvre was, at the period
of our tale, to enter the sanctum of a man of genius. Bon-Bon was a
man of genius. There was not a sous-cuisinier in Rouen, who could
not have told you that Bon-Bon was a man of genius. His very cat
knew it, and forbore to whisk her tail in the presence of the man of
genius. His large water-dog was acquainted with the fact, and upon
the approach of his master, betrayed his sense of inferiority by a
sanctity of deportment, a debasement of the ears, and a dropping of
the lower jaw not altogether unworthy of a dog. It is, however, true
that much of this habitual respect might have been attributed to the
personal appearance of the metaphysician. A distinguished exterior
will, I am constrained to say, have its weight even with a beast; and
I am willing to allow much in the outward man of the Restaurateur
calculated to impress the imagination of the quadruped. There is a
peculiar majesty about the atmosphere of the little great—if I may
be permitted so equivocal an expression—which mere physical bulk
alone will be found at all times inefficient in creating. If, however,
Bon-Bon was barely three feet in height, and if his head was
diminutively small, still it was impossible to behold the rotundity of
his stomach without a sense of magnificence nearly bordering upon
the sublime. In its size both dogs and men must have seen a type of
his acquirements—in its immensity a fitting habitation for his
immortal soul.
I have said that "to enter the Café in the Cul-de-Sac Le Febvre was
to enter the sanctum of a man of genius"—but then it was only the
man of genius who could duly estimate the merits of the sanctum. A
sign consisting of a vast folio swung before the entrance. On one
side of the volume was painted a bottle—on the reverse a Paté. On
the back were visible in large letters the words Æuvres de Bon-Bon.
Thus was delicately shadowed forth the two-fold occupation of the
proprietor.
Upon stepping over the threshold the whole interior of the building
presented itself to view. A long, low-pitched room of antique
construction was indeed all the accommodation afforded by the Café
in the Cul-de-Sac Le Febvre. In a corner of the apartment stood the
bed of the metaphysician. An array of curtains, together with a
canopy à la Gréque gave it an air at once classic and comfortable. In
the corner diagonally opposite appeared, in direct and friendly
communion, the properties of the kitchen and the bibliothéque. A
dish of polemics stood peacefully upon the dresser. Here lay an
oven-full of the latest ethics—there a kettle of duodecimo melanges.
Volumes of German morality were hand and glove with the gridiron
—a toasting fork might be discovered by the side of Eusebius—Plato
reclined at his ease in the frying pan—and cotemporary manuscripts
were filed away upon the spit.
It was here, about twelve o'clock one night, during the severe winter
of ——, that Pierre Bon-Bon, after having listened for some time to
the comments of his neighbors upon his singular propensity—that
Pierre Bon-Bon, I say, having turned them all out of his house,
locked the door upon them with a sacre Dieu, and betook himself in
no very pacific mood to the comforts of a leather-bottomed arm-
chair, and a fire of blazing faggots.
It was one of those terrific nights which are only met with once or
twice during a century. The snow drifted down bodily in enormous
masses, and the Café de Bon-Bon tottered to its very centre, with
the floods of wind that, rushing through the crannies in the wall, and
pouring impetuously down the chimney, shook awfully the curtains
of the philosopher's bed, and disorganized the economy of his Paté-
pans and papers. The huge folio sign that swung without, exposed
to the fury of the tempest, creaked ominously, and gave out a
moaning sound from its stanchions of solid oak.
"I see you know me, Bon-Bon,"—said he:—"ha! ha! ha!—he! he! he!
—hi! hi! hi!—ho! ho! ho!—hu! hu! hu!"—and the devil, dropping at
once the sanctity of his demeanor, opened to its fullest extent a
mouth from ear to ear so as to display a set of jagged, and fang-like
teeth, and throwing back his head, laughed long, loud, wickedly, and
uproariously, while the black dog crouching down upon his haunches
joined lustily in the chorus, and the tabby cat, flying off at a tangent
stood up on end and shrieked in the farthest corner of the
apartment.
Not so the philosopher: he was too much a man of the world either
to laugh like the dog, or by shrieks to betray the indecorous
trepidation of the cat. It must be confessed, however, that he felt a
little astonishment to see the white letters which formed the words
"Rituel Catholique" on the book in his guest's pocket momentarily
changing both their color and their import, and in a few seconds in
place of the original title, the words Regitre des Condamnés blaze
forth in characters of red. This startling circumstance, when Bon-Bon
replied to his visiter's remark, imparted to his manner an air of
embarrassment which might not probably have otherwise been
observable.
Hereupon the guest helped himself to the wine upon the table, and
pouring out a bumper for Bon-Bon, requested him to drink it without
scruple, and make himself perfectly at home.
"A clever book that of yours, upon my honor. It's a work after my
own heart. Your arrangement of matter, I think, however, might be
improved, and many of your notions remind me of Aristotle. That
philosopher was one of my most intimate acquaintances. I liked him
as much for his terrible ill temper, as for his happy knack at making
a blunder. There is only one solid truth in all that he has written, and
for that I gave him the hint out of pure compassion for his absurdity.
I suppose, Pierre Bon-Bon, you very well know to what divine moral
truth I am alluding."
"Well, well! have it your own way"—said the devil pacifically: and
Bon-Bon, having beaten his majesty at an argument, thought it his
duty to conclude a second bottle of Chambertin.
"No, sir!"
"Indubitably"—
"No, sir!"
"Indisputably"—
"No, sir!"
"Evidently"—
"No, sir!"
"Incontrovertibly"—
"No, sir!"
"Hiccup!"—
"No, sir!"
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.
textbookfull.com