- Geospatial Development By Example with Python
- Pablo Carreira
- 241字
- 2021-07-16 09:30:54
Installing packages and required software
In this topic, we will go through the installation process of every package used in the book.
OpenCV
OpenCV is an optimized C/C++ library intended for video and image processing with hundreds of functions ranging from simple image resizing to object recognition, face detection, and so on. OpenCV is a big library, and we will use its capabilities of reading, transforming, and writing images. It's a good choice because its development is active, and it has a large user community and very good documentation.
Windows
Here is the installation procedure for Windows:
- Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/.
- Press Ctrl + F to open the search dialog of your browser and then search for OpenCV.
- You will find a list of files; choose
opencv_python?2.4.11?cp27?none?win32.whl
or any OpenCV version that containscp27
andwin32
. This means that this is the 32-bit version for Python 2.7. - Save the downloaded file to a known location.
- Open Windows Command Prompt and run the following command:
c:\Python27\scripts\pip install path_to_the_file_you_downloaded.whl
- You should see an output telling you that the installation was successful, as follows:
Processing c:\downloads\opencv_python-2.4.12-cp27-none-win32.whl Installing collected packages: opencv-python Successfully installed opencv-python-2.4.12
Tip
You can drag and drop a file into the command prompt to enter its full path.
Ubuntu Linux
Here is the installation process for Ubuntu Linux:
- Open a new terminal with Ctrl + T.
- Then, enter the following command:
sudo apt-get install python-opencv
推薦閱讀
- 微服務(wù)與事件驅(qū)動(dòng)架構(gòu)
- Python入門(mén)很簡(jiǎn)單
- PowerCLI Cookbook
- 青少年軟件編程基礎(chǔ)與實(shí)戰(zhàn)(圖形化編程三級(jí))
- Vue.js 3.x從入門(mén)到精通(視頻教學(xué)版)
- Programming ArcGIS 10.1 with Python Cookbook
- 秒懂設(shè)計(jì)模式
- C#程序設(shè)計(jì)
- 深入理解Android:Wi-Fi、NFC和GPS卷
- PySide 6/PyQt 6快速開(kāi)發(fā)與實(shí)戰(zhàn)
- Processing創(chuàng)意編程指南
- 深入分析GCC
- 零基礎(chǔ)學(xué)Java(第5版)
- 程序員的英語(yǔ)
- Distributed Computing with Python