I am using OpenCV 3 on MacOS and all I am trying to get the RGB values of pixels in an image.
For example, I am using the following image:
I've made a program that detects the click of the user in the image and outputs the RGB color using the x,y coordinates of the click, but apparently when I was clicking in some regions of the circles, I was getting an incorrect value. For example: When I click inside the blue circle, let's say on the point (177,340) of the image, it outputs the value (255,255,255), which is definitely incorrect.
But when I click a bit to the right or left, it outputs the correct value: (17, 51, 225). This happens for the whole image,
I was suspecting it was something related to the scale, and then I just opened the image on python and got the value of the pixel using the following code:
import cv2
import numpy as np
img = cv2.imread('circles.jpg', 1)
print(img[177,340])
But still, what I get is this:
array([255, 255, 255], dtype=uint8)
I suspect it's something related to the coordinates system that I am not aware of. Can someone give me a hand about it?
Thanks in advance.

