100% found this document useful (4 votes)
36 views

[Ebooks PDF] download Opencv 3 Computer Vision Application Programming Cookbook Third Edition Robert Laganiere full chapters

Computer

Uploaded by

nasetocashe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
36 views

[Ebooks PDF] download Opencv 3 Computer Vision Application Programming Cookbook Third Edition Robert Laganiere full chapters

Computer

Uploaded by

nasetocashe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Opencv 3 Computer Vision Application Programming


Cookbook Third Edition Robert Laganiere

https://textbookfull.com/product/opencv-3-computer-vision-
application-programming-cookbook-third-edition-robert-
laganiere/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

OpenCV 3 computer vision application programming cookbook


recipes to help you build computer vision applications
that make the most of the popular C library OpenCV 3 Third
Edition Laganière
https://textbookfull.com/product/opencv-3-computer-vision-application-
programming-cookbook-recipes-to-help-you-build-computer-vision-
applications-that-make-the-most-of-the-popular-c-library-
opencv-3-third-edition-laganiere/
textboxfull.com

Learning OpenCV 3 Computer Vision in C with the OpenCV


Library 1st Edition Adrian Kaehler

https://textbookfull.com/product/learning-opencv-3-computer-vision-in-
c-with-the-opencv-library-1st-edition-adrian-kaehler/

textboxfull.com

Transformers for Natural Language Processing and Computer


Vision, Third Edition Denis Rothman

https://textbookfull.com/product/transformers-for-natural-language-
processing-and-computer-vision-third-edition-denis-rothman/

textboxfull.com

Computer Graphics Programming in OpenGL Using C++, Third


Edition Gordon Phd

https://textbookfull.com/product/computer-graphics-programming-in-
opengl-using-c-third-edition-gordon-phd/

textboxfull.com
Android Application Development Cookbook Boyer

https://textbookfull.com/product/android-application-development-
cookbook-boyer/

textboxfull.com

Advances in Computer Vision: Proceedings of the 2019


Computer Vision Conference (CVC), Volume 1 Kohei Arai

https://textbookfull.com/product/advances-in-computer-vision-
proceedings-of-the-2019-computer-vision-conference-cvc-volume-1-kohei-
arai/
textboxfull.com

Code for OpenCV 3.x with Python By Example, Second Edition


Gabriel Garrido

https://textbookfull.com/product/code-for-opencv-3-x-with-python-by-
example-second-edition-gabriel-garrido/

textboxfull.com

Python Network Programming Cookbook Kathiravelu

https://textbookfull.com/product/python-network-programming-cookbook-
kathiravelu/

textboxfull.com

Python GUI Programming Cookbook Meier

https://textbookfull.com/product/python-gui-programming-cookbook-
meier/

textboxfull.com
OpenCV 3 Computer Vision
Application Programming
Cookbook
Third Edition

Recipes to help you build computer vision applications that


make the most of the popular C++ library OpenCV 3

Robert Laganiere

BIRMINGHAM - MUMBAI
OpenCV 3 Computer Vision Application
Programming Cookbook
Third Edition

Copyright © 2017 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: May 2011

Second edition: August 2014

Third edition: February 2017

Production reference: 1070217


Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78646-971-7
www.packtpub.com
Credits

Author Copy Editor

Robert Laganiere Safis Editing

Reviewer Project Coordinator

Luca Del Tongo Ulhas Kambali

Commissioning Editor Proofreader

Edward Gordon Safis Editing

Acquisition Editor Indexer

Nitin Dasan Tejal Daruwale Soni

Content Development Editor Graphics

Nikhil Borkar Kirk D'Penha


Jason Monteiro

Technical Editor Production Coordinator

Subhalaxmi Nadar Shantanu Zagade


About the Author
Robert Laganiere is a professor at the School of Electrical Engineering and Computer
Science of the University of Ottawa, Canada. He is also a faculty member of the VIVA
research lab and is the co-author of several scientific publications and patents in content-
based video analysis, visual surveillance, driver-assistance, object detection, and tracking.
Robert authored the OpenCV2 Computer Vision Application Programming Cookbook in
2011 and co-authored Object Oriented Software Development published by McGraw Hill in
2001. He co-founded Visual Cortek in 2006, an Ottawa-based video analytics startup that
was later acquired by http://iwatchlife.com/ in 2009. He is also a consultant in
computer vision and has assumed the role of Chief Scientist in a number of startups
companies such as Cognivue Corp, iWatchlife, and Tempo Analytics. Robert has a Bachelor
of Electrical Engineering degree from Ecole Polytechnique in Montreal (1987) and MSc and
PhD degrees from INRS-Telecommunications, Montreal (1996). Visit the author’s website at
http://www.laganiere.name/.

I wish to thank all my students at the VIVA lab; I learn so much from them.
About the Reviewer
Luca Del Tongo is a computer engineer with a strong passion for algorithms, computer
vision, and image processing techniques. He's the coauthor of a free e-book called Data
Structures and Algorithms (DSA) with over 100k downloads so far and has published
several image processing tutorials on his YouTube channel using Emgu CV. During his
master's thesis, he developed an image forensic algorithm published in a scientific paper
called Copy Move forgery detection and localization by means of robust clustering with J-
Linkage. Currently, Luca works as a software engineer in the ophthalmology field
developing corneal topography, processing algorithms, IOL calculation, and computerized
chart projector. He loves to play sport and follow MOOC courses in his spare time.

You can contact him through his blog at http://blogs.ugidotnet.org/wetblog.


www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a
print book customer, you are entitled to a discount on the eBook copy. Get in touch with us
at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and
eBooks.

https://www.packtpub.com/mapt

Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt
books and video courses, as well as industry-leading tools to help you plan your personal
development and advance your career.

Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thank you for purchasing this Packt book. We take our commitment to improving our
content and products to meet your needs seriously—that's why your feedback is so
valuable. Whatever your feelings about your purchase, please consider leaving a review on
this book's Amazon page. Not only will this help us, more importantly it will also help
others in the community to make an informed decision about the resources that they invest
in to learn.

You can also review for us on a regular basis by joining our reviewers' club. If you're
interested in joining, or would like to learn more about the benefits we offer, please
contact us: [email protected].
Table of Contents
Preface 1
Chapter 1: Playing with Images 8
Introduction 8
Installing the OpenCV library 9
Getting ready 9
How to do it… 9
How it works… 14
There's more… 15
The Visualization Toolkit and the cv::viz module 15
The OpenCV developer site 16
See also 16
Loading, displaying, and saving images 16
Getting ready 17
How to do it… 17
How it works… 20
There's more… 21
Clicking on images 22
Drawing on images 23
See also 24
Exploring the cv::Mat data structure 24
How to do it… 25
How it works… 27
There's more… 31
The input and output arrays 31
Manipulating small matrices 31
See also 32
Defining regions of interest 32
Getting ready 32
How to do it… 33
How it works… 34
There's more… 34
Using image masks 35
See also 36
Chapter 2: Manipulating Pixels 37
Introduction 37
Accessing pixel values 38
Getting ready 39
How to do it… 39
How it works… 41
There's more… 42
The cv::Mat_ template class 42
See also 42
Scanning an image with pointers 42
Getting ready 43
How to do it… 43
How it works… 45
There's more… 46
Other color reduction formulas 46
Having input and output arguments 47
Efficient scanning of continuous images 49
Low-level pointer arithmetic 50
See also 51
Scanning an image with iterators 51
Getting ready 51
How to do it… 51
How it works… 52
There's more… 54
See also 54
Writing efficient image-scanning loops 54
How to do it… 55
How it works… 55
There's more… 57
See also 58
Scanning an image with neighbor access 58
Getting ready 58
How to do it… 59
How it works… 60
There's more… 61
See also 62
Performing simple image arithmetic 63
Getting ready 63
How to do it… 63
How it works… 64
There's more… 65
Overloaded image operators 65
Splitting the image channels 66

[ ii ]
Remapping an image 67
How to do it… 67
How it works… 68
See also 70
Chapter 3: Processing the Colors of an Image 71
Introduction 71
Comparing colors using the Strategy design pattern 72
How to do it… 72
How it works… 74
There's more… 78
Computing the distance between two color vectors 78
Using OpenCV functions 79
The floodFill function 80
Functor or function object 82
The OpenCV base class for algorithms 82
See also 83
Segmenting an image with the GrabCut algorithm 83
How to do it… 84
How it works… 86
See also 87
Converting color representations 87
How to do it… 88
How it works… 89
See also 91
Representing colors with hue, saturation, and brightness 91
How to do it… 91
How it works… 94
There's more… 97
Using colors for detection – skin tone detection 97
See also 100
Chapter 4: Counting the Pixels with Histograms 101
Introduction 101
Computing an image histogram 102
Getting ready 102
How to do it… 103
How it works… 107
There's more… 108
Computing histograms of color images 109
See also 110
Applying look-up tables to modify the image's appearance 111

[ iii ]
How to do it… 111
How it works… 112
There's more… 112
Stretching a histogram to improve the image contrast 113
Applying a look-up table to color images 115
See also 115
Equalizing the image histogram 115
How to do it… 116
How it works… 117
Backprojecting a histogram to detect specific image content 118
How to do it… 118
How it works… 121
There's more… 121
Backprojecting color histograms 121
See also 125
Using the mean shift algorithm to find an object 125
How to do it… 126
How it works… 129
See also 130
Retrieving similar images using the histogram comparison 130
How to do it… 130
How it works… 132
See also 133
Counting pixels with integral images 133
How to do it… 134
How it works… 135
There's more… 137
Adaptive thresholding 137
Visual tracking using histograms 141
See also 145
Chapter 5: Transforming Images with Morphological Operations 146
Introduction 146
Eroding and dilating images using morphological filters 147
Getting ready 147
How to do it… 148
How it works… 150
There's more… 152
See also 152
Opening and closing images using morphological filters 152
How to do it… 152

[ iv ]
How it works… 154
See also 155
Applying morphological operators on gray-level images 155
How to do it… 156
How it works… 157
See also 158
Segmenting images using watersheds 159
How to do it… 159
How it works… 164
There's more… 165
See also 167
Extracting distinctive regions using MSER 167
How to do it… 167
How it works… 170
See also 172
Chapter 6: Filtering the Images 173
Introduction 173
Filtering images using low-pass filters 174
How to do it… 174
How it works… 176
See also 179
Downsampling images with filters 179
How to do it… 180
How it works… 182
There's more… 183
Interpolating pixel values 183
See also 185
Filtering images using a median filter 185
How to do it… 186
How it works… 186
Applying directional filters to detect edges 187
How to do it… 188
How it works… 191
There's more… 194
Gradient operators 195
Gaussian derivatives 197
See also 198
Computing the Laplacian of an image 198
How to do it… 198

[v]
How it works… 200
There's more… 204
Enhancing the contrast of an image using the Laplacian 204
Difference of Gaussians 204
See also 205
Chapter 7: Extracting Lines, Contours, and Components 206
Introduction 206
Detecting image contours with the Canny operator 207
How to do it… 207
How it works… 209
See also 211
Detecting lines in images with the Hough transform 211
Getting ready 211
How to do it… 212
How it works… 217
There's more… 220
Detecting circles 221
See also 223
Fitting a line to a set of points 223
How to do it… 223
How it works… 226
There's more… 226
Extracting connected components 226
How to do it… 227
How it works… 229
There's more… 230
Computing components' shape descriptors 232
How to do it… 232
How it works… 234
There's more… 235
Quadrilateral detection 235
Chapter 8: Detecting Interest Points 238
Introduction 238
Detecting corners in an image 238
How to do it… 239
How it works… 245
There's more… 247
Good features to track 247
See also 249

[ vi ]
Detecting features quickly 250
How to do it… 250
How it works… 251
There's more… 253
See also 255
Detecting scale-invariant features 256
How to do it… 256
How it works… 258
There's more… 260
The SIFT feature-detection algorithm 260
See also 262
Detecting FAST features at multiple scales 263
How to do it… 263
How it works… 264
There's more… 265
The ORB feature-detection algorithm 265
See also 266
Chapter 9: Describing and Matching Interest Points 267
Introduction 267
Matching local templates 268
How to do it… 269
How it works… 272
There's more… 274
Template matching 274
See also 275
Describing and matching local intensity patterns 275
How to do it… 276
How it works… 278
There's more… 281
Cross-checking matches 281
The ratio test 282
Distance thresholding 283
See also 284
Matching keypoints with binary descriptors 285
How to do it… 285
How it works… 287
There's more… 288
FREAK 288
See also 290
Chapter 10: Estimating Projective Relations in Images 291

[ vii ]
Introduction 291
Image formation 292
Computing the fundamental matrix of an image pair 295
Getting ready 295
How to do it… 296
How it works… 300
See also 301
Matching images using random sample consensus 301
How to do it… 302
How it works… 305
There's more… 307
Refining the fundamental matrix 307
Refining the matches 308
Computing a homography between two images 308
Getting ready 309
How to do it… 310
How it works… 313
There's more… 313
Generating image panoramas with the cv::Stitcher module 314
See also 315
Detecting a planar target in images 315
How to do it… 315
How it works… 319
See also 322
Chapter 11: Reconstructing 3D Scenes 323
Introduction 323
Digital image formation 324
Calibrating a camera 326
How to do it… 326
How it works… 332
There's more… 335
Calibration with known intrinsic parameters 335
Using a grid of circles for calibration 335
See also 335
Recovering camera pose 336
How to do it… 336
How it works… 339
There's more… 340
cv::Viz, a 3D Visualizer module 340
See also 342

[ viii ]
Reconstructing a 3D scene from calibrated cameras 342
How to do it… 342
How it works… 348
There's more… 350
Decomposing a homography 350
Bundle adjustment 351
See also 351
Computing depth from stereo image 351
Getting ready 352
How to do it… 353
How it works… 355
See also 357
Chapter 12: Processing Video Sequences 358
Introduction 358
Reading video sequences 359
How to do it… 359
How it works… 360
There's more… 362
See also 362
Processing the video frames 362
How to do it… 363
How it works… 364
There's more… 368
Processing a sequence of images 368
Using a frame processor class 370
See also 371
Writing video sequences 371
How to do it… 372
How it works… 373
There's more… 375
The codec four-character code 376
See also 377
Extracting the foreground objects in a video 377
How to do it… 379
How it works… 381
There's more… 381
The Mixture of Gaussian method 381
See also 384
Chapter 13: Tracking Visual Motion 385

[ ix ]
Introduction 385
Tracing feature points in a video 386
How to do it… 386
How it works… 391
See also 392
Estimating the optical flow 393
Getting ready 394
How to do it… 395
How it works… 397
See also 398
Tracking an object in a video 399
How to do it… 399
How it works… 403
See also 406
Chapter 14: Learning from Examples 407
Introduction 407
Recognizing faces using nearest neighbors of local binary patterns 408
How to do it… 408
How it works… 411
See also 415
Finding objects and faces with a cascade of Haar features 416
Getting ready 416
How to do it… 418
How it works… 422
There's more… 424
Face detection with a Haar cascade 425
See also 426
Detecting objects and people with Support Vector Machines and
histograms of oriented gradients 426
Getting ready 427
How to do it… 428
How it works… 431
There's more… 434
HOG visualization 435
People detection 437
Deep learning and Convolutional Neural Networks 439
See also 440
Index 441

[x]
Preface
Augmented reality, driving assistance, video monitoring; more and more applications are
now using computer vision and image analysis technologies, and yet we are still in the
infancy of the development of new computerized systems capable of understanding our
worlds through the sense of vision. And with the advent of powerful and affordable
computing devices and visual sensors, it has never been easier to create sophisticated
imaging applications. A multitude of software tools and libraries manipulating images and
videos are available, but for anyone who wishes to develop smart vision-based applications,
the OpenCV library is the tool to use. OpenCV (Open source Computer Vision) is an open
source library containing more than 500 optimized algorithms for image and video analysis.
Since its introduction in 1999, it has been largely adopted as the primary development tool
by the community of researchers and developers in computer vision. OpenCV was
originally developed at Intel by a team led by Gary Bradski as an initiative to advance
research in vision and promote the development of rich vision-based, CPU-intensive
applications. After a series of beta releases, version 1.0 was launched in 2006. A second
major release occurred in 2009 with the launch of OpenCV 2 that proposed important
changes, especially the new C++ interface, which we use in this book. In 2012, OpenCV
reshaped itself as a non-profit foundation (http://opencv.org/) relying on crowdfunding
for its future development. OpenCV3 was introduced in 2013; changes were made mainly to
improve the usability of library. Its structure has been revised to remove the unnecessary
dependencies, large modules have been split into smaller ones and the API has been
refined. This book is the third edition of the OpenCV Computer Vision Application
Programming Cookbook and the first one that covers OpenCV version 3. All the programming
recipes of the previous editions have been reviewed and updated. We also have added new
content and new chapters to provide readers with even better coverage of the essential
functionalities of the library. This book covers many of the library’s features and
explains how to use them to accomplish specific tasks. Our objective is not to provide
detailed coverage of every option offered by the OpenCV functions and classes but rather to
give you the elements you need to build your applications from the ground up. We also
explore, in this book, fundamental concepts in image analysis and we describe some of the
important algorithms in computer vision. This book is an opportunity for you to get
introduced to the world of image and video analysis. But this is just the beginning. The
good news is that OpenCV continues to evolve and expand. Just consult the OpenCV online
documentation at http://opencv.org/ to stay updated about what the library can do for
you. You can also visit the author’s website at http://www.laganiere.name/ for updated
information about this cookbook.
Preface

What this book covers


Chapter 1, Playing with Images, introduces the OpenCV library and shows you how to build
simple applications that can read and display images. It also introduces the basic OpenCV
data structures.

Chapter 2, Manipulating Pixels, explains how an image can be read. It describes different
methods for scanning an image in order to perform an operation on each of its pixels.

Chapter 3, Processing the Colors of an Image, consists of recipes presenting various object-
oriented design patterns that can help you to build better computer vision applications. It
also discusses the concept of colors in images.

Chapter 4, Counting the Pixels with Histograms, shows you how to compute image
histograms and how they can be used to modify an image. Different applications based on
histograms are presented that achieve image segmentation, object detection, and image
retrieval.

Chapter 5, Transforming Images with Morphological Operations, explores the concept of


mathematical morphology. It presents different operators and how they can be used to
detect edges, corners, and segments in images.

Chapter 6, Filtering the Images, teaches you the principle of frequency analysis and image
filtering. It shows how low-pass and high-pass filters can be applied to images and presents
the concept of derivative operators.

Chapter 7, Extracting Lines, Contours, and Components, focuses on the detection of geometric
image features. It explains how to extract contours, lines and connected components in an
image.

Chapter 8, Detecting Interest Points, describes various feature point detector in images.

Chapter 9, Describing and Matching Interest Points, explains how descriptors of interest
points can be computed and used to match points between images.

Chapter 10, Estimating Projective Relations in Images, explores the projective relations that
exist between two images in the same scene. It also describes how to detect specific targets
in an image.

Chapter 11, Reconstructing 3D scenes, allows you to reconstruct the 3D elements of a scene
from multiple images and recover the camera pose. It also includes a description of the
camera calibration process.

[2]
Preface

Chapter 12, Processing Video Sequences, provide a framework to read and write a video
sequence and to process its frames. It shows you also how it is possible to extract the
foreground objects moving in front of a camera.

Chapter 13, Tracking Visual Motion, addresses the visual tracking problem. It shows you
how to compute the apparent motion in videos. It also explains how to track moving objects
in an image sequence.

Chapter 14, Learning from Examples, introduces basic concepts in machine learning. It shows
how object classifiers can be built from image samples.

What you need for this book


This cookbook is based on the C++ API of the OpenCV library. It is therefore assumed that
you have some experience with the C++ language. In order to run the examples presented in
the recipes and experiment with them, you need a good C++ development environment.
Microsoft Visual Studio and Qt are two popular choices.

Who this book is for


This cookbook is appropriate for novice C++ programmers who want to learn how to use
the OpenCV library to build computer vision applications. It is also suitable for professional
software developers who wants to be introduced to the concepts of computer vision
programming. It can be used as a companion book in university-level computer vision
courses. It constitutes an excellent reference for graduate students and researchers in image
processing and computer vision.

Sections
In this book, you will find several headings that appear frequently (Getting ready, How to
do it, How it works, There's more, and See also). To give clear instructions on how to
complete a recipe, we use these sections as follows:

Getting ready
This section tells you what to expect in the recipe, and describes how to set up any software
or any preliminary settings required for the recipe.

[3]
Preface

How to do it…
This section contains the steps required to follow the recipe.

How it works…
This section usually consists of a detailed explanation of what happened in the previous
section.

There's more…
This section consists of additional information about the recipe in order to make the reader
more knowledgeable about the recipe.

See also
This section provides helpful links to other useful information for the recipe.

Conventions
In this book, you will find a number of text styles that distinguish between different kinds
of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can
include other contexts through the use of the include directive."

A block of code is set as follows:


// Compute Laplacian using LaplacianZC class
LaplacianZC laplacian;
laplacian.setAperture(7); // 7x7 laplacian
cv::Mat flap= laplacian.computeLaplacian(image);
laplace= laplacian.getLaplacianImage();

When we wish to draw your attention to a particular part of a code block, the relevant lines
or items are set in bold:
// Compute Laplacian using LaplacianZC class
LaplacianZC laplacian;
laplacian.setAperture(7); // 7x7 laplacian
cv::Mat flap= laplacian.computeLaplacian(image);
laplace= laplacian.getLaplacianImage();

[4]
Preface

New terms and important words are shown in bold. Words that you see on the screen, for
example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button
moves you to the next screen."

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book-what you liked or disliked. Reader feedback is important for us as it helps us develop
titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the


book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide at www.packtpub.com/authors .

Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you
to get the most from your purchase.

Downloading the example code


You can download the example code files for this book from your account at http://www.p
acktpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.c
om/supportand register to have the files e-mailed directly to you.

You can download the code files by following these steps:

1. Log in or register to our website using your e-mail address and password.
2. Hover the mouse pointer on the SUPPORT tab at the top.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box.
5. Select the book for which you're looking to download the code files.
6. Choose from the drop-down menu where you purchased this book from.
7. Click on Code Download.

[5]
Preface

You can also download the code files by clicking on the Code Files button on the book's
webpage at the Packt Publishing website. This page can be accessed by entering the book's
name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the
latest version of:

WinRAR / 7-Zip for Windows


Zipeg / iZip / UnRarX for Mac
7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at


https://github.com/PacktPublishing/OpenCV3-Computer-Vision-Application-Programm
ing-Cookbook-Third-Edition. We also have other code bundles from our rich catalog of
books and videos available at https://github.com/PacktPublishing/. Check them out!

The source code files of the examples presented in this cookbook are also hosted in the
author's Github repository. You can visit the author's repository at https://github.com/la
ganiereto obtain the latest version of the code.

Downloading the color images of this book


We also provide you with a PDF file that has color images of the screenshots/diagrams used
in this book. The color images will help you better understand the changes in the output.
You can download this file from https://www.packtpub.com/sites/default/files/down
loads/OpenCV3ComputerVisionApplicationProgrammingCookbookThirdEdition_ColorI
mages.pdf.

Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-
we would be grateful if you could report this to us. By doing so, you can save other readers
from frustration and help us improve subsequent versions of this book. If you find any
errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting
your book, clicking on the Errata Submission Form link, and entering the details of your
errata. Once your errata are verified, your submission will be accepted and the errata will
be uploaded to our website or added to any list of existing errata under the Errata section of
that title.

[6]
Preface

To view the previously submitted errata, go to https://www.packtpub.com/books/conten


t/supportand enter the name of the book in the search field. The required information will
appear under the Errata section.

Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At
Packt, we take the protection of our copyright and licenses very seriously. If you come
across any illegal copies of our works in any form on the Internet, please provide us with
the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated


material.

We appreciate your help in protecting our authors and our ability to bring you valuable
content.

Questions
If you have a problem with any aspect of this book, you can contact us
at [email protected], and we will do our best to address the problem.

[7]
Playing with Images
1
In this chapter, we will get you started with the OpenCV library. You will learn how to
perform the following tasks:

Installing the OpenCV library


Loading, displaying, and saving images
Exploring the cv::Mat data structure
Defining regions of interest

Introduction
This chapter will teach you the basic elements of OpenCV and will show you how to
accomplish the most fundamental image processing tasks: reading, displaying, and saving
images. However, before you start with OpenCV, you need to install the library. This is a
simple process that is explained in the first recipe of this chapter.

All your computer vision applications will involve the processing of images. This is why
OpenCV offers you a data structure to handle images and matrices. It is a powerful data
structure with many useful attributes and methods. It also incorporates an advanced
memory management model that greatly facilitates the development of applications. The
last two recipes of this chapter will teach you how to use this important data structure of
OpenCV.
Playing with Images

Installing the OpenCV library


OpenCV is an open source library for developing computer vision applications that can run
on multiple platforms, such as Windows, Linux, Mac, Android, and iOS. It can be used in
both academic and commercial applications under a BSD license that allows you to freely
use, distribute, and adapt it. This recipe will show you how to install the library on your
machine.

Getting ready
When you visit the OpenCV official website at http://opencv.org/, you will find the latest
release of the library, the online documentation describing the Application Programming
Interface (API), and many other useful resources on OpenCV.

How to do it…
From the OpenCV website, find the latest available downloads and select the one that
corresponds to the platform of your choice (Windows, Linux/Mac, or iOS). Once the
OpenCV package is downloaded, run the WinZip self-extractor and select the location of
your choice. An opencv directory will be created; it is a good idea to rename it in a way that
will show which version you are using (for example, in Windows, your final directory
could be C:\opencv-3.2). This directory will contain a collection of files and directories
that constitute the library. Notably, you will find the sources directory that will contain all
the source files (yes, it is open source!).

In order to complete the installation of the library and have it ready for use, you need to
take an important step: generate the binary files of the library for the environment of your
choice. This is indeed the point where you have to make a decision on the target platform
you wish to use to create your OpenCV applications. Which operating system do you prefer
to use? Which compiler should you select? Which version? 32-bit or 64-bit? As you can see,
there are many possible options, and this is why you have to build the library that fits your
needs.

[9]
Playing with Images

The Integrated Development Environment (IDE) you will use in your project development
will also guide you to make these choices. Note that the library package also comes with
precompiled binaries that you can directly use if they correspond to your situation (check
the build directory adjacent to the sources directory). If one of the precompiled binaries
satisfies your requirements, then you are ready to go.

One important remark, however. Since version 3, OpenCV has been split into two major
components. The first one is the main OpenCV source repository that includes the mature
algorithms. This is the one you have downloaded. A separate contribution repository also
exists, and it contains the new computer vision algorithm, recently added by the OpenCV
contributors. If your plan is to use only the core functions of OpenCV, you do not need the
contrib package. But if you want to play with the latest state-of-the-art algorithms, then
there is a good chance that you will need this extra module. As a matter of fact, this
cookbook will show you how to use several of these advanced algorithms. You therefore
need the contrib modules to follow the recipes of this book. So you have to go to
https://github.com/opencv/opencv_contrib and download OpenCV's extra modules
(download the ZIP file). You can unzip the extra modules into the directory of your choice;
these modules should be found at opencv_contrib-master/modules. For simplicity, you
can rename this directory as contrib and copy it directly inside the sources directory of
the main package. Note that you can also pick the extra modules of your choice and only
save them; however, you will probably find it easier, at this point, to simply keep
everything.

You are now ready to proceed with the installation. To build the OpenCV binaries, it is
highly suggested that you use the CMake tool, available at http://cmake.org. CMake is
another open source software tool designed to control the compilation process of a software
system using platform-independent configuration files. It generates the required makefile
or solution files needed for compiling a software library in your environment. Therefore,
you have to download and install CMake. Also see the There's more… section of this recipe
for an additional software package, the Visualization Toolkit (VTK), that you may want to
install before compiling the library.

[ 10 ]
Playing with Images

You can run cmake using a command-line interface, but it is easier to use CMake with its
graphical interface (cmake-gui). In the latter case, all you need to do is specify the folder
containing the OpenCV library source and the one that will contain the binaries. Now click
on Configure and select the compiler of your choice:

[ 11 ]
Exploring the Variety of Random
Documents with Different Content
Copland, Robert, 7, 139, 146-7, 154, 172
Copland, William, 147
Corsellis, Frederick, 2
Cotton, Henry, 19
Cousin, Jacques, 205, 206
Couvelance, Philippus de, 199
Coverdale, Miles, 208, 209, 225
Cowlance, Jean de, 198
Cox, Leonard, 153
Cranmer, Thomas, 159
Crawford, Earl of, 194
Criblée engravings, 142
Crom, Matthew, 231
Cromwell, Thomas, 149, 154, 157, 185, 203, 209
Croppe, Gerard, 23
Cuthbert, St, 101

Darby, Robert, 139


Dating, method of: Berthelet, 179;
Notary, 135, 141;
Pynson, 68, 159, 160;
Redman, 175;
W. de Worde, 31, 135
Davidson, Thomas, 115
Day, John, 191
De veteri et novo Deo, J. Byddell, 1535, 203
Debate and stryfe betwene Somer and Wynter, L. Andrewe, 156
Defence of Peace, 1535, 203
Demaundes Joyous, W. de Worde, 1511, 136
Determinations of the most famous Universities, Berthelet, 179
Deventer printing, 79
Devonshire, Duke of, 16, 74.
See also Chatsworth Library
Dewes, G., Introductorie for to lerne French, T. Berthelet, 157;
J. Reynes, 200
Dialogue betwixte two englyshe men, T. Berthelet, 180
Dibdin, T. F., 8, 27, 46, 53
Dictes or sayengis of the Philosophres, Caxton, 6, 7
Dictionary of National Biography, 22, 131
Directorium sacerdotum. See Maydeston, C.
Directory of the conscience, L. Andrewe, 156
Diurnale, Sarum, W. Hopyl, 1512, 195
Dives and Pauper, Pynson, 54, 61
Division of the Spiritualty and the Temporalty, 175, 180
Dockwray, Thomas, 148, 149
Doctrinal of Sapience, Caxton, 20
Doctrynale of good servantes, J. Butler, 152
Doesborch, Jan van, 91, 130, 155, 214, 220-222
Donate and accidence, Paris, 1515, 198
Donatus, P. Violette, 206
Donatus Melior, Caxton, 17, 125
Dorne, John, 98
Dorp, R. van den, 220
Dotier, Martin, 235
Douce, Francis, 10, 25, 221
Douglas, Gavin, 20
Draper, Richard, 202
Drunkardes, The IX, R. Bankes, 154
Dublin: Marsh Library, 143, 234;
Trinity College Library, 84, 86, 88, 89, 217
Duff, E. Gordon, 60, 115, 116
Du Pré, Jean, 206
Durham bindings, 102, 104
Durham Cathedral Library, 34, 102
Dying Creature, W. de Worde, 1514, 146

Eckert van Homberg, Henri, 226


Eckius, J., Enchiridion, 1531, 148
Edinburgh printing, 151
Edinburgh, Advocates’ Library, 37
Signet Library, 67
University Library, 81
Edwards, bookseller, 161
Egmond, Count of, 67
Egmont, Frederick, 66, 67, 91-94, 97, 207;
bindings, 114-5
Elegantiarum viginti praecepta, Pynson, 67
Elyot, Sir T., Book named the Governour, T. Berthelet, 180
Endhoven, C. van. See Ruremond, C. van
Eneydos, Caxton, 20
Epitaph of Jasper, Duke of Bedford, Pynson, 63
Erasmus, D., Christiani hominis institutum, H. Pepwell, 148;
Colloquiorum formulae, De copia verborum, Enchiridion militis
christiani, W. de Worde, 138;
Exposition of the commune crede, Redman, 203;
Good manners for children, W. de Worde, 138;
Treatise upon the pater noster, Berthelet, 178
Esteney, John, 130
Eurialus and Lucrece, J. van Doesborch, 220
Every Man, J. Skot, 150
Exposicions des epistres et evangiles, Verard, 1511-2, 212
Expositio hymnorum, A. Bocard for J. Boudins, 97, 193;
H. Quentell, 65;
Pynson’s Supplement, 65
Expositiones terminorum legum Anglorum, 1527, 152

Faques, Richard, 170-172, 234


Faques, Wm, 158, 162, 169-171
Far, Richard, 172
Farmer, Richard, 10, 39, 132
Fawkes, Michael, 172
Fawkes. See also Faques
Faxe, Amelyne, 172
Faxe, Richard, 172
Ferreboue, James, 212
Festum nominis Jesu, Pynson, 61, 65
Festum transfigurationis, Caxton, 61;
Machlinia, 54;
Pynson, 65
Festum visitationis, Machlinia, 54
Fewterer, J., Myrrour of Christes Passion, R. Redman, 175
Ficinus, M., Epistolae, 1495, 103
Fifteen Joys of Marriage, W. de Worde, 135
Fifteen Oes, Caxton, 21, 22, 27
Fifteen Tokens, J. van Doesborch, 220
Fisher, John, Sermon, W. de Worde, 1508, 134
Fitzherbert, Sir A., Diversite de courtz, R. Redman, 1523, 172;
Great Abridgement, J. Rastell, 184
Fitzjames, R., Sermo die lune, W. de Worde, 28
Fletewode sale, 35
Foreign book-trade with England, 72-100, 187-8, 205-213, 214-
231, 235-240
Foundation of Our Lady’s Chapel at Walsingham, Pynson, 63, 64
Four Sons of Aymon, Caxton, 19, 20
Frankenberg, Henry, 77
Frankfurt fair, 192
Frederyke of Jennen, J. van Doesborch, 220, 221
Freeling, Sir F., 61
Froissart, J., Chronicle, Pynson, 164
Froschover, Christopher, 218
Frute of Redemption, R. Redman, 175
Fryth, John, Disputation of Purgatory, 184

G., E., engraver, 172


G., G., bookbinder, 233
G., I., bookbinder, 234
G., W., bookbinder, 49, 109, 234
Gachet, John, 212
Galfridus Anglicus, 79
Game and Playe of the Chesse, Caxton, 6, 12
Garlandia, J. de, 63, 79
Gaver, James, 107, 139-141
Gavere, Ioris de, 112
Ghent binding, 112
Ghent University Library, 21
Gibkerken, 227
Gift of Constantine, T. Godfray, 157, 203
Gloucester Cathedral Library, 82
Godfray, Thomas, 156, 157, 203
Golden Legend. See Voragine, J. de
Golden Litany, J. Skot, 151
Göttingen University Library, 9
Gouda printing, 30
Gough, John, 139, 184, 203, 204
Gough, Richard, 92, 199
Gourmont, Egidius, 196
Governayle of Health, Caxton, 90
Gower, J., Confessio amantis, Caxton, 15
Gradual, Sarum, 1527, 199, 205
Gradus comparationum, J. Toy, 1531, 150, 153
Graf, Urs, woodcuts by, 211
Grafton, Richard, 155, 181, 208, 209
Gray, William, 154, 155
Greek type, 235
Grenville Library, 61
Gringore, P., Castle of Labour, Verard, 206
Growte, John, 204
Groyat, John, 204
Gryphus, P., Oratio, Pynson, 163
Gueldres, Duke of, 67
Guilford, Sir Richard, 163
Guilibert, John, 112
Gulielmus de Saliceto, Salus corporis salus anime, R. Faques, 171
Guy of Warwick (Pynson), 70
Gybken, John, 227

H., A., bookbinder, 121, 233


H., I., printer, 37, 38
Hackett, John, 224
Haghe, Ingelbert, 82
Hain, L., Repertorium Bibliographicum, 39
Halberstadt Library, 14
Hampole, Richard de, Devout Meditacions, 134;
Speculum Spiritualium, 194
Hardouyn, Gilles, 205
Haukins, John, 158, 166, 167, 168
Havy, Noël, 139, 140, 235
Hawes, S., Pastime of Pleasure, W. de Worde, 1509, 135
Hazlitt, W. C., 136
Heber sale, 35, 40
Heerstraten, E. vander, 77
Helias, Knight of the Swan, W. de Worde, 1512, 136
Henry VII., 55, 68, 212
Henry VIII., 68, 164, 165, 212
Herbal, The Grete Herball, 1529, 156
Herbert, William, 35, 39, 114, 143, 152, 169, 174, 178, 204, 207
Hereford bookseller, 82, 83
Herford, John, 149
Herolt, John, Sermones discipuli, J. Notary, 1510, 143
Heron, John, 184
Hertzog de Landoia, Joh., 91-93
Heywood, J., Gentleness and Nobility, J. Rastell, 185;
Johan the Husband, Pardoner and the Friar, Play of Love, Play
of the Weather, W. Rastell, 186
Hieronymus de Sancto Marcho, De universali mundi machina,
Pynson, 161
Higden, R., Polycronicon, Caxton, 13;
Treveris for Reynes, 1527, 199
Higman, J., 18, 205
Higman and Hopyl, 87
Hillenius, Michael, 148, 176
Hilton, W., Scala perfectionis, J. Notary, 1508, 143
History of Jacob, J. Skot, 150
Hoe, Robert, 16, 136
Hoff, Upright, 228
Holder, Robert, 201
Holkham Library, 26
Hollybush, John, 225
Holt, J., Lac Puerorum, A. van Berghen, 91, 216;
J. van Doesborch, 220
Holwarde, Thomas, 201
Homiliarius (? Cologne, ab. 1475), 73
Hopyl, Wolfgang, 84, 87, 95, 96, 194-196, 205, 218
Horae, Paris editions, 84-86;
undated editions, 85;
J. Poitevin, 86
Horae, Sarum:
number of editions, 85;
Caxton, 17, 21, 33;
Leeu, 80;
Machlinia, 48, 49, 109;
Notary, 38, 39;
C. van Ruremond, 226;
W. de Worde, 27;
Venice, 1494, 91;
Paris, 1498, 96; 1506, 232;
1507, 194;
Paris, 1510, 194;
Paris, 1532, 1533, 1534, 204;
Rouen, 1536, 204;
Antwerp, 1530, 223
Horologium Devotionis, Zel, 142
Horse the Shepe and the Goose, Caxton, 10;
W. de Worde, 22
Howleglas, 89; J. van Doesborch, 220
Hundred mery tales, J. Rastell, 184
Hunte, Thomas, 98
Hunterian Museum, Glasgow, 19, 64, 155
Huvin, Jean, 37, 38
Hylton, W., Scala perfeccionis, W. de Worde, 26
Hymni cum notis, C. van Ruremond, 226
Hymns and sequences, J. Notary, 143

Imitatio Christi, Pynson, 114, 160


Imposition, wrong, instance of, 50
Indulgences, 104, 106;
Caxton, 12, 19;
Lettou, 12, 43, 108
Infancia Salvatoris, Caxton, 9
Informatio Puerorum, Pynson, 69
Information for Pilgrims, W. de Worde, 28
Initial letters, 93, 142;
filled in by hand, 51
Inner Temple Library, 39
Innocent VIII., 55
Institution of a Christian Man, T. Berthelet, 1537, 180
Interlude of the four elements, J. Rastell, 185
Interlude of women, J. Rastell, 185
Introductorium linguae latinae, W. de Worde, 28
Ipswich, 228
Jacobi, Henry, 105, 108, 148, 194-199, 232;
bindings, 119, 197, 198
Jacobus, illuminator, 112
Jean le Bourgeois, 169
Jeaste of Sir Gawayne, J. Butler, 152
Jehannot, Jean, 96
Jerome of Brunswick, Boke of Distillacyon, Andrewe, 155, 221
Joannes de Lorraine, 82
John of Aix-la-Chapelle, 98
John Rylands Library, 26, 30, 53, 55, 68, 84, 161, 162.
See also Althorp Library
Johnson, Maurice, 152
Joye, G., 229, 230
Justice of Peace, R. Copland, 1515, 147

Kaetz, Petor, 222, 226-7


Kalendar of Shephardes, Pynson, 1506, 161
Kamitus, Treatise of the Pestilence, Machlinia, 53
Katherine of Aragon, 159
Kay, J., trans. Siege of Rhodes, 45
Kele, Thomas, 184
Kempe, Adriaen, 231
Kempe, Margerie, 132
Kendale, John, 43
Kerver, Thielman, 171, 205
Kerver, Thielman, Widow of, 204
Keyser, Martin de, 153
King Apolyn of Tyre, W. de Worde, 1510, 7, 136, 146
King’s bookbinder, 181
King’s printers, 133, 158, 162, 169, 170, 171, 175, 177, 178, 181
King’s stationer, 169
Kinnaird Castle Library, 81
Knight Paris and Fair Vienne, Caxton, 16
Knoblouch, Johann, 211

L., R., bookbinder, 233


Lambertus de Insula, 111
Lambeth Palace Library, 4, 61, 92, 162
Landen, John, 142
Langton, William, 110
Langwyth, Agnes, 177
Lant, Richard, 155, 233
Lauret, Giles, 235
Laurentius of Savona, Rhetorica Nova, Caxton, 10
Lauxius, David, 96
Lecomte, Nicholas, 95-97;
bindings, 116
Leeu, Gerard, 36, 78, 80, 88-91, 215
Lefèvre, R., History of Jason, 88
Legenda Francisci, Barbier for Jacobi, 195
Legenda, Sarum, 18
Legrand, J., Book of good manners, W. de Worde, 36
Leicester, Earl of, 26
Leland, John, 156
Le Roux, Nicolaus, 204
Le Talleur, G., 55, 57, 59
Lettou, John, 11, 41-44, 130;
bindings, 108;
with Machlinia, 44-47, 51
Levet, Pierre, 84
Lewis, J., Life of Caxton, 39
Liber Assisarum, J. Rastell, 184
Liber Equivocorum, Baligault, 84;
Paffroed, 79;
Pynson, 63
Liber Festivalis. See Mirk, J.
Liber Synonymorum, Martens, 1493, 79;
Hopyl, 1494, 84, 95;
Pynson, 1496, 63
Lidgate, J., Assembly of the Gods, 15;
Chorle and the Birde, 10, 16;
Falle of Princes, Pynson, 1494, 62;
Horse, Shepe, & Ghoos, Caxton, 10;
W. de Worde, 32, 37;
Life of our Lady, Caxton, 14;
Sege and Destruccyon of Troye, Pynson, 1513, 163
Life of ... Charles the Great, Caxton, 16
Life of Christ, R. Redman, 175
Life of Hyldebrande, W. de Worde, 138
Life of Petronylla, Pynson, 64
Life of St Katherine, W. de Worde, 24
Life of St Margaret, Pynson, 61
Life of St Wenefrede, Caxton, 15
Life of Virgilius, J. van Doesborch, 220, 221
Lily & Erasmus, De octo orationis partium constructione,
Cambridge, 125
Lily, W., Grammar, H. Pepwell, 1539, 149
Lily, W., Introduction of the Eight parts of Speech, T. Berthelet,
181
Lincoln Cathedral Library, 49, 132
Linton, W. J., 13
Litill, Clement, 81
Littleton, Sir T., Tenores Novelli, Letton and Machlinia, 44, 46;
Tenures, Machlinia, 48;
Pynson, 57, 173;
Redman, 173
London: introduction of printing, 11, 41;
bindings, 102
Louvain: printing, 5, 77, 80, 219;
binding, 111
Lucianus, Necromantia, J. Rastell, 184
Luft, Hans, 228
Lugo, Peregrinus de, Principia, Pynson, 1506, 69, 161
Lumley, Lord, 14
Lyndewode, W., Constitutiones Provinciales, W. Hopyl, 1506, 194,
197, 205;
Constitutions, R. Redman, 1534, 176

M., I., border-piece, 176


Maas, Robert, 139
MacCarthy, Count Justin, 73, 74, 162
Macé, Robert, 206
Machlinia, W. de: with Lettou, 44-47;
alone, 47-56, 77, 109, 130;
bindings, 108
Machyn, Henry, 183
Madan, F., 2, 98
Madden, J. P. A., 95
Magdalen College School, 79
Magna Charta, R. Redman, 1525, 173
Malory, Sir T., Morte d’Arthur, Caxton, 16;
W. de Worde, 30
Manchester. See John Rylands Library
Maudeville, Sir J., Travels, W. de Worde, 1499, 32;
Pynson, 64
Manipulus Curatorum, W. de Worde, 1502, 132
Mansion, Colard, 5, 6
Manual, Sarum, B. Rembolt, Paris, 86;
Rouen, 1500, 82;
Pynson, 1506, 161;
C. van Ruremond, 1523, 222, 226;
for M. Dotier, 1543, 235
Manual, York, W. de Worde, 1509, 136, 212
Marcant, Nicole, 84
Marchant, John, 204
Marsh Library, Dublin, 143, 234
Marshall, William, 203, 204
Martens, Thierry, 79
Martinus de Predio, 112
Martynson, Simon, 139
Mary of Nemmegen, J. van Doesborch, 220
“Master of St Erasmus,” engraver, 142
Maydeston, C., Directorium sacerdotum, Caxton, 9;
Leeu, 80;
Pynson, 70, 71, 159, 161
Maynyal, George, 17
Maynyal, William, 17, 18
Medwall, H., Interlude of Nature, W. Rastell, 186
Merry gest ... Johan Splynter, J. Notary, 144
Merry jests, J. Rastell, 184
Mery geste of a Sergeaunt and Frere, J. Notary, 145
Meslier, Hugo, 161
Metal engravings, 26, 65, 142
Middleton, William, 124, 125, 176
Miraculous work ... at Court of Strete in Kent, 151
Mirk, J., Liber Festivalis, Caxton, 14, 105;
Hopyl, 96;
Morin, 80, 82;
Notary, 38;
Pynson, 61, 62;
Ravynell, 83;
W. de Worde, 25, 62, 83
Mirror of Christes Passion, R. Redman, 175
Mirror of Consolation, W. de Worde, 28
Mirror of Golde, 1522, 137, 150
Mirror of the Life of Christ, Pynson, 1503, 161
Mirror of the World, Caxton, 12;
L. Andrewe, 140, 156
Mirrour of Our Lady, R. Faques, 1530, 172
Missal, Sarum (? Basle, ab. 1486), 78;
Maynyal for Caxton, 1487, 17, 80, 81, 84;
M. Morin, 1492, 80, 81;
Hertzog for Egmont, 1494, 92, 93;
Notary and Barbier, 1498, 38;
Pynson, 1500, 68, 159;
Higman and Hopyl, 1500, 87;
Jean du Pré, 1500, 87, 206;
Birckman and Cluen, 1504, 217;
Pynson, 1504, 161;
Violette, 1509, 207;
W. de Worde and R. Faques, 1511, 171;
C. van Ruremond, 1527, 223;
for W. de Worde and M. de Paule, 207
Missal, York, 1530, 206
Modus tenendi unum hundredum, R. Redman, 174
Montaigne, M. de, 164
Montpellier, Library of Faculty of Medicine, 103
Moore, John, bp of Ely, 8
More, Sir Thomas, 158, 183;
Works, 1557, 186;
Apology, 175, 180;
Debellacyon of Salem and Bizance, 180
Morgan, J. P., 106
Morin, Martin, 80-82, 205-6
Morin, Michael, 206
Morton, Cardinal, 68, 159
Musée Plantin, 80
Music. See Book of Songs, 138

N., H., bookbinder, 233


N., I., border-piece, 176
Natura Brevium, R. Redman, 175
Necessary Doctrine and Erudition, 1543, 180
Necton, Robert, 224
Nele, Richard, 193
Newton, Lord, 17
Nicholson, James, 208
Nicholson, John, 225
Nicodemus Gospel, J. Notary, 142;
J. Skot, 150-1;
W. de Worde, 134
Norwich binding, 108
Notary, Julian, 31, 33, 129, 131, 173;
at Westminster, 37-40;
at London, 141-6;
bindings, 119, 145, 232;
device, 37-8;
method of dating, 135, 141
Nova Festa, Machlinia, 54;
Pynson, 61, 65
Nova Rhetorica, St Alban’s, 1480, 52
Nova Statuta, Machlinia, 48, 51
Novimagio, Reginaldus de, 74
Nowell, bookbinder, 107, 139, 140
Nut-browne Maide, 151, 215
O., R., bookbinder, 233
Of the newe landes, J. van Doesborch, 220
Offor collection, 39
Oliver, Reginald, 233
Oliver of Castile, W. de Worde, 1518, 137
Olivier, Petrus, 82, 205
Orchard of Syon, W. de Worde, 1519, 137
Ordinale, Sarum, Caxton, 9, 22
Ordynaunce ... Kynge’s Eschequier, Middleton, 124
Origen, De beata Maria Magdalena, W. Faques, 170
Ortus Vocabulorum, 194, 197
Os, Govaert van, 30, 33
Osborne, Thomas, 9
Osterley Park Library, 16
Oswen, John, 228
Ovidius, Metamorphoses, 14
Owen, David, 193
Oxford libraries:
Bodleian, 10, 21, 25, 28, 58, 59, 61, 68, 81, 82, 83, 90, 95, 106,
108, 112, 132, 153, 154, 180, 198, 199, 210, 212, 216,
231, 232
Brasenose College, 80
Corpus Christi College, 49, 92, 112, 115, 139
Merton College, 8
New College, 17, 125, 196
St John’s College, 160, 200
Oxford, printing, 1, 2, 41, 79, 187;
booksellers, 69, 77, 98, 161, 196;
bindings, 103, 104

Paffroed, R., 79
Palsgrave, J., L’eclarcissement de la langue Française, 166
Panzer, G. W., 217
Paper-making in England, 29
Paris printing, 17, 18, 84, 85, 87, 96, 97, 161, 193, 194, 195, 196,
199, 205, 210, 214
Paris and Vienne, G. Leeu, 88
Parker, H., Dives and Pauper, Pynson, 1493, 54, 61
Parliament of Devils, W. de Worde, 135
Parron, William, 68
Parson of Kalenborowe, J. van Doesborch, 220, 221
Parvula, N. Marcant, 84
Parvulorum institutio, J. Butler, 1529, 152
Passio Jesu Christi, Strasburg, 1506, 211
Passion of our Lord (ab. 1508), 211
Pastime of People, J. Rastell, 184
Paule, Michael de, 207
Paynell, T., Assault and Conquest of Heaven, 1529, 178;
trans. of Regimen sanitatis Salerni, T. Berthelet, 177, 178
Pelgrim, Joyce, 193-198, 232
Penketh, Thomas, 42
Pepwell, Arthur, 150
Pepwell, Henry, 139, 147-150, 199, 202
Pepwell, Ursula, 149
Pepysian Library. See Cambridge libraries
Perez de Valentia, J., 42
Perott, N., Regulae Grammaticales, Louvain, 77
Peter Post Pascha, 66, 67, 93
Peterborough Cathedral Library, 132
Petyt, Thomas, 176
Pigouchet, Philippe, 115, 205
Pilgrimage of Sir Richard Guylforde, Pynson, 1511, 163
Play concerning Lucretia, J. Rastell, 185
Poitevin, Jean, 86
Pollard, John, 235
Pomander of Prayer, R. Redman, 175
Powell, Thomas, 181, 183
Prevost, Nicolas, 199, 205
Prices of paper and printing, 169, 179
Processional, Sarum, Pynson, 1502, 160;
N. Prevost, 1530, 218;
C. van Ruremond, 1523, 222, 225-6;
Antwerp, for J. Reynes, 200
Proclamation on the coinage, W. Faques, 1504, 169
Proclamations, T. Berthelet, 179
Proctor, R., 17, 125, 196
Prognostications, 68, 226-7
Promise of Matrimony, Machlinia, 48, 51
Promptorium parvulorum, 67
Promptorius puerorum, Pynson, 1499, 66, 93
Propositio Johannis Russell, Caxton, 4, 9
Prymer, J. Byddell, 1535, 204
Psalter, Latin, Caxton, 13;
W. Faques, 1504, 169, 170
Psalter, Sarum, C. van Ruremond, 226
Psalterium beate marie virginis, S. Voster, 210
Psalterium cum hymnis, 1507, 194;
1530, 199
Pudsey, Bishop, 102
Pynson, Margaret, 166
Pynson, R., 55-71, 158-169, 173, 174, 177, 189, 206, 235, 236
Arms, 162
Bindings, 109, 113-115, 165, 232
Borders, 49, 56, 176
Books printed by, 93, 124, 145, 195
Devices, 59, 62, 65, 174
King’s printer, 133, 162, 171
Method of dating, 68, 159, 160
Printing office, 40, 71, 141, 158, 159, 173
Types, 58, 60, 61, 62, 70
Woodcuts, 57, 62, 64
Pynson, R., junior, 166, 177

Quarto leaves in a folio volume, 52


Quatre derrenières choses, Caxton, 6
Quattuor Sermones. See Mirk, J., Liber Festivalis
Quentell, H., 65, 79

R., A., bookbinder, 116


R., G., bookbinder, 233
R., P., device, 83
Raimund, John. See Ruremond, Hans van
Rastell, Elizabeth, 183
Rastell, John, 152, 156, 158, 183-186, 203;
New Boke of Purgatory, 184
Rastell, John, junior, 185
Rastell, William, 158, 180, 185, 186
Ratcliffe, John, 79, 162
Ravynell, James, 83
Rawlinson Collection, 134
Recuyell of the Historyes of Troye, Caxton, 3, 6
Redman, Elizabeth, 176
Redman, John, 125, 177
Redman, Robert, 155, 158, 165, 172-177, 203
Regnault, Francis, 207-209
Regula Benedicti, W. de Worde for Jacobi, 196
Regulae et ordinationes, Machlinia, 55
Rembolt, Berthold, 87, 205
Remonde. See Ruremond
Revelation of St Nicholas, Machlinia, 48, 50
Reynard the Fox, Caxton, 13;
W. de Worde, 37
Reynes, John, 119, 193, 199-202, 219;
bindings, 232-234
Reynes, Lucy, 201, 202
Richard, Jean, 81, 82, 205, 207
Richard Cœur de Lion, W. de Worde, 1509, 135
Richardson, John, 235
Richmond, Countess of, 133, 134
Ripon Cathedral Library, 70, 159
Rivers, Earl, 6
Robin Hood, J. van Doesborch, 220
Roce, Denis, 150
Rolle, Richard. See Hampole, Richard de
Rome, 41
Rood, Theodore, 104
Rosary, J. Skot, 1537, 151
Rosse, Denis, 150
Rote or mirror of consolation, W. de Worde, 33, 34
Rouen: printing, 37, 55, 80, 82, 83, 204-6, 214;
bindings, 233
Rouse, John, 235
Row, John, bookbinder, 224, 235
Roxburghe sale, 35, 39
Royal Book, Caxton, 16, 106
Rue, Andrew, 193
Rue, John, 193
Rule of St Benet, Caxton, 21;
Pynson, 160
Rupertus, De victoria verbi Dei, 1541, 219
Ruremond, C. van, 130, 200, 222-227, 230;
Widow of, 230
Ruremond, Hans van, 218, 222-7
Russell, J., bp of Lincoln, 4

St Alban’s, printing, 41, 149, 187;


binding, 109
St Alban’s Grammar School Library, 106, 107
St Andrews printing, 151
Saint Germain, C., Answer, 157;
Division, 175, 180;
Dialogue, 180
St Paul’s Churchyard, 191
Savonarola, Sermo, R. Pynson, 1509, 163;
Tracts, H. Jacobi, 1510, 198
Sayle, C. E., 228, 239
Scala Perfectionis, J. Notary, 1508, 143
“Scales” binder, 110
Schoeffer, J., 229
Schoiffer, P., 4
Scotland, introduction of printing, 7
Scott, E. J. L., 130
Scriptores rei rusticae, Reggio, 1496, 80
Sedley, John, 194
Selden, John, 106
Sermo pro episcopo puerorum, W. de Worde, 28
Sermones dormi secure, 193
Service books printed abroad for the English market, 78, 80-82,
84-87, 91-93, 205-210, 212-213, 222, 225, 226
Seven Points of True Love, Caxton, 21
Seven wise masters of Rome, W. de Worde, 36
Sex quam elegantissimae epistolae, Caxton, 14
Shepherdes Calendar, 145
Shirburn Castle Library, 184
Short treatyse (Margerie Kempe), W. de Worde, 132
Shrewsbury School Library, 133
Siberch, John, 99, 130, 226
Siege of Rhodes, 45
Signatures first used, 3;
in England, 11
Signs:
A.B.C., R. Faques, 171
Fat Hen, Birckman, 219
George, Pynson, 71, 159, 173;
R. Redman, 173
Golden Cross, L. Andrewe, 155
Golden Missal, A. van Berghen, 215
Great Golden Mortar, A. van Berghen, 215
Iron Balance, R. van den Dorp, J. van Doesborch, 220
Lucrece, T. Berthelet, 178
Maiden’s Head, R. Faques, 171, 234
Mermaid, J. Rastell, 144, 184
Our Lady of Pity, W. de Worde, 135;
J. Byddell, 144;
J. Redman, 177
Red Pale, Caxton, 6
Rose Garland, R. Copland, 146, 147
St Anne, J. Pelgrim, 195
St John Evangelist, G. Chasteleyn, 69;
J. Butler, 152;
R. Wyer, 156
St Katherine, 198
St Mark, J. Notary, 144
St Nicholas, N. Lecomte, 95;
J. Toy, 153
Striped Ass, P. de Couvelance, 198, 199
Sun, W. de Worde, 33, 131, 146;
J. Byddell, 140, 144;
J. Gaver, 140
Three Kings, J. Notary, 141, 143, 144
Trinity, 198, 199;
H. Pepwell, 147;
H. Jacobi, 148, 195;
H. Smith, 176
Wodows, P. Treveris, 115
Silverlink, John, 218
Singer, S. W., 2
Sirectus, Antonius, Formalitates, 196
Sizes of books, 49
Skelton, John, 64;
Bowge of Court, W. de Worde, 37;
Magnificence, J. Rastell, 185
Skot, John, 137, 138, 150-53
Smarte, Epitaph of Jasper, Duke of Bedford, Pynson, 63
Smith, Henry, 176
Smith, Richard, 142, 149
Smyth, Thomas, 154, 155
Snowe, John, 166
Society of Antiquaries Library, 55, 102, 155
Solomon and Marcolphus, G. Leeu, 88, 89
Southwark printing, 177, 199, 208
Speculum Christiani, Machlinia, 53, 77
Speculum Spiritualium, W. Hopyl, 1510, 194
Speculum vitae Christi. See Bonaventura
Spencer, Earl, 8, 16, 74.
See also Althorp Library
Spering, Nicolas, 117, 120, 216
Spiritus Guidonis (Pynson), 59
Squire, Henry, 158, 189
Stanbridge, John, 79, 206;
Accidence, J. Gaver, 140;
J. Skot, 150;
Shorter Accidence, 1534, 153
Stans Puer ad Mensam, 10
Statham, N., Abridgement, Rouen, for Pynson, 57
Stationer, business of, 72, 76
Stationer to the King, 1485, 77
Stationer, University, at Oxford, 77
Stationers:
foreign, in England, 54;
fifteenth century, 72-100;
of London, 187-213;
aliens, 187-191;
from Antwerp, 214-231
Stationers’ Company, 76, 94, 95, 148, 188, 189, 227
Statutes first written in English, 56
Statutes, Machlinia, 54;
W. Faques, 169, 170;
T. Berthelet, 178
Statutes of War, Pynson, 1513, 163
Stewarde, William, 141
Stewart, W., bp of Aberdeen, 124
Stillingfleet, Bishop, 143
Stoke, Thomas, 235
Stokeslay, Bishop, 148, 149
Stondo, Bernard van, 53, 77
Stonyhurst Library, 32, 161
Storys and prophesis, S. Cock, 1536, 231
Strasburg printing, 211
Strype, John, 191
Sturbridge fair, 192
Suethon, Ludovicus, 199, 202
Sulpitius, J., Grammar, W. de Worde, 1504, 133
Sutherland, Duke of, 38
Sutton, Edward, 201
Sutton, Lewis, 148, 199, 202-3
Sutton, Nicholas, 154, 203
Sykes sale, 40
Symmen, Henric van, 90
Symonds, Thomas, 192, 202

Tab, Henry, 149


Tanner, Thomas, 11, 90
Tate, J., papermaker, 29
Taverner, John, 193, 194
Taverner, Richard, 154
Temple of Brass, Caxton, 10
Temple of Glas, Caxton, 10
Terentius, Pynson, 66;
Paris, 1504, 206;
Hecyra, Pynson, 1495, 63;
Vulgaria, Machlinia, 48, 51, 54;
G. Leeu, 78;
Oxford, 79;
W. Faques, 170
Three Kings of Cologne, W. de Worde, 28, 34, 90
Thwaytes, Edward, 151
Thynne, William, 156
Tindale, W., 228, 229, 230
Title-page, first English, 53;
first Westminster, 25
Title-pages, Collection of, in British Museum, 8
Toy, John, 150, 153, 154, 203
Treatise of Love, W. de Worde, 24, 25
Tree and xii frutes of the holy goost, 172
Treveris, Peter, 115, 156, 199, 216
Trevisa, John, 29
Trinity stationers. See Jacobi, Henry; Pelgrim, Joyce
Triphook, bookseller, 53
Troost, Ian, 228
Troylus and Cressede, W. de Worde, 1517, 137
Tuke, Sir Brian, 156
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like