import cv2
def click_event(event, x, y, flags, param):
     if event == cv2.EVENT_LBUTTONDOWN:
         print(x,y)
         font = cv2.FONT_HERSHEY_DUPLEX
         cv2.putText(img, str(x)+(' , ')+str(y),(x,y), font, 1, (255,0,0), 2)
         cv2.imshow('image', img)

img = cv2.imread('sample.jpg' ,1)
cv2.imshow('image', img)
cv2.setMouseCallback('image', click_event)
cv2.waitKey(0)
cv2.destroyAllWindows()