not0loc = np.where(img!=0)
for idex in range(len(not0loc[0])):
locy = not0loc[0][idex]
locx = not0loc[1][idex]
img[locy, locx] = 255
npwhere遍历
最新推荐文章于 2022-11-17 19:33:57 发布
not0loc = np.where(img!=0)
for idex in range(len(not0loc[0])):
locy = not0loc[0][idex]
locx = not0loc[1][idex]
img[locy, locx] = 255