欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

基于Python實(shí)現(xiàn)智能停車(chē)場(chǎng)車(chē)牌識(shí)別計(jì)費(fèi)系統(tǒng)

 更新時(shí)間:2022年04月28日 11:33:46   作者:Python小二  
這篇文章主要為大家介紹了如何利用Python實(shí)現(xiàn)一個(gè)智能停車(chē)場(chǎng)車(chē)牌識(shí)別計(jì)費(fèi)系統(tǒng),文中的示例代碼講解詳細(xì),感興趣的小伙伴可以動(dòng)手嘗試一下

前段時(shí)間練習(xí)過(guò)的一個(gè)小項(xiàng)目,今天再看看,記錄一下~

項(xiàng)目結(jié)構(gòu)

說(shuō)明:

  • datefile文件夾:保存車(chē)輛信息表的xlsx文件
  • file文件夾:保存圖片文件夾。ic_launcher.jpg是窗體的右上角圖標(biāo)文件;income.png是實(shí)現(xiàn)收入統(tǒng)計(jì)的柱狀圖(下一篇文章實(shí)現(xiàn));key.txt是使用百度的圖片識(shí)別AI接口申請(qǐng)的key;test.jpg保存的是攝像頭抓取的圖片
  • venv文件夾:項(xiàng)目所需要的各種模塊,即項(xiàng)目運(yùn)行環(huán)境
  • btn.py文件:按鈕模塊
  • main.py文件:程序主文件
  • ocrutil.py文件:車(chē)牌識(shí)別模塊
  • timeutil.py文件:時(shí)間處理模塊

主要代碼

# 車(chē)位文字
def text1(screen):
    # 剩余車(chē)位
    k = Total - carn
    if k < 10:
        # 剩余車(chē)位
        sk = '0' + str(k)
    else:
        sk = str(k)
    # 使用系統(tǒng)字體
    xtfont = pygame.font.SysFont('SimHei', 20)
    # 重新開(kāi)始按鈕
    textstart = xtfont.render('共有車(chē)位:' + str(Total) + '  剩余車(chē)位:' + sk, True, WHITE)
    # 獲取文字圖像位置
    text_rect = textstart.get_rect()
    # 設(shè)置文字圖像中心點(diǎn)
    text_rect.centerx = 820
    text_rect.centery = 30
    # 繪制內(nèi)容
    screen.blit(textstart, text_rect)


# 停車(chē)場(chǎng)信息表頭
def text2(screen):
    # 使用系統(tǒng)字體
    xtfont = pygame.font.SysFont('SimHei', 15)
    # 重新開(kāi)始按鈕
    textstart = xtfont.render('  車(chē)號(hào)       時(shí)間    ', True, WHITE)
    # 獲取文字圖像位置
    text_rect = textstart.get_rect()
    # 設(shè)置文字圖像中心點(diǎn)
    text_rect.centerx = 820
    text_rect.centery = 70
    # 繪制內(nèi)容
    screen.blit(textstart, text_rect)
    pass


# 停車(chē)場(chǎng)車(chē)輛信息
def text3(screen):
    # 使用系統(tǒng)字體
    xtfont = pygame.font.SysFont('SimHei', 12)
    # 獲取文檔表信息
    cars = pi_table[['carnumber', 'date', 'state']].values
    # 頁(yè)面就繪制10輛車(chē)信息
    if len(cars) > 10:
        cars = pd.read_excel(path + '停車(chē)場(chǎng)車(chē)輛表.xlsx', skiprows=len(cars) - 10, sheet_name='data').values
    # 動(dòng)態(tài)繪制y點(diǎn)變量
    n = 0
    # 循環(huán)文檔信息
    for car in cars:
        n += 1
        # 車(chē)輛車(chē)號(hào) 車(chē)輛進(jìn)入時(shí)間
        textstart = xtfont.render(str(car[0]) + '   ' + str(car[1]), True, WHITE)
        # 獲取文字圖像位置
        text_rect = textstart.get_rect()
        # 設(shè)置文字圖像中心點(diǎn)
        text_rect.centerx = 820
        text_rect.centery = 70 + 20 * n
        # 繪制內(nèi)容
        screen.blit(textstart, text_rect)
    pass

實(shí)現(xiàn)效果

到此這篇關(guān)于基于Python實(shí)現(xiàn)智能停車(chē)場(chǎng)車(chē)牌識(shí)別計(jì)費(fèi)系統(tǒng)的文章就介紹到這了,更多相關(guān)Python車(chē)牌識(shí)別計(jì)費(fèi)系統(tǒng)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論