91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 37.85MB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-10
  • 語言: Python
  • 標簽: Python??

資源簡介

python車牌檢測識別代碼,個人感覺還是不錯,識別率比較高!

資源截圖

代碼片段和文件信息

import?numpy?as?np
import?cv2
from?hyperlpr_py3?import?pipline

#?定義旋轉rotate函數
def?rotate(image?angle?center=None?scale=1.0):
????#?獲取圖像尺寸
????(h?w)?=?image.shape[:2]
?
????#?若未指定旋轉中心,則將圖像中心設為旋轉中心
????if?center?is?None:
????????center?=?(w?/?2?h?/?2)
?
????#?執行旋轉
????M?=?cv2.getRotationMatrix2D(center?angle?scale)
????image_rotated?=?cv2.warpAffine(image?M?(w?h))
?
????#?返回旋轉后的圖像
????return?image_rotated

capture?=?cv2.VideoCapture(0)

while(True):
????#?獲取一幀
????ret?frame?=?capture.read()
????frame_rotated?=?rotate(frame?180)
????#?調用車牌識別模塊
????frame_?res??=?pipline.SimpleRecognizePlate(frame_rotated)
????
????#htitch?=?np.hstack((frame_rotated?frame_))
????#cv2.imshow(‘License?Plate?Detection?Recognition‘?htitch)
????cv2.imshow(‘License?Plate?Detection?Recognition‘?frame_)
????if?cv2.waitKey(1)?==?ord(‘q‘):
????????break

評論

共有 條評論