Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenCV 3 Computer Vision Application Programming Cookbook

You're reading from   OpenCV 3 Computer Vision Application Programming Cookbook Recipes to make your applications see

Arrow left icon
Product type Paperback
Published in Feb 2017
Publisher
ISBN-13 9781786469717
Length 474 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Robert Laganiere Robert Laganiere
Author Profile Icon Robert Laganiere
Robert Laganiere
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Playing with Images FREE CHAPTER 2. Manipulating Pixels 3. Processing the Colors of an Image 4. Counting the Pixels with Histograms 5. Transforming Images with Morphological Operations 6. Filtering the Images 7. Extracting Lines, Contours, and Components 8. Detecting Interest Points 9. Describing and Matching Interest Points 10. Estimating Projective Relations in Images 11. Reconstructing 3D Scenes 12. Processing Video Sequences 13. Tracking Visual Motion 14. Learning from Examples

Detecting lines in images with the Hough transform


In our human-made world, planar and linear structures abound. As a result, straight lines are frequently visible in images. These are meaningful features that play an important role in object recognition and image understanding. The Hough transform is a classic algorithm that is often used to detect these particular features in images. It was initially developed to detect lines in images and, as we will see, it can also be extended to detect other simple image structures.

Getting ready

With the Hough transform, lines are represented using the following equation:

The ρ parameter is the distance between the line and the image origin (the upper-left corner), and θ is the angle of the perpendicular to the line. In this representation, the lines visible in an image have a θ angle between 0 and π radians, while the ρ radius can have a maximum value that equals the length of the image diagonal. Consider, for example, the following set of lines:

...

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 €18.99/month. Cancel anytime