Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying OpenCV 4 for Secret Agents
  • Table Of Contents Toc
  • Feedback & Rating feedback
OpenCV 4 for Secret Agents

OpenCV 4 for Secret Agents

By : Joseph Howse, Ponnusamy
close
close
OpenCV 4 for Secret Agents

OpenCV 4 for Secret Agents

By: Joseph Howse, Ponnusamy

Overview of this book

OpenCV 4 is a collection of image processing functions and computer vision algorithms. It is open source, supports many programming languages and platforms, and is fast enough for many real-time applications. With this handy library, you’ll be able to build a variety of impressive gadgets. OpenCV 4 for Secret Agents features a broad selection of projects based on computer vision, machine learning, and several application frameworks. To enable you to build apps for diverse desktop systems and Raspberry Pi, the book supports multiple Python versions, from 2.7 to 3.7. For Android app development, the book also supports Java in Android Studio, and C# in the Unity game engine. Taking inspiration from the world of James Bond, this book will add a touch of adventure and computer vision to your daily routine. You’ll be able to protect your home and car with intelligent camera systems that analyze obstacles, people, and even cats. In addition to this, you’ll also learn how to train a search engine to praise or criticize the images that it finds, and build a mobile app that speaks to you and responds to your body language. By the end of this book, you will be equipped with the knowledge you need to advance your skills as an app developer and a computer vision specialist.
Table of Contents (16 chapters)
close
close
Free Chapter
1
Section 1: The Briefing
4
Section 2: The Chase
9
Section 3: The Big Reveal
12
Making WxUtils.py Compatible with Raspberry Pi
13
Learning More about Feature Detection in OpenCV
14
Running with Snakes (or, First Steps with Python)

To get the most out of this book

This book supports several operating systems as development environments, including Windows 7 SP 1 or later, macOS X 10.7 (Lion) or later, Debian Jessie, Raspbian, Ubuntu 14.04 or later, Linux Mint 17 or later, Fedora 28 or later, Red Hat Enterprise Linux (RHEL) 8 or a later version, CentOS 8 or later, openSUSE Leap 42.3, openSUSE Leap 15.0 or later, and openSUSE Tumbleweed.

The book contains six projects with the following requirements:

  • Four of these six projects run on Windows, macOS, or Linux, and require a webcam. Optionally, these projects can use Raspberry Pi or another single-board computer that runs Linux.
  • One project runs on Android 5.0 (Lollipop) or a later version, and requires a front-facing camera (which most Android devices have).
  • One project runs on Android 4.1 (Jelly Bean) or a later version, and requires a rear-facing camera and gravity sensor (which most Android devices have). For development, it requires a Windows or macOS machine and approximately $95 worth of game development software.

Setup instructions for all required libraries and tools are covered in the book. Optional setup instructions for Raspberry Pi are also included.

Download the example code files

You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packtpub.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/OpenCV-4-for-Secret-Agents-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "You can edit /etc/modules to check whether bcm2835-v4l2 is already listed there."

A block of code is set as follows:

set PYINSTALLER=pyinstaller

REM Remove any previous build of the app.
rmdir build /s /q
rmdir dist /s /q

REM Train the classifier.
python HistogramClassifier.py

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

        <activity
android:name=".CameraActivity"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Any command-line input or output is written as follows:

$ echo "bcm2835-v4l2" | sudo tee -a /etc/modules 

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Click the Android platform and then the Switch Platform button."

Warnings or important notes appear like this.
Tips and tricks appear like this.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY