Chapter 1. Preparing for the Mission
Q: I've been saying for years, sir, that our special equipment is obsolete. And now, computer analysis reveals an entirely new approach: miniaturization.
On Her Majesty's Secret Service (1969)
James Bond is not a pedestrian. He cruises in a submarine car, he straps on a rocket belt, and oh, how he skis, how he skis! He always has the latest stuff and he is never afraid to put a dent in it, much to the dismay of Q, the engineer.
As software developers in the 2010s, we are witnessing an explosion in the adoption of new platforms. Under one family's roof, we might find a mix of Windows, Mac, iOS, and Android devices. Mom and Dad's workplaces provide different platforms. The kids have three game consoles or five if you count the mobile versions. The toddler has a LeapFrog learning tablet. Smart glasses are becoming more affordable.
We must not be afraid to try new platforms and consider new ways to combine them. After all, most users do.
This book embraces multi-platform development. It presents weird and wonderful applications that we can deploy in unexpected places. It uses several of the computer's senses, but especially uses computer vision to breathe new life into the humdrum, heterogeneous clutter of devices that surround us.
Before Agent 007 runs amok with the gadgets, he is obligated to listen to Q's briefing. This chapter performs Q's role. This is the setup chapter.
By the end of this chapter, you will obtain all the tools to develop OpenCV applications in C++ or Python for Windows, Mac, or Linux, and in C++ or Java for Android. You will also be the proud new user of a Raspberry Pi single-board computer (this additional hardware is optional). You will even know a bit about Unity, a game engine into which we can integrate OpenCV.
If you find yourself a bit daunted by the extent of this setup chapter, be reassured that not all of the tools are required and no single project uses all of them in combination. Although Q and I live for the big event of setting up multiple technologies at once, you could just skim this chapter and refer back to it later when the tools become useful, one by one, in our projects.
Note
Where basic OpenCV setup and reference materials are concerned, this chapter includes excerpts from my introductory books, OpenCV Computer Vision with Python and Android Application Programming with OpenCV, published by Packt Publishing. All contents are retested, updated, and expanded to cover newer OpenCV versions and additional operating systems. Also, there are all new sections on the optional hardware and game engine used in this book.