Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
OpenCV 3.0 Computer Vision with Java

You're reading from  OpenCV 3.0 Computer Vision with Java

Product type Book
Published in Jul 2015
Publisher
ISBN-13 9781783283972
Pages 174 pages
Edition 1st Edition
Languages
Author (1):
Daniel Lelis Baggio Daniel Lelis Baggio
Profile icon Daniel Lelis Baggio

Table of Contents (15) Chapters

OpenCV 3.0 Computer Vision with Java
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
1. Setting Up OpenCV for Java 2. Handling Matrices, Files, Cameras, and GUIs 3. Image Filters and Morphological Operators 4. Image Transforms 5. Object Detection Using Ada Boost and Haar Cascades 6. Detecting Foreground and Background Regions and Depth with a Kinect Device 7. OpenCV on the Server Side Index

Thresholding


One of the simplest methods of segmenting a grayscale image is using the threshold technique. It will basically set pixels below a given value as belonging to the interested object and the other pixels as not being part of it. Although it might suffer from illumination issues as well as problems that arise from variation inside the object, this can be enough when segmenting text in a page scan for OCR or to find a checkboard when calibrating the camera. Besides, some more interesting approaches, such as the adaptive threshold, can also yield good results in images that suffer from non-homogeneous lightning.

Basic thresholding is accomplished by means of Imgproc's threshold function, whose signature is as follows:

public static double threshold(Mat src,
                               Mat dst,
                               double thresh,
                               double maxval,
                               int type)

The Mats src and dst parameters are the input and output...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}