代码优化
concurrent.futures 模块
import glob
import os
import cv2
### Loop through all jpg files in the current folder
### Resize each one to size 600x600
for image_filename in glob.glob("*.jpg"):
### Read in the image data
img = cv2.imread(image_filename)
### Resize the image
img = cv2.resize(img, (600, 600))Last updated