Computer Vision - Environment installed a tutorial -openCV

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/AinUser/article/details/100291567

openCV basic information Reference Guide Address: http://c.biancheng.net/view/1104.html

I have here is a combination of python to install and use openCV, after installation in order to use, but also the mainstream

第一步:下载python环境

下载地址:https://www.python.org/downloads/
下载之后安装,切记在第一步骤,勾选配置环境变量

第二步:安装依赖库
首先,进入python安装环境的scripts目录下,执行命令
方式:可以使用cmd,然后cd 到scripts目录
     或者安装git的,直接在scripts目录下右击git bash here

pip install wheel
pip install numpy
pip install opencv-python
第三步:测试环境
我是在pycharm上面写的代码,需要的可以下载安装一下pycharm

import cv2
import numpy as np
 
img = cv2.imread("1.jpg")
cv2.imshow("1",img)
cv2.waitKey(10000)


如果使用pycharm,引入包依赖的时候找不到,那么直接选择install xxx包即可
结果就是显示图片框

 

Guess you like

Origin blog.csdn.net/AinUser/article/details/100291567