It worked for me well :
import cv2
import numpy as np
cap = cv2.imread('/home/PATH/TO/IMAGE/IMG_0835.jpg')
#You're free to do a resize or not, just for the example
cap = cv2.resize(cap, (340,480))
for x in range (0,340,1):
for y in range(0,480,1):
color = cap[y,x]
print color`