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

Implementing the Angora Blue app


The Angora Blue app uses three new files: GeomUtils.py, MailUtils.py, and AngoraBlue.py, which should all be in our project's top folder. Given the app's dependencies on our previous work, the following files are relevant to Angora Blue:

  • cascades/haarcascade_frontalface_alt.xml

  • cascades/haarcascade_frontalcatface.xml

  • recognizers/lbph_human_faces.xml

  • recognizers/lbph_cat_faces.xml

  • ResizeUtils.py: This contains the utility functions to resize images, including camera capture dimensions

  • GeomUtils.py: This consists of the utility functions used to perform geometric operations

  • MailUtils.py: This provides the utility functions used to send e-mails

  • AngoraBlue.py: This is the application that sends an e-mail alert when a person or cat is recognized

First, let's create GeomUtils.py. This does not need any import statements. Let's add the following intersects function, which accepts two rectangles as arguments and returns either True (if they intersect) or False...