仅作为记录,大佬请跳过。 保存成文件 import numpy numpy.savetxt("result.txt", img_bin) 找元素的位置 numpy.where(img_bin==255)