车牌识别出现以下问题解决:
mat_ = cv2.estimateRigidTransform(org_pts, target_pts, True) AttributeError: module 'cv2.cv2' has no attribute 'estimateRigidTransform'
代码:
from hyperlpr import * import cv2 def lp_detecte(image): res = HyperLPR_plate_recognition(image) return res[0][0] if __name__ == '__main__': image = cv2.imread("static/24.jpg") a = lp_detecte(image) print(a)
解决方案:
问题所在:opencv版本过高
解决思路:
mat_ = cv2.estimateRigidTransform(org_pts, target_pts, True) 原来的注释掉 mat_,_ = cv2.estimateAffinePartial2D(org_pts,target_pts) 换成这个即可