Book Image

OpenCV for Secret Agents

By : Joseph Howse
Book Image

OpenCV for Secret Agents

By: Joseph Howse

Overview of this book

Table of Contents (15 chapters)
OpenCV for Secret Agents
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Detecting lights as blobs


To the human eye, light can appear both very bright and very colorful. Imagine a sunny landscape or a storefront lit by a neon sign; they are bright and colorful! However, a camera captures a range of contrast that is much narrower and not as intelligently selected such that the sunny landscape or neon-lit storefront can look washed-out. This problem of poorly controlled contrast is especially bad in cheap cameras and cameras that have small sensors, as webcams do. As a result, bright light sources tend to be imaged as big white blobs with thin rims of color. Moreover, these blobs tend to take the shape of the lens's iris, typically a polygon approximating a circle.

The thought of all lights becoming white and circular makes the world seem like a poorer place, if you ask me. Nonetheless, in computer vision, we can take advantage of such a predictable pattern. We can look for white blobs that are nearly circular, and we can infer their human-perceptible color from...