10 lines
431 B
Python
10 lines
431 B
Python
import numpy as np
|
|
from PIL import Image
|
|
|
|
base = r"D:\Nextcloud-youfu\dev\code\radio-coverage-dl\data\png"
|
|
ant = np.asarray(Image.open(base + r"\antennas\600_0.png").convert("L"))
|
|
bld = np.asarray(Image.open(base + r"\buildings_complete\600.png").convert("L"))
|
|
|
|
print("天线图里出现的数值:", np.unique(ant))
|
|
print("天线亮点的像素个数:", int((ant > 127).sum()))
|
|
print("建筑图里出现的数值:", np.unique(bld)) |