close
import cv2
import numpy as np
img = cv2.imread('test01.jpg')
img2 = cv2.imread('test02.jpg')
difference = cv2.subtract(img, img2)
result = not np.any(difference)
if result is True:
print('Y')
else:
cv2.imwrite('result.jpg', difference)
print('N')
※查詢其他OpenCV用法如下※
openCV應用總整理: 點擊我
文章標籤
全站熱搜
留言列表