欧美vvv,亚洲第一成人在线,亚洲成人欧美日韩在线观看,日本猛少妇猛色XXXXX猛叫

新聞資訊

    本文介紹了從圖像識別數字的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

    問題描述

    我正在嘗試從游戲截圖中提取數字.

    I am to from in game .

    我正在嘗試提取:

    98

    3430

    5/10

    98

    python識別圖片中數字_python圖片驗證碼識別_python opencv識別數字

    3430

    5/10

    from PIL import Image
    import pytesseract 
    image="D:/img/New folder (2)/1.png"
    pytesseract.pytesseract.tesseract_cmd = 'C:/Program Files/Tesseract-OCR/tesseract.exe'
    text = pytesseract.image_to_string(Image.open(image),lang='eng',config='--psm 5')
    print(text)
    

    python圖片驗證碼識別_python識別圖片中數字_python opencv識別數字

    輸出是亂碼

    ‘t hl) keteeeees
    ek pSlaerenen
    JU) pgrenmnreserenny
    Rates B
    d dali eas. 5
    cle aM (Sores
    |, S| pgranmrerererecons
    a cee 3
    

    python opencv識別數字_python圖片驗證碼識別_python識別圖片中數字

    pea 3 oS : (geo eenee ey = es A

    推薦答案

    好的,所以我嘗試將其更改為灰度、反向對比度或使用不同的閾值,但這似乎都相當不準確.問題似乎是傾斜和較小的數字.你沒有任何 hiher res 圖像嗎?我能得到的最準確的是以下代碼.

    python圖片驗證碼識別_python opencv識別數字_python識別圖片中數字

    okay, so I tried it into , or use , but it all seems to be .The issue seems to be the and . You do not to have any hiher res image? Most I could get was the code.

    import cv2
    import pytesseract
    import imutils
    pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
    img = cv2.imread('D:/img/New folder (2)/1.png') #test.png is your original image
    img = imutils.resize(img, width=1400)
    crop = img[340:530, 100:400]
    

    python圖片驗證碼識別_python識別圖片中數字_python opencv識別數字

    data = pytesseract.image_to_string(crop,config=' --psm 1 --oem 3 -c tessedit_char_whitelist=0123456789/') print(data) cv2.imshow('crop', crop) cv2.waitKey()

    否則我推薦其中一種方法python識別圖片中數字,如類似問題中所述或在這個.

    I one of these as in the in this one.

    這篇關于從圖像中識別數字的文章就介紹到這了python識別圖片中數字,希望我們推薦的答案對大家有所幫助,也希望大家多多支持IT屋!

網站首頁   |    關于我們   |    公司新聞   |    產品方案   |    用戶案例   |    售后服務   |    合作伙伴   |    人才招聘   |   

友情鏈接: 餐飲加盟

地址:北京市海淀區    電話:010-     郵箱:@126.com

備案號:冀ICP備2024067069號-3 北京科技有限公司版權所有