/* 自定義代碼塊樣式 */

herrDeng網內搜尋

自訂搜尋

Ads

2026年9月23日 星期三

Python 教學】一次搞懂 OpenCV 影像底層:NumPy 矩陣運算、通道過濾與批次輪播

 
[Py3 code 請進]

import cv2
import numpy as np
mask=np.array([0,255,255], dtype=np.uint8)
for i in range(10):
    x=cv2.imread(f'dog{i}.jpg')
    x= x & mask
    y=cv2.resize(x,(600, 800))
    cv2.imshow('dog', y)
    cv2.waitKey(5000)
cv2.destroyAllWindows()

沒有留言:

Related Posts Plugin for WordPress, Blogger...

熱門文章