def merge_img(uid,img_type): import cv2 import numpy as np from PIL import Image n_file_name = uid+'/'+img_type+'.png' etci_file_name = uid+'/ETCI.png' n_file = cv2.imread(n_file_name) etci = cv2.imread(etci_file_name) orig_h,orig_w,orig_rgb = etci.shape #n_array = cv2.resize(n_array,(orig_w,orig_h)) h,w = orig_h,orig_w print(h) print(w) n_file = cv2.resize(n_file,(w,h),interpolation = cv2.INTER_AREA) n_file_large = uid+'/'+img_type+'_large.png' sw = cv2.imwrite(n_file_large,n_file) sw2 = cv2.imwrite(n_file_name,n_file)