Is there a python library to detect the pixel's coordinate of white dots in a black background png image and return a NumPy array of its coordinates
ie.
Is there a python library to detect the pixel's coordinate of white dots in a black background png image and return a NumPy array of its coordinates
ie.
You can find white dot by numpy.where
. You can try this way:
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)