OpenCV 3.0 Computer Vision with Java
eBook - ePub

OpenCV 3.0 Computer Vision with Java

  1. 174 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

OpenCV 3.0 Computer Vision with Java

Book details
Book preview
Table of contents
Citations

About This Book

About This Book

  • Set up Java API for OpenCV to create popular Swing-based Graphical User Interfaces (GUIs)
  • Process videos and images in real-time with closer to native performance
  • Make use of rock solid Java web application development practices to create engaging augmented reality experience and work with depth images from a Kinect device

Who This Book Is For

If you are a Java developer, student, researcher, or hobbyist wanting to create computer vision applications in Java then this book is for you. If you are an experienced C/C++ developer who is used to working with OpenCV, you will also find this book very useful for migrating your applications to Java.

All you need is basic knowledge of Java, with no prior understanding of computer vision required, as this book will give you clear explanations and examples of the basics.

What You Will Learn

  • Create powerful GUIs for computer vision applications with panels, scroll panes, radio buttons, sliders, windows, and mouse interaction using the popular Swing GUI widget toolkit
  • Stretch, shrink, warp, and rotate images, as well as apply image transforms to find edges, lines, and circles, and even use Discrete Fourier Transforms (DFT)
  • Detect foreground or background regions and work with depth images with a Kinect device
  • Learn how to add computer vision capabilities to rock solid Java web applications allowing you to upload photos and create astonishing effects
  • Track faces and apply mixed reality effects such as adding virtual hats to uploaded photos
  • Filter noisy images, work with morphological operators, use flood fill, and threshold the important regions of an image
  • Open and process video streams from webcams or video files

In Detail

OpenCV 3.0 Computer Vision with Java is a practical tutorial guide that explains fundamental tasks from computer vision while focusing on Java development. This book will teach you how to set up OpenCV for Java and handle matrices using the basic operations of image processing such as filtering and image transforms. It will also help you learn how to use Haar cascades for tracking faces and to detect foreground and background regions with the help of a Kinect device. It will even give you insights into server-side OpenCV. Each chapter is presented with several projects that are ready to use. The functionality of these projects is found in many classes that allow developers to understand computer vision principles and rapidly extend or customize the projects for their needs.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access OpenCV 3.0 Computer Vision with Java by Daniel Lelis Baggio in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Vision & Pattern Recognition. We have over one million books available in our catalogue for you to explore.

Information

OpenCV 3.0 Computer Vision with Java


Table of Contents

OpenCV 3.0 Computer Vision with Java
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Setting Up OpenCV for Java
Getting OpenCV for Java development
Building OpenCV from the source code
The Java OpenCV project in Eclipse
The NetBeans configuration
A Java OpenCV simple application
Building your project with Ant
The Java OpenCV Maven configuration
Creating a Windows Java OpenCV Maven project pointing to the Packt repository
Creating a Java OpenCV Maven project pointing to a local repository
Summary
2. Handling Matrices, Files, Cameras, and GUIs
Basic matrix manipulation
Pixel manipulation
Loading and displaying images from files
Displaying an image with Swing
Capturing a video from a camera
Video playback
Swing GUI's integration with OpenCV
Summary
3. Image Filters and Morphological Operators
Smoothing
Averaging
Gaussian
Median filtering
Bilateral filtering
Morphological operators
Flood filling
Image pyramids
Thresholding
Summary
4. Image Transforms
The Gradient and Sobel derivatives
The Laplace and Canny transforms
The line and circle Hough transforms
Geometric transforms – stretch, shrink, warp, and rotate
Discrete Fourier Transform and Discrete Cosine Transform
Integral images
Distance transforms
Histogram equalization
References
Summary
5. Object Detection Using Ada Boost and Haar Cascades
The boosting theory
AdaBoost
Cascade classifier detection and training
Detection
Training
References
Summary
6. Detecting Foreground and Background Regions and Depth with a Kinect Device
Background subtraction
Frame differencing
Averaging a background method
The mixture of Gaussians method
Contour finding
Kinect depth maps
The Kinect setup
The driver setup
The OpenCV Kinect support
The Kinect depth application
Summary
7. OpenCV on the Server Side
Setting up an OpenCV web application
Creating a Maven-based web application
Adding OpenCV dependencies
Running the web application
Importing the project to Eclipse
Mixed reality web applications
Image upload
Image processing
The response image
Summary
Index

OpenCV 3.0 Computer Vision with Java

Copyright © 2015 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: July 2015
Production reference: 1270715
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-397-2
www.packtpub.com

Credits

Author
Daniel LĂ©lis Baggio
Reviewers
Ngoc Dao
Dileep Kumar Kotha
Domenico Luciani
Sebastian Montabone
Commissioning Editor
Kunal Parikh
Acquisition Editor
Harsha Bharwani
Content Development Editor
Nikhil Potdukhe
Technical Editor
Parag Topre
Copy Editors
Sarang Chari
Sonia Mathur
Swati Priya
Neha Vyas
Project Coordinator
Judie Jose
Proofreader
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Disha Haria
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta

About the Author

Daniel Lélis Baggio started his work in computer vision through medical image processing at Instituto do Coração (InCor), which is a heart institute in São Paulo, Brazil, where he worked with intravascular ultrasound (IVUS) image segmentation. After this, he focused on GPGPU and ported that algorithm to work with NVIDIA's CUDA. He also dived into the topic of six degrees of freedom (6DoF), head tracking through a project called EHCI (http://code.google.com/p/ehci/) with the Natural User Interface group.
He is also the author of Mastering OpenCV with Practical Computer Vision Projects, Packt Publishing.

Acknowledgment

I'd first like to thank God for all the opportunities He has given me as well as for giving me our happy family.
I'd certainly like to thank Professor Sergio Furuie for introducing me to this wonderful world of computer vision. I'd also like to thank Professor Carlos Henrique Forster for his courses on the subject.
A big thanks goes to all the reviewers of this book, who took their time to put constructive and interesting corrections to its contents.
I would also like to thank the people from Packt Publishing—especially Parag Topre, Nikhil Potdukhe, Sriram Neelakantan, Harsha Bharwani, Sageer Parkar, and Nadeem Bagban—without whom, this book would never have been finished. I would also like to thank them for their patience.
I would like to thank my parents, who brought me into this world and educated me. I also thank my brother for always being there for me.
I dedicate this book to my children, who will always be part of my heart.
I'd also like to thank my wife for supporting me day and night in our life's journey.

About the Reviewers

Ngoc Dao studied computer vision at the Computer Vision and Image Media Lab of the University of Tsukuba, Japan. He has created several high-speed and scalable image matching server systems using Scala, Akka, and MongoDB with OpenCV's Java binding. These systems can scale multiple machines and have successfully been used with many iOS and Android apps.
Other than computer vision, Ngoc is also interested in real-time distributed systems and web frameworks. He is the main author of Xitrum, which is an open source async and clustered web framework for Scala (http://xitrum-framework.github.io). He presented this framework at the Scala Matsuri 2014 conference in Tokyo (http://scalamatsuri.org/en/program/index.html).
Dileep Kumar Kotha currently works as a senior software engineer at a telecom firm in Bangalore, India. He is an undergraduate in computer science from the National Institute of Technology, Rourkela, 2012 batch. He started working on image processing during his summer internship at the presti...

Table of contents

  1. OpenCV 3.0 Computer Vision with Java