主页

索引

模块索引

搜索页面

5.12.1. 常用

安装:

pip install opencv-contrib-python

pip install opencv-contrib-python==3.4.1.15

使用:

import cv2

PyPI repository:

opencv-python: contains just the main modules
opencv-contrib-python: contains both the main modules along with the contrib modules
opencv-python-headless: Same as opencv-python but no GUI functionality. Useful for headless systems.
opencv-contrib-python-headless: Same as opencv-contrib-python but no GUI functionality. Useful for headless systems.

警告

You DO NOT want to install both opencv-python and opencv-contrib-python — pick ONE of them.

opencv 里面基础的模块是 core、highgui、imgproc 三个模块:

core 模块
实现最核心的数据结构及其基本运算,如绘图函数、数组操作相关函数等
highgui 模块
是视频与图像的读取、显示、存储等接口
imgproc 模块
实现图像处理的基础方法,包括图像滤波、图像的几何变换、平滑、阈值分割、形态学处理、边缘检测、目标检测、运行分析和对象跟踪等。

警告

Opencv 在 3.4.2 之后有些算法申请了专利,得付费使用

主页

索引

模块索引

搜索页面