if event == cv2.EVENT_RBUTTONDOWN: blue = img[y, x, 0]# 0 is the channel for blue(BGR) green = img[y, x, 1]# 1 is channel for green red = img[y, x, 2]# 2 is channel for red ...
# Checking for the Left mouse button click event. # Opening the image. img =cv2.imread('SampleImage.jpg', 0) # Giving Image window a Name. cv2.namedWindow('Image') # Associating mouse call back ...