I've written a program using Python 2.7, Numpy and OpenCV to grab a photo from my webcam and give the rgb value of every pixel. After running the code on a 640x480 pixel photo:
for x in range(638):
for y in range(478):
red, green, blue = image[x, y]
print(red, green, blue)
I get the error message:
red, green, blue = image[x, y]
IndexError: index 480 is out of bounds for axis 0 with size 480
Does anybody know why this is?