获取黑屏中白点的 X 和 Y 坐标 python

Get X and Y coordinates of white dot in a black screen python

是否有 python 库来检测黑色背景 png 图像中白点的像素坐标和 return 其坐标的 NumPy 数组

你可以通过numpy.where找到白点。你可以这样试试:

import numpy as np 
import cv2 

img = cv2.imread('XXWck.png')

x, y, z = np.where(img==(255,255,255))
points = zip(x,y)
print(points)