10

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?

SomethingSomething
  • 10,344
  • 14
  • 61
  • 112

0 Answers0