一、概念和环境搭建
什么是opencv?
搭建过程?
1)从python.org下载python,要下载3.0版本以上的;
2)下载pycharm
3)搭建opencv,依次输入如下命令
pip install opencv-python
pip install opencv-contrib-python
pip install pytesseract
若遇到如下的问题,则在cmd下输入pip install Flask命令;
Exception:
File
"c:\users\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py"
, line 73,
in
console_to_str
return
s.decode(sys.__stdout__.encoding)
UnicodeDecodeError:
'utf-8'
codec can't decode
byte
0xb4
in
position 48: invalid start
byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"c:\users\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py"
, line 215,
in
main
status = self.run(options, args)
File
"c:\users\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py"
, line 342,
in
run
prefix=options.prefix_path,
File
"c:\users\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py"
, line 784,
in
install
**kwargs
File
"c:\users\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py"
, line 878,
in
install
spinner=spinner,
File
"c:\users\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py"
, line 676,
in
call_subprocess
line = console_to_str(proc.stdout.readline())
File
"c:\users\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py"
, line 75,
in
console_to_str
return
s.decode(
'utf_8'
)
UnicodeDecodeError:
'utf-8'
codec can't decode
byte
0xb4
in
position 48: invalid start
byte
若遇到pip不是内部或外部命令,也不是可执行程序时候:
需要找到文件夹Python 3.X,然后再环境变量的Path添加Python 3.X/Script所在的目录即可
二、pycharm的使用
三、opencv模块