import cv2 from IPython.display import Image from IPython.display import display # 画像読み込み img1 = cv2.imread('/path/to/dir/megane400x400.png') img2 = cv2.imread('/path/to/dir/megane200x200_rotate.png') # 特徴点検出 akaze = cv2.AKAZE_create() kp1, des1 = akaze.detectAndCompute(img1, None) kp2, des2 = akaze.detectAndCompute(img2, None) # マッチング bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True) matches