最近开始搞图片检索
from math import sqrt
import cv2
import time
import os
import numpy as np
from scipy.stats.stats import pearsonr
import os
img_path= r’E:\code\pictures’
imgs = os.listdir(img_path)
imgs=np.array(imgs)
cv2.namedWindow(‘image’, cv2.WINDOW_AUTOSIZE)
for img in imgs:
img = cv2.imread(img, cv2.IMREAD_COLOR)
cv2.imshow(‘image’, img)
cv2.waitKey(0)
cv2.destroyAllWindows()