车牌识别—centos7.8安装及运行pyperlper

我这里用的是centos7.8自带的python2.7,安装命令及问题记录

1.先安装pip

yum install python-pip

2.安装skbuild

pip install cmake

pip install scikit-build

3.安装pyperlper

python -m pip install hyperlpr

问题一:TypeError: 'NoneType' object is not iterable,详情见图:

1

尝试解决: pip install --upgrade pip

安装继续未成功,详情见图

2

解决办法(降低版本):pip install opencv-python==4.2.0.32

结果如图:

3

4.python引入

from hyperlpr import *

报错:ImportError: libSM.so.6: cannot open shared object file: No such file or directory

解决:

yum install libSM-1.2.2-2.el7.x86_64 --setopt=protected_multilib=false

yum install libXrender-0.9.10-1.el7.x86_64 --setopt=protected_multilib=false

yum install libXext-1.3.3-3.el7.x86_64 --setopt=protected_multilib=false

4.pyperlper执行报错:AttributeError: 'module' object has no attribute 'estimateRigidTransform'

解决:cv2.estimateRigidTransform()方法已经停用,可以使用cv2.estimateAffine2D(),cv2.estimateAffinePartial2D()来替代。

cd /usr/lib/python2.7/site-packages/hyperlpr

vim hyperlpr.py  

第231行改为:mat_,_=cv2.estimateAffinePartial2D(org_pts,target_pts,True)

5.运行成功

fatal error: Python.h: No such file or directory

解决:

yum install python-devel.x86_64

yum install gcc

pip install uwsgi

pip install gevent

你可能感兴趣的:(车牌识别—centos7.8安装及运行pyperlper)