特征与特征点
In [1]:
import cv2
from matplotlib import pyplot as plt
from arknights_mower.utils.image import loadimg
from arknights_mower.utils.matcher import keypoints
In [2]:
sc = loadimg("/home/zhao/Documents/mower-profile/screenshot/201/20240713031749.png", True)
plt.imshow(sc, cmap="gray", vmin=0, vmax=255)
plt.show()
2024-07-15 11:45:32,901 - DEBUG - /home/zhao/Documents/arknights-mower/arknights_mower/utils/image.py:44 - loadimg - /home/zhao/Documents/mower-profile/screenshot/201/20240713031749.png
In [3]:
kp, des = keypoints(sc)
print(len(kp))
img = cv2.drawKeypoints(sc, kp, None, (0, 255, 0), flags=0)
plt.imshow(img)
plt.show()
In [4]:
sc = loadimg("/home/zhao/Documents/mower-profile/screenshot/103/20240713152407.png", True)
plt.imshow(sc, cmap="gray", vmin=0, vmax=255)
plt.show()
2024-07-15 11:45:33,699 - DEBUG - /home/zhao/Documents/arknights-mower/arknights_mower/utils/image.py:44 - loadimg - /home/zhao/Documents/mower-profile/screenshot/103/20240713152407.png
In [5]:
kp, des = keypoints(sc)
print(len(kp))
img = cv2.drawKeypoints(sc, kp, None, (0, 255, 0), flags=0)
plt.imshow(img)
plt.show()