二值化

In [1]:

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

In [2]:

sc = loadimg("/home/zhao/Documents/mower-profile/screenshot/302/20240713110952.png", True)
plt.imshow(sc, cmap="gray", vmin=0, vmax=255)
plt.show()
2024-07-13 15:12:28,741 - DEBUG - /home/zhao/Documents/arknights-mower/arknights_mower/utils/image.py:44 - loadimg - /home/zhao/Documents/mower-profile/screenshot/302/20240713110952.png

No description has been provided for this image

In [3]:

img = thres2(sc, 245)
plt.imshow(img, cmap="gray", vmin=0, vmax=255)
plt.show()

No description has been provided for this image