import cv2
for i in range(1,5001):
img1 = cv2.imread('/Users/like/Desktop/mix/1/'+str(i)+'.jpg')
img2 = cv2.imread('/Users/like/Desktop/mix/2/'+str(i)+'.jpg')
#img2 = cv2.resize(img2,(512,512))#统一图片大小
dst = cv2.addWeighted(img1,0.5,img2,0.5,0)
cv2.imwrite('/Users/like/Desktop/mix/3/'+str(i)+'.jpg',dst)
# cv2.imshow('dst',dst)
# cv2.waitKey(0)
# cv2.destroyAllWindows()