Learn OpenCV 4 by
Building Projects
Second Edition
Build real-world computer vision and image processing applications with OpenCV and C++
David Milln Escriv
Vincius G. Mendona
Prateek Joshi
BIRMINGHAM - MUMBAI
Learn OpenCV 4 by Building ProjectsSecond Edition
Copyright 2018 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 authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been 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.
Commissioning Editor: Aaron Lazar
Acquisition Editor: Sandeep Mishra
Content Development Editor: Pooja Parvatkar
Technical Editor: Abin Sebastian
Copy Editor: Safis Editing
Project Coordinator: Ulhas Kambali
Proofreader: Safis Editing
Indexer: Pratik Shirodkar
Graphics: Tom Scaria
Production Coordinator: Nilesh Mohite
First published: January 2016
Second edition: November 2018
Production reference: 1301118
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78934-122-5
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.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.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.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.
Contributors
About the authors
David Milln Escriv was eight years old when he wrote his first program on an 8086 PC using the BASIC language. He completed his studies in IT from the Universitat Politcnica de Valencia with honors in human-computer interaction supported by computer vision with OpenCV (v0.96). He has a master's degree in artificial intelligence, computer graphics, and pattern recognition, focusing on pattern recognition and computer vision. He also has more than nine years' experience in computer vision, computer graphics, and pattern recognition. He is the author of the Damiles Blog, where he publishes articles and tutorials on OpenCV, computer vision in general, and optical character recognition algorithms.
I would like thank to my wife, Izaskun, my daughter, Eider, and my son, Pau, for their unlimited patience and support at all times. They have changed my life and made it awesome every day. I love you all.
I would like to thank the OpenCV team and community that gives us this wonderful library. I would also like to thank my co-authors and Packt Publishing for supporting me and helping me to complete this book.
Vincius G. Mendona is a computer graphics university professor at Pontifical Catholic University of Paran (PUCPR). He started programming with C++ back in 1998, and ventured into the field of computer gaming and computer graphics back in 2006. He is currently a mentor at the Apple Developer Academy in Brazil, working with, and teaching, metal, machine learning and computer vision for mobile devices. He has served as a reviewer on other Pack books, including OpenNI Cookbook, and Mastering OpenCV and Computer Vision with OpenCV 3 and Qt5. I n his research, he has used Kinect, OpenNI, and OpenCV to recognize Brazilian sign language gestures. His areas of interest include mobile, OpenGL, image processing, computer vision, and project management.
I would like to thank my wife, Thais A. L. Mendona, for the support she gave me while writing this book. I also dedicate this work to my four girls, Laura, Helena, Alice, and Mariana, and to my stepson, Bruno.
My life and work would have no meaning without this great family.I would also like to thank Fabio Binder my teacher, boss, and mentor who introduced me to computer graphics and gaming fields, and who has helped me greatly throughout my career.
Prateek Joshi is an artificial intelligence researcher, an author of eight published books, and a TEDx speaker. He has been featured in Forbes 30 Under 30, CNBC, TechCrunch, Silicon Valley Business Journal, and many more publications. He is the founder of Pluto AI, a venture-funded Silicon Valley start-up building an intelligence platform for water facilities. He graduated from the University of Southern California with a Master's degree specializing in Artificial Intelligence. He has previously worked at NVIDIA and Microsoft Research.
About the reviewers
Marc Amberg is an experienced machine learning and computer vision engineer with a proven history of working in the IT and service industries. He is skilled in Python, C/C++, OpenGL, 3D Reconstruction, and Java. He is a strong engineering professional with a master's degree focused on computer science (Image, Vision, and Interactions) from Universit des Sciences et Technologies de Lille (Lille I).
Vincent Kok currently works as a software platform application engineer with Intel in the transportation industry sector. He graduated from the University Sains Malaysia (USM) with a degree in electronic engineering. Currently, he is pursuing his master's degree in embedded system engineering at USM. Vincent actively involves himself with the developer community and regularly participates in the Maker Faire, which is held in different parts of the world. He likes to design electronic hardware kits and gives soldering/arduino classes for beginners during his spare time.
Next page