7

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
  • 9,410
  • 12
  • 56
  • 105

0 Answers0