def find_uglies():
for file_type in ['Negative']:
for img in os.listdir(file_type):
for ugly in os.listdir('uglies'):
try:
current_image_path=str(file_type)+'/'+str(img)
ugly=cv2.imread('uglies/'+str(ugly))
question=cv2.imread(current_image_path)
if ugly.shape==question.shape and not (np.bitwise_xor(ugly,question).any()):
os.remove(current_image_path)
print ('Ohyeahh')
except Exception as e:
print (str(e))
评论列表
文章目录