Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering OpenCV 4 with Python

You're reading from   Mastering OpenCV 4 with Python A practical guide covering topics from image processing, augmented reality to deep learning with OpenCV 4 and Python 3.7

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789344912
Length 532 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alberto Fernández Villán Alberto Fernández Villán
Author Profile Icon Alberto Fernández Villán
Alberto Fernández Villán
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Section 1: Introduction to OpenCV 4 and Python
2. Setting Up OpenCV FREE CHAPTER 3. Image Basics in OpenCV 4. Handling Files and Images 5. Constructing Basic Shapes in OpenCV 6. Section 2: Image Processing in OpenCV
7. Image Processing Techniques 8. Constructing and Building Histograms 9. Thresholding Techniques 10. Contour Detection, Filtering, and Drawing 11. Augmented Reality 12. Section 3: Machine Learning and Deep Learning in OpenCV
13. Machine Learning with OpenCV 14. Face Detection, Tracking, and Recognition 15. Introduction to Deep Learning 16. Section 4: Mobile and Web Computer Vision
17. Mobile and Web Computer Vision with Python and OpenCV 18. Assessments 19. Other Books You May Enjoy

Chapter 8

  1. The cv2.findContours() function finds contours in a binary image (for example, the resulting image after a thresholding operation).
  2. The four flags OpenCV provides for compressing contours are as follows:
  • cv2.CHAIN_APPROX_NONE
  • cv2.CHAIN_APPROX_SIMPLE
  • cv2.CHAIN_APPROX_TC89_KCOS
  • cv2.CHAIN_APPROX_TC89_L1
  1. The cv2.moments() function calculates all of the moments up to the third order of a polygon or rasterized shape.
  2. The moment, m00, gives the area of the contour.
  3. OpenCV provides the cv2.HuMoments() function to calculate the seven Hu moment invariants.
  4. The cv2.approxPolyDP() function returns a contour approximation of the given contour based on the given precision. This function uses the Douglas-Peucker algorithm. The epsilon parameter specifies the precision for establishing the maximum distance between the original curve and its approximation.
  5. The extreme_points() function...
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 $19.99/month. Cancel anytime
Banner background image