Reader small image

You're reading from  OpenCV for Secret Agents

Product typeBook
Published inJan 2015
Reading LevelIntermediate
PublisherPackt
ISBN-139781783287376
Edition1st Edition
Languages
Right arrow
Author (1)
Joseph Howse
Joseph Howse
author image
Joseph Howse

Joseph Howse lives in a Canadian fishing village, where he chats with his cats, crafts his books, and nurtures an orchard of hardy fruit trees. He is President of Nummist Media Corporation, which exists to support his books and to provide mentoring and consulting services, with a specialty in computer vision. On average, in 2015-2022, Joseph has written 1.4 new books or new editions per year for Packt. He also writes fiction, including an upcoming novel about the lives of a group of young people in the last days of the Soviet Union.
Read more about Joseph Howse

Right arrow

Detecting circles and lines


From The Living Headlights (our project in Chapter 5, Equipping Your Car with a Rearview Camera and Hazard Detection), we are already familiar with one technique to detect circles. We treated the problem as a special case of blob detection and we used an OpenCV class, SimpleBlobDetector, which allows us to specify many detection criteria such as a blob's size, color, and circularity (or noncircularity, that is linearity).

A blob is a shape filled with a solid (or nearly solid) color. This definition implies that many circular or linear objects are not detectable as blobs. In the following photo we see a sunlit desk with a china teapot, china bowl, and pewter bowl:

The bowls and the lid of the teapot have approximately circular outlines in this top-down view. However, they are unlikely to pass the detection as blobs because the interior of each shape is multicolored, especially in uneven light.

Blob detection starts with a simple threshold filter (marking bright regions...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
OpenCV for Secret Agents
Published in: Jan 2015Publisher: PacktISBN-13: 9781783287376

Author (1)

author image
Joseph Howse

Joseph Howse lives in a Canadian fishing village, where he chats with his cats, crafts his books, and nurtures an orchard of hardy fruit trees. He is President of Nummist Media Corporation, which exists to support his books and to provide mentoring and consulting services, with a specialty in computer vision. On average, in 2015-2022, Joseph has written 1.4 new books or new editions per year for Packt. He also writes fiction, including an upcoming novel about the lives of a group of young people in the last days of the Soviet Union.
Read more about Joseph Howse