ramonj147nw 發表在 痞客邦 留言(0) 人氣()
ramonj147nw 發表在 痞客邦 留言(0) 人氣()
10、聲明返回類型
在PHP 5中,程式設計師沒法界說函數或方式的返回類型。在實際生活中,這是一個巨大的瑕玷,因為程式設計師沒法防止不測的返回類型並在其他情形下生成異常。
ramonj147nw 發表在 痞客邦 留言(0) 人氣()
10、聲明返回類型
ramonj147nw 發表在 痞客邦 留言(0) 人氣()
ramonj147nw 發表在 痞客邦 留言(0) 人氣()
代碼
- import cv2
- import pytesseract
- import matplotlib.pyplot as plt
- import matplotlib
- matplotlib.use('TkAgg') #插足這行
-
- # 載入圖檔
- image = cv2.imread('./images_ocr/receipt.png')
-
- # 顯示圖檔
- image_RGB = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
- plt.figure(figsize=(10,6))
- plt.imshow(image_RGB)
- plt.axis('off')
- plt.show()
-
-
- # 參數設定
- custom_config = r'--psm 6'
- # OCR 辨識
- print(pytesseract.image_to_string(image, config=custom_config))
-
- # 參數設定,只辨識數字
- custom_config = r'--psm 6 outputbase digits'
- # OCR 辨識
- print(pytesseract.image_to_string(image, config=custom_config))
-
-
- # 參數設定白名單,只辨識有限字元
- custom_config = r'-c tessedit_char_whitelist=abcdefghijklmnopqrstuvwxyz --psm 6'
- # OCR 辨識
- print(pytesseract.image_to_string(image, config=custom_config))
-
-
- # 參數設定黑名單,只辨識有限字元
- custom_config = r'-c tessedit_char_blacklist=abcdefghijklmnopqrstuvwxyz --psm 6'
- # OCR 辨識
- print(pytesseract.image_to_string(image, config=custom_config))
-
- # 載入圖檔
- image = cv2.imread('./images_ocr/chinese.png')
-
- # 顯示圖檔
- image_RGB = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
- plt.figure(figsize=(10,6))
- plt.imshow(image_RGB)
- plt.axis('off')
- plt.show()
-
- # 辨識多國文字,中文繁體、日文及英文
- custom_config = r'-l chi_tra+jpn+eng --psm 6'
- # OCR 辨識
- print(pytesseract.image_to_string(image, config=custom_config))
-
- # 載入圖檔
- image = cv2.imread('./images_ocr/chinese_2.png')
-
- # 顯示圖檔
- image_RGB = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
- plt.figure(figsize=(10,6))
- plt.imshow(image_RGB)
- plt.axis('off')
- plt.show()
-
- # 辨識多國文字,中文繁體、日文及英文
- custom_config = r'-l chi_tra+jpn+eng --psm 6'
- # OCR 辨識
- print(pytesseract.image_to_string(image, config=custom_config))
ramonj147nw 發表在 痞客邦 留言(0) 人氣()
成績圖:
座標:網站架設
- [[ 16 290]
- [412 491]
- [740 626]
- [283 631]
- [146 651]
- [ 32 710]]
- 5.0
- image 1/1 D:\yolo\bus.jpg: 640x480 4 persons, 1 bus, 1 stop sign, 83.9ms
- Speed: 3.0ms preprocess, 83.9ms inference, 4.0ms postprocess per image at shape (1, 3, 640, 480)
- tensor([[ 22.3412, 228.0822, 802.0841, 754.3939]], device='cuda:0')
- 準確率 0.879738450050354
- x,y: [[412 491]]
- 0.0
- tensor([[ 47.5999, 398.8344, 244.2552, 903.1386]], device='cuda:0')
- 準確率 0.873720109462738
- x,y: [[146 651]]
- 0.0
- tensor([[670.3670, 376.9174, 810.0000, 875.0829]], device='cuda:0')
- 準確率 0.8693700432777405
- x,y: [[740 626]]
- 0.0
- tensor([[220.5713, 405.7240, 344.5589, 857.2506]], device='cuda:0')
- 準確率 0.819391667842865
- x,y: [[283 631]]
- 11.0
- tensor([[7.7698e-02, 2.5441e+02, 3.2119e+01, 3.2465e+02]], device='cuda:0')
- 準確率 0.44594067335128784
- x,y: [[ 16 290]]
- 0.0
- tensor([[3.2650e-02, 5.4988e+02, 6.4001e+01, 8.6930e+02]], device='cuda:0')
- 準確率 0.29976797103881836
- x,y: [[ 32 710]]
-
ramonj147nw 發表在 痞客邦 留言(0) 人氣()
進入CPANEL ROOT後台
拔取Transfer Tool
Remote Server Address:
輸入原主機的IP
拔取 ROOT帳號
輸入暗碼
鄙人一步設定便可
ramonj147nw 發表在 痞客邦 留言(0) 人氣()
如許便可
演示圖片
ramonj147nw 發表在 痞客邦 留言(0) 人氣()
ramonj147nw 發表在 痞客邦 留言(0) 人氣()