目录
模板匹配查找相似图片
natsorted自然排序:
import glob
import shutil
from natsort import natsorted
if __name__ == '__main__':
# path=r'C:/2021-11\images-optional\48'
# files = glob.glob(path + "/*/*.jpg")
# print(len(files))
# exit(1)
import cv2
import os
import numpy as np
path = r"C:/2021-11\images-optional/"
files=glob.glob(path+"*.jpg")
files=natsorted(files)
dir_dict={}
exclude=[]
for index, file in enumerate(files):
if index in exclude:
continue