Chapter 1

  1. The main purpose of Python virtual environments is to create an isolated environment for Python projects. This means that each project can have its own dependencies, regardless of what dependencies every other project has. In other words, it is an isolated working copy of Python that allows you to work on a specific project without worry of affecting other projects.
  2. The connection between pip, virtualenv, pipenv, Anaconda, and conda is as follows:

 

  1. Notebook documents are documents that are produced by the Jupyter Notebook App, which contain both computer code and rich text elements. Because of this mix of code and text elements, notebooks are the ideal place to bring together both an analysis description and its results. Moreover, they can be executed to perform data analysis in real time. The Jupyter Notebook App is a server-client application that allows for the editing and running of notebook documents via a web browser. The name Jupyter is an acronym that stands for the three languages it was designed for—Julia , Python, and R. It comes included in the Anaconda distribution.

 

  1. To work with images, the main packages that you need are as follows: Numpy, opencv, scikit-image, PIL, Pillow, SimpleCV, Mahotas, and ilastik. Additionally, to work in machine learning problems, you can also use pandas, scikit-learn, Orange, PyBrain, or Milk. Finally, if your computer vision project involves deep learning techniques, you can also use TensorFlow, Pytorch, Theano, or Keras.
  1. To install packages using pip according to the requirements.txt file from a local directory, we should execute pip install -r requirements.txt to install all the packages contained in this file. You can also create a virtual environment first, and then install all the required packages:

 

  1. An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools, and a debugger. Most modern IDEs have intelligent code completion. Python IDE is the first thing you need to get started with Python programming. You can get started with Python programming in a basic text editor such as Notepad, but it is much better to use a complete and feature rich Python IDE.

PyCharm is a professional Python IDE, and comes in two flavors:

Most of its features are available in the Community flavor, including intelligent code completion, intuitive project navigation, on the fly error checking and fixing, code quality with PEP8 checks and smart refactoring, a graphical debugger, and test runner. It also integrates with IPython notebook, and supports Anaconda as well as other scientific packages such as Matplotlib and NumPy.

 

  1. OpenCV is released under a BSD license. Therefore, it is free for both commercial and academic use (https://www.opencv.org/license.html). BSD licenses can be grouped into three types:

OpenCV uses the three-clause BSD license. All of these clauses are listed as follows:

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

(1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
(3) Neither the name of the [organization] nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
(4) All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the [organization].