This chapter will teach you the basic elements of OpenCV and will show you how to
accomplish the most fundamental tasks: reading, displaying, and saving images. Before you
can start with OpenCV, you need to install the library. This is a simple process that is explained
in the first recipe of this chapter.
You also need a good development environment (IDE) to run your OpenCV applications. We
propose two alternatives here. The first is to use the well-known Microsoft Visual Studio
platform. The second option is to use an open source tool for C++ project development
called Qt. Two recipes will show you how to set up a project with these two tools, but you can
also use other C++ IDEs. In fact, in this cookbook, the tasks will be presented in a way that
is independent of any particular environment and operating system, so you are free to use
the one of your choice. However, be aware that you need to use the compiled version of the
OpenCV library that is appropriate to the compiler and operating system you are using. If you
obtain strange behaviors, or if your application crashes without apparent reasons, that could
be a symptom of incompatibilities.