使用Opencv检测程序效率
使用Opencv检测程序效率
import cv2
import numpy as np
img = cv2.imread("./image/screen.jpg")
e1 = cv2.getTickCount()
for i in range(5, 49, 2):
img = cv2.medianBlur(img, i)//中值滤波
cv2.imshow("img", img)
e2 = cv2.getTickCount()
t = (e2 - e1) / cv2.getTickFrequency()
print(t)
cv2.waitKey(0)