问题
I have a grayscale image and I want to get all the coordinates of pixels with intensity level 255.
I tried using:
pixels = np.where(img[img == 255])
But instead of getting a list of (X,Y) coordinates, I got a list of numbers, like if img
was a one dimensional vector.
What am I doing wrong?
来源:https://stackoverflow.com/questions/43632498/numpy-opencv-python-get-coordinates-of-white-pixels