OCR倾斜文字截取矫正
import osimport cv2import numpy as npimport mathfrom math import atan, fabs, sin, cosdef rotateImage(img,degree,pt1,pt2,pt3,pt4):height,width=img.shape[:2]heightNew = int(width * fabs(sin(degree)) + height * fabs(cos(degree)))widthNew = int(height
原创
2022-05-13 17:15:18 ·
625 阅读 ·
0 评论