加载图像

In [1]:

from matplotlib import pyplot as plt
from arknights_mower.utils.image import loadimg, loadres

In [2]:

sc = loadimg("/home/zhao/Documents/mower-profile/screenshot/201/20240707154102.png")
plt.imshow(sc)
plt.show()
2024-07-07 15:43:37,996 - DEBUG - /home/zhao/Documents/arknights-mower/arknights_mower/utils/image.py:44 - loadimg - /home/zhao/Documents/mower-profile/screenshot/201/20240707154102.png

No description has been provided for this image

In [3]:

sc = loadimg("/home/zhao/Documents/mower-profile/screenshot/201/20240707154102.png", True)
plt.imshow(sc, cmap="gray", vmin=0, vmax=255)
plt.show()
2024-07-07 15:44:04,711 - DEBUG - /home/zhao/Documents/arknights-mower/arknights_mower/utils/image.py:44 - loadimg - /home/zhao/Documents/mower-profile/screenshot/201/20240707154102.png

No description has been provided for this image

In [5]:

res = loadres("ope_select_start")
plt.imshow(res)
plt.show()
2024-07-07 15:45:05,052 - DEBUG - /home/zhao/Documents/arknights-mower/arknights_mower/utils/image.py:44 - loadimg - /home/zhao/Documents/arknights-mower/arknights_mower/resources/ope_select_start.png

No description has been provided for this image

In [7]:

res = loadres("ope_select_start", True)
plt.imshow(res, cmap="gray", vmin=0, vmax=255)
plt.show()

No description has been provided for this image